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

How to dynamically assign the array variable to store data?


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 124
Location: CT

PostPosted: Wed Sep 10, 2014 2:02 am
Reply with quote

Hi ,

I have the input like :
Code:
INP01A  01
 OUT01A 01
 OUT01B 01
 OUT01C 01
 OUT01D 01
 OUT01E  01
 INP02A  02
 OUT02A 02
 INP03A  03
 OUT03A 03
 OUT03B 03
 OUT03C 03
and so on....

I wrote the code to extract or store first colum data according to same number in second colum. The problem is the input file will have number of input each time ,eg this time 03 , maybe next time 04... So is there any way to dynamically assign the different variable to store these data according to same number in second colum instead of write lot of select ...

Thanks for your help!

Code:
DO CU=1 TO Q                               
   DROP STEPNAME                           
   PARSE VALUE STEP.CU WITH STEPNAME TYPE                           
     SELECT                               
         WHEN TYPE="01"  THEN         
              NAME1.CU = STEPNAME                       
         WHEN TYPE="02"  THEN           
              NAME2.CU = STEPNAME                         
         WHEN TYPE="03"  THEN           
              NAME3.CU = STEPNAME                   
         OTHERWISE                         
     END                                   
  END                                     
                       
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2727
Location: NYC,USA

PostPosted: Fri Oct 03, 2014 3:46 am
Reply with quote

Please highly avoid same post placing into different sections.
ibmmainframes.com/viewtopic.php?p=325562&highlight=#325562
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts Trying to reference a javascript glob... CLIST & REXX 7
No new posts array indexing PL/I & Assembler 4
No new posts Data for newly added fields not displ... IMS DB/DC 5
No new posts passing stem variable with VPUT/VGET ... CLIST & REXX 6
No new posts COBOL Table data to a flat file with ... COBOL Programming 8
Search our Forums:

Back to Top