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 Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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