IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX Stem Variables


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Jul 07, 2009 5:23 pm
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

Global Moderator


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

PostPosted: Tue Jul 07, 2009 5:24 pm
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Jul 07, 2009 5:30 pm
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
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

Global Moderator


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

PostPosted: Tue Jul 07, 2009 8:48 pm
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: 6966
Location: porcelain throne

PostPosted: Tue Jul 07, 2009 9:06 pm
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

Global Moderator


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

PostPosted: Tue Jul 07, 2009 9:10 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top