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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Reg: 2-Dimensional Variables for Writing in PS using REXX
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: 8593
Location: Back in jolly old England

PostPosted: Tue Feb 19, 2008 5:56 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Tue Feb 19, 2008 6:21 pm    Post subject:
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    Post subject: Thanks for it
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    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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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