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
 

 

REXX Stem Variables

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

New User


Joined: 03 Nov 2008
Posts: 42
Location: Pune

PostPosted: Tue Jul 07, 2009 5:21 pm    Post subject: REXX Stem Variables
Reply with quote

/*REXX*/
DA. = " " ;
DA.1 = 1
DA.2 = 2
DA.3 = 3
SA = DA.0
SAY SA

I am expecting 3 as the output but i am not getting it can you please tell me whats wrong in the code.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 07, 2009 5:23 pm    Post subject:
Reply with quote

Where did you set a value for DA.0

It is only set automatically using EXECIO
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Jul 07, 2009 5:24 pm    Post subject: Reply to: REXX Stem Variables
Reply with quote

Tell us why you would expect 3 for the output. There's nothing wrong with the code.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Jul 07, 2009 5:30 pm    Post subject:
Reply with quote

The 'zero-th' stem variable is not populated by assigning values to any of the other stem variables. You should update DA.0 with whatever value you want - it's just another (stem) variable.

Garry
Back to top
View user's profile Send private message
d_pansare

New User


Joined: 25 Apr 2009
Posts: 20
Location: Pune

PostPosted: Tue Jul 07, 2009 8:46 pm    Post subject:
Reply with quote

0 the elemet would be populated only if you read the file on stem variable.. and yeah there is catch.. you got to move the total number of records in 0 th element before you write the file..

So it is better to use 0 th element only while dealing with files....
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Jul 07, 2009 8:48 pm    Post subject:
Reply with quote

d_pansare wrote:
you got to move the total number of records in 0 th element before you write the file..


That's not true.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Tue Jul 07, 2009 9:06 pm    Post subject:
Reply with quote

d_pansare wrote:
So it is better to use 0 th element only while dealing with files....


this is also BS.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2050
Location: Silicon Valley

PostPosted: Tue Jul 07, 2009 9:10 pm    Post subject: Reply to: REXX Stem Variables
Reply with quote

Quote:
It is only set automatically using EXECIO


Not true. Other system functions, such as GETMSG or OUTTRAP will also set the zero-eth element. But it is far from universal.
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 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
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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