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
 
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: 4650
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: 996
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: 4650
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: 2083
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 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
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

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