cancel
Showing results for 
Search instead for 
Did you mean: 

Grip : CREATE/TXT

Genius
Genius

I have a problem for writing the name of my file in uppercase character :

CREATE/TXT,1,'+my_path+'\PROC_.TXT'',IFERR,PBCRE:

 return always : 'my_path\proc_.txt' in windows environement

Any idea ?

 

Thanks for your help

@mkn
4 REPLIES

Re: Grip : CREATE/TXT

Siemens Phenom Siemens Phenom
Siemens Phenom

Check your syslog to see if you have an environment variable defined called UGII_OPTION.

 

If so, try un-defining it.

Re: Grip : CREATE/TXT

Genius
Genius

rrrrrrrrr!!!  UGII_OPTION=LOWER , thanks Steve Smiley Happy

Do you know if this variable can be to modify inside my grip?

@mkn

Re: Grip : CREATE/TXT

Siemens Phenom Siemens Phenom
Siemens Phenom

 

I'm glad that was the issue, so it was an easy fix for you!  I don't think you can use that to change the case of strings within the program.  As far as I know, it only affects things at the operating system level.  However I found this example program on the Solution Center website:

 

  • Sample GRIP subroutine : convert string to lower case
  • Note:


    GTAC provides programming examples for illustration only, and assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. GTAC support professionals can help explain the functionality of a particular procedure, but we will not modify these examples to provide added functionality or construct procedures to meet your specific needs.

    PROC/ str
    
        $$  THIS SUBROUTINE CHANGES A STRING TO LOWER CASE.
    
        $$  ARGUMENTS               DESCRIPTION
        $$  ----------------------  ---------------------------------------
            STRING/ str $$          STRING BEING RELABELED
    
            DO/ B10:, ii, 1, LENF(str)
                IF/ (ASCII(str, ii) > 64) AND (ASCII(str, ii) < 91), $
                    str = REPSTR(str, SUBSTR(str, ii, 1), $
                                      CHRSTR(ASCII(str, ii) + 32), ii)
    B10:    $$ END DO ii
    
            RETURN
    

 

There is also one out there to convert a string to upper case - search for  nx_api1493.

 

Re: Grip : CREATE/TXT

Genius
Genius

yes i know , i use a subroutine for upper case but no effect with variable UGII_OPTION set to LOWER

@mkn