View previous topic :: View next topic
|
Author |
Message |
M Lee Klein
New User
Joined: 08 Feb 2022 Posts: 39 Location: USA
|
|
|
|
My Natural program reads a dataset, selects specific data and loads it into a database. But before the program can read it I have to convert each dataset all to upper case by typing (in TSO) the line command UCC into the first and last line of the dataset then save it.
What is the best way to automate this? On a pc I'd create a macro. On Z/OS, I'm not sure what if Rexx is good for this or is there a simpler way?
I've tried to go around this by changing settings in Natural but there are more problems doing it that way.
Lee |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1348 Location: Bamberg, Germany
|
|
|
|
You can use an Edit Macro or, for example SORT (TRAN=LTOU) to convert to uppercase. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2154 Location: USA
|
|
|
|
Code: |
/* REXX */
UpperString = Translate(LowerString) |
Code: |
/* REXX */
Parse Upper LowerString UpperString |
Code: |
/* REXX */
'PIPE VAR LowerString | XLATE UPPER | VAR UpperString' |
Vice versa
Code: |
/* REXX */
UC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
LC = 'abcdefghijklmnopqrstuvwxyz'
LowerString = Translate( UpperString, LC, UC ) |
Code: |
/* REXX */
'PIPE VAR UpperString | XLATE LOWER | VAR LowerString' |
|
|
Back to top |
|
|
M Lee Klein
New User
Joined: 08 Feb 2022 Posts: 39 Location: USA
|
|
|
|
This is great! Thank you! |
|
Back to top |
|
|
|