View previous topic :: View next topic
|
Author |
Message |
mpawan Warnings : 2 New User
Joined: 03 Nov 2008 Posts: 42 Location: Pune
|
|
|
|
/*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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Where did you set a value for DA.0
It is only set automatically using EXECIO |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Tell us why you would expect 3 for the output. There's nothing wrong with the code. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
d_pansare
New User
Joined: 25 Apr 2009 Posts: 20 Location: Pune
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
d_pansare wrote: |
So it is better to use 0 th element only while dealing with files.... |
this is also BS. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|