IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Best way to create an automated line command?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
M Lee Klein

New User


Joined: 08 Feb 2022
Posts: 6
Location: USA

PostPosted: Fri Sep 16, 2022 5:41 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 905
Location: Bamberg, Germany

PostPosted: Fri Sep 16, 2022 10:51 am
Reply with quote

You can use an Edit Macro or, for example SORT (TRAN=LTOU) to convert to uppercase.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1614

PostPosted: Fri Sep 16, 2022 4:58 pm
Reply with quote

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
View user's profile Send private message
M Lee Klein

New User


Joined: 08 Feb 2022
Posts: 6
Location: USA

PostPosted: Sat Sep 17, 2022 1:05 am
Reply with quote

This is great! Thank you!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Jes2 command output All Other Mainframe Topics 4
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Repeat a DD line- comment and insert ... CA Products 3
No new posts COBOL - create and write to output fi... COBOL Programming 0
Search our Forums:

Back to Top