Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Usage of Stem var in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ravikanth

New User


Joined: 12 Jan 2006
Posts: 29

PostPosted: Sat Mar 04, 2006 4:23 pm    Post subject: Usage of Stem var in REXX
Reply with quote

Hi,

After reading into a stem variable. How can we copy the entire stem variable to another stem variable. i.e for example if we execute
"EXECIO * DISKR INJCL (STEM INJCL. FINIS)"
"FREE F(INJCL)"
and i want to copy Variable INJCL to JCLLINE, is it sufficient if we use the base alone as shown below.
JCLLINE. = INJCL.
Also if we want to pass the stem variable to a called program how could we do this?

Thanks in advance,
Ravi
Back to top
View user's profile Send private message

antonrino.b

New User


Joined: 10 Jan 2006
Posts: 76
Location: Germany

PostPosted: Sat Mar 04, 2006 5:23 pm    Post subject:
Reply with quote

Hi ravikanth,

Quote:
is it sufficient if we use the base alone as shown below.


I think that should be sufficient.

Regards,
Antu
Back to top
View user's profile Send private message
brgr88

New User


Joined: 05 Mar 2006
Posts: 6

PostPosted: Sun Mar 05, 2006 5:08 am    Post subject:
Reply with quote

Ravi,

Example1:
DO i = 1 TO injcl.0
jclline.i = injcl.i
END i
jclline.0 = injcl.0


Example2:
"EXECIO * DISKR INJCL (STEM jclline. FINIS)"


Example3:
"EXECIO * DISKR INJCL (STEM injcl. FINIS)"
"EXECIO * DISKR INJCL (STEM jclline. FINIS)"


In Example1, whenever you read a file with EXECIO into a stemvar, your 'stemvarname.0' variable will contain the number of lines read. Then use a DO loop to copy each stem one by one.

In Example2, you could just use a different stemvarname in the EXECIO parameters, unless you wanted two seperate stems to work from.

In Example3, if you need two seperate stems to work from, use a seperate EXECIO for each stemvarname that you want.

In an EXECIO statement, the stemvarname doesn't have to be the same as the DD name of the dataset.
Back to top
View user's profile Send private message
brgr88

New User


Joined: 05 Mar 2006
Posts: 6

PostPosted: Sun Mar 05, 2006 5:13 am    Post subject:
Reply with quote

Ravi, I forgot to mention... you cannot copy stems by using the base only:
JCLLINE. = INJCL.

will set it up so that any "JCLLINE.x" variable defaults to the text string "INJCL."

If you would like to test this out:
/* rexx */
injcl.1 = "line1" ; injcl.2 = "line2" ; injcl.3 = "line3"
jclline. = injcl.
say jclline.1 jclline.2 jclline.3

The output would be the following text string:
INJCL. INJCL. INJCL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us