although the file is FB, the number of accounts number to the right is variable. fields are padded with spaces to make it fixed block and the max occurrence of the account numbers to the right is 49.
as you see, the first 8 bytes is the primary account and all accounts to the right are secondary accounts. I want to have a list of primary and secondary accounts with the primary accounts on one column and the secondary accounts on the second column. the primary account repeats as the secondary account for each row.
What this does is build one 18 byte record for each possible secondary account (including the first) with the primary account in pos 1-8 and the secondary account in pos 11-18. There will obviously be many, many records where the secondary account will be blank (equal to spaces). The OUTFIL OMIT process eliminates those records that contain a space where the secondary account would start.
Joined: 06 Nov 2008 Posts: 46 Location: Manila, Philippines
Hi Ronald, thanks for the solution.
I have been trying something like that as well, however,
I am getting syntax error on using the slash.
I think you can't use '/' on inrec.
I ran using your sort statement and I got syntax error as follows:
Code:
SYNCSORT FOR Z/OS 1.3.2.2R U.S. PATENTS: 4210961, 5117495 (C
SYSIN :
INREC FIELDS=(001,10,001,08,/,001,10,011,08,/,001,10,021,08,/,
*
001,10,031,08,/,001,10,041,08,/,001,10,051,08,/,
001,10,061,08,/,001,10,071,08,/,001,10,081,08,/,
001,10,091,08,/,001,10,101,08,/,001,10,111,08,/,
.
.
.
WER268A INREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Ahhh,
Unfortunately, you are correct - after taking another look at the manual, I see that it does say that the n/ parameter can only be used on the OUTREC statement within an OUTFIL statement. I missed noting that restriction earlier. Sorry about that.
If you can live with doing it in TWO steps, however, you can do the INREC processing as OUTFIL OUTREC processing in step 1 and the OMIT processing in step 2.