Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
position of xxucat01 = 22 and for Namea also 22 |
Does that starting position count the 4 byte RDW and 1 byte carriage control character, or is it the data position so the real position is 22+5 = 27?
What is the starting position of 'catalog'?
What is the starting position of 'alias'?
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Rolant_Achtsnit,
The following DFSORT JCL will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your input 133 vba dataset,disp=shr
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(10,7,CH,EQ,C'CATALOG'),
PUSH=(31:22,8))
OUTREC IFTHEN=(WHEN=INIT,
OVERLAY=(22:22,22,SQZ=(SHIFT=LEFT,LEAD=C'(',MID=C') REL(',
TRAIL=C'))')))
OUTFIL INCLUDE=(16,5,CH,EQ,C'ALIAS'),
BUILD=(1,5,C'DEFINE ALIAS (NAME',22,22,133:X)
/* |
|
|