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: 38
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

Senior Member


Joined: 15 Aug 2015
Posts: 1245
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: 2018
Location: USA

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: 38
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top