View previous topic :: View next topic
Author
Message
guptae Moderator Joined: 14 Oct 2005Posts: 1208 Location: Bangalore,India
Hi,
I want to split a vb length file to 4 different fb file.
I am able to slit but no able to make them fb length.
Code:
//STEP001 EXEC PGM=SORT
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD SPACE=(CYL,(100)),UNIT=DISK
//SORTWK02 DD SPACE=(CYL,(300)),UNIT=DISK
//SORTWK03 DD SPACE=(CYL,(300)),UNIT=DISK
//SORTWK04 DD SPACE=(CYL,(300)),UNIT=DISK
//SYSIN DD *
SORT FIELDS=(6,65,CH,A)
OUTFIL FILES=1,
INCLUDE=(5,1,CH,EQ,C'A')
OUTFIL FILES=2,
INCLUDE=(5,1,CH,EQ,C'B')
OUTFIL FILES=3,
INCLUDE=(5,1,CH,EQ,C'C')
OUTFIL FILES=4,
INCLUDE=(5,1,CH,EQ,C'D')
/*
//SORTIN DD DSN=TBH2.XOI.DATA,DISP=SHR
//SORTOF1 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DSN=TBH2.SOI.A.DATA
//SORTOF2 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DSN=TBH2.SOI.B.DATA
//SORTOF3 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DSN=TBH2.SOI.C.DATA
//SORTOF4 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DSN=TBH2.SOI.D.DATA
//SYSOUT DD SYSOUT=*
//STATOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
but o/p file length should be...
For A 1009
B 422
C 322
D 122
Please tell me is there any option in sort to change characterstic of o/p file or we need to use any other ieb utility to change record format .
Back to top
guptae Moderator Joined: 14 Oct 2005Posts: 1208 Location: Bangalore,India
I also tried convert option..
Code:
//STEP001 EXEC PGM=SORT
//SORTLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SORTWK01 DD SPACE=(CYL,(100)),UNIT=DISK
//SORTWK02 DD SPACE=(CYL,(300)),UNIT=DISK
//SORTWK03 DD SPACE=(CYL,(300)),UNIT=DISK
//SORTWK04 DD SPACE=(CYL,(300)),UNIT=DISK
//SYSIN DD *
SORT FIELDS=(6,65,CH,A)
OUTFIL FILES=FILE1,CONVERT,
INCLUDE=(5,1,CH,EQ,C'A')
OUTFIL FILES=FILE2,CONVERT,
INCLUDE=(5,1,CH,EQ,C'B')
OUTFIL FILES=FILE3,CONVERT,
INCLUDE=(5,1,CH,EQ,C'C')
OUTFIL FILES=FILE4,CONVERT,
INCLUDE=(5,1,CH,EQ,C'D')
/*
//SORTIN DD DSN=TBH2.XOI.DATA,DISP=SHR
//FILE1 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=1009,BLKSIZE=1009),
// DSN=TBH2.SOI.A.DATA
//FILE2 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=422,BLKSIZE=4220),
// DSN=TBH2.SOI.B.DATA
//FILE3 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=190,BLKSIZE=1900),
// DSN=TBH2.SOI.C.DATA
//FILE4 DD DISP=(,CATLG),UNIT=3380,SPACE=(CYL,(1,1),RLSE),
// DCB=(RECFM=FB,LRECL=407,BLKSIZE=4070),
// DSN=TBH2.SOI.D.DATA
//SYSOUT DD SYSOUT=*
//STATOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
But it's giving syntax error
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Back to top
guptae Moderator Joined: 14 Oct 2005Posts: 1208 Location: Bangalore,India
Frank,
Sorry but can u explain it .
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Not sure what you want me to explain. You have four OUTFIL statements each with CONVERT. You need to add OUTREC=(bytes) to each OUTFIL statement to tell DFSORT which fields from the variable record you want to have in the fixed output records. For example, if you want the first 122 bytes of each VB record in the FILE4 FB output records, you would change that OUTFIL statement to:
Code:
OUTFIL FILES=FILE4,CONVERT,OUTREC=(5,122),
INCLUDE=(5,1,CH,EQ,C'D')
Likewise for the other OUTFIL statements depending on which bytes you want to extract. Notice that the first position in OUTREC= is 5 because presumably you don't want the RDW from positions 1-4.
I can't really tell you much more because I don't know what you're trying to extract from the VB records to the FB records.
Back to top
guptae Moderator Joined: 14 Oct 2005Posts: 1208 Location: Bangalore,India
yeap thanks alot frank...
One more doubt is it compulsory to specify outrec if u include either VTOF or CONVERT
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
Yes, you must specify OUTREC= or BUILD= with VTOF or CONVERT.
(You do not have to specify OUTREC= or BUILD= with FTOV.)
Back to top
guptae Moderator Joined: 14 Oct 2005Posts: 1208 Location: Bangalore,India
Thanks alot ...
Back to top
Please enable JavaScript!