Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us