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

Reg: 2-Dimensional Variables for Writing in PS using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arun85

New User


Joined: 09 Oct 2006
Posts: 10

PostPosted: Tue Feb 19, 2008 2:48 pm
Reply with quote

Hi, I have designed a REXX program where there is a 2-D variable for Retail where it will have four fields like SNo, Item, Quantity and Rate. Now when I define it, I used the stem as R.I.Sno, R.I.Item etc. Where First Stem R denotes a grouping of a single Item's Details. I denotes a value where it just used for Incrementing to store the consecutive records needed to store and Sno, Item, Rate etc are the main fields which has certain Values.

Now when i Use SAY with R.I.SNo, R.I.Item, the output gets displayed as say 1, Rice etc... Now when i try to write each record in a PS using the REXX command, "EXECIO * DISKW OUTDD (STEM R." and check in File, it is not getting written. My idea was to write each record in the PS which should have all the four fields SNo, Item, Quantity and Rate and not want to write each field in next records. So I tried to group it. Can anyone help me on what command should i give in REXX to get what I require?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Feb 19, 2008 5:56 pm
Reply with quote

It may be helpful if you post your code so that we can see what your are doing for ourselves.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Feb 19, 2008 6:21 pm
Reply with quote

There is no way of writing a two-dimensional array directly using EXECIO. You will have to create a new array (a simple loop-within-a-loop) and write this new array to your dataset.

O.
Back to top
View user's profile Send private message
arun85

New User


Joined: 09 Oct 2006
Posts: 10

PostPosted: Wed Feb 20, 2008 11:41 am
Reply with quote

I too got same kind of Information that we can't write a 2-D array variable in a file. Instead he suggested me to use concatenation operator to append all those values and write that single stem variable. I did like this.

E.i = S.I.Sno + S.I.Item + S.I.Qty + S.I.Rate

then writing E. using Execio command and it worked fine as i needed. Can i know why rexx doesn't allow to write 2-D variable. Also I have one more doubt. I am assigning a value to each index of a stem variable say E.1, E.2 etc. Say i didn't assign a value for E.3 but the values are assigned for E.1, E.2, E.4 & E.5 etc. Now when I display the values, I could see except E.3 all the values assigned are displayed as E.3 alone gets displayed as E.3. But when i use the stem to write in a File using command

Execio * Diskw ddname(Stem E.)

I could find in my file, only the first 2 records gets written and the next set of records E.4, E.5 (which i thought should be written) is not written in the file. Can you tell me why it happens. Also If i try to assign values to each index without interruption, i could see it gets written in the sequence. Thanks in Advance.
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