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: 125
Location: US

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: 3076
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 Excuting store procedure via JCL batch JCL & VSAM 1
No new posts Executing DB2 SQL store procedure via... DB2 0
No new posts db2 vs static data COBOL Programming 1
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts External data queue (changes?) CLIST & REXX 0
Search our Forums:

Back to Top