I have a file that has the following records (mainframe):
000001 RCVJXXXX 004 RCVJXXXX 000 ALL *NONE* *NONE* 005 015 1482 14345/1215
000002 DSN=REMOTE1.JOHN.AUT1
000003 DSN=REMOTE1.USER.CONT.DSN
000004 DSN=REMOTE1.JOHN2.TEMP
000005 DSN=REMOTE1.USER.CLIST
000006 DSN=REMOTE1.USER.PARMLIB
000007 RCVCXXX1 004 RCVCXXX1 000 ALL *NONE* *NONE* 005 015 0291 10029/1144
000008 DSN=REMOTE1.CENDA.AUTH1
000009 DSN=REMOTE1.USER.CONTEN.DSN
000010 DSN=REMOTE1.CEN3.TEMP
000011 DSN=REMOTE1.USER.CLIST
I need to code REXX to pull the jobname on line 1 and then create an output with that jobname plus the dataset in line2 then another line with the same jobname plus line 3 and so on. Then, when it encounters another jobname (line 7), repeat the process with the datasets below that jobname. I am not that familiar with REXX and am at a lost right now. Could someone help me? Thanks.
000001 RCVJXXXX 004 RCVJXXXX 000 ALL *NONE* *NONE* 005 015 1482 14345/1215
000002 DSN=REMOTE1.JOHN.AUT1
000003 DSN=REMOTE1.USER.CONT.DSN
000004 DSN=REMOTE1.JOHN2.TEMP
000005 DSN=REMOTE1.USER.CLIST
000006 DSN=REMOTE1.USER.PARMLIB
000007 RCVCXXX1 004 RCVCXXX1 000 ALL *NONE* *NONE* 005 015 0291 10029/1144
000008 DSN=REMOTE1.CENDA.AUTH1
000009 DSN=REMOTE1.USER.CONTEN.DSN
000010 DSN=REMOTE1.CEN3.TEMP
000011 DSN=REMOTE1.USER.CLIST
I need to code REXX to pull the jobname on line 1 and then create an output with that jobname plus the dataset in line2 then another line with the same jobname plus line 3 and so on. Then, when it encounters another jobname (line 7), repeat the process with the datasets below that jobname. I am not that familiar with REXX and am at a lost right now. Could someone help me? Thanks.