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: 39
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: 1348
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: 2154
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: 39
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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts How to Login in to cics region and is... CICS 9
No new posts Passing containers on START command CICS 4
No new posts How can I add/create a new INIT(initi... TSO/ISPF 2
Search our Forums:

Back to Top