jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
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
|
|
|