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
 

 

How to dynamically assign the array variable to store data?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
View previous topic :: :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Wed Sep 10, 2014 2:02 am    Post subject: How to dynamically assign the array variable to store data?
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

Senior Member


Joined: 21 Sep 2010
Posts: 1651
Location: NY,USA

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

Please highly avoid same post placing into different sections.
http://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    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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