Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 115
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: 1788
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us