View previous topic :: View next topic
|
Author |
Message |
kirthika
New User
Joined: 27 Apr 2006 Posts: 2
|
|
|
|
While converting the VB (input) file to FB file ,the SUM FIELDS=NONE is not working(ie Duplicates aren't removed)
The Sysin card goes like this
SORT FIELDS=COPY
INCLUDE COND=(60,2,CH,EQ,C'AN',
OR,60,3,CH,EQ,C'ANI')
SUM FIELDS=NONE
OUTFIL FNAMES=FB1,VTOF,OUTREC=(31,19)
SUM FIELDS=NONE works for FB to FB /VB to VB.
Can anyone suggest a way to do this ? (I want this to work in the same step) |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Here are some same JCL for converting VB to FB using SYNCSORT:
In SYNCSORT, you can convert variable to fixed by coding the CONVERT parameter on the OUTREC control cards:
Code: |
//S4SORT EXEC PGM=SORT
//SORTIN DD DSN=INPUT.VARIABLE.FILE,DISP=SHR <=Variable input
//SORTOUT DD DSN=OUTPUT.FIXED.FILE, <===== Fixed output
// DISP=(NEW,CATLG,DELETE),
// UNIT=(SYSDA),SPACE=(TRK,(50,15),RLSE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC FIELDS=(1:1,4,
6:6,74)
SORT FIELDS=(62,8,CH,A)
OUTFIL OUTREC=(1:1,4,
6:6,74,
80:C' '),CONVERT
|
|
|
Back to top |
|
|
kirthika
New User
Joined: 27 Apr 2006 Posts: 2
|
|
|
|
You are correct . We can use CONVERT or VTOF option for this .
Actually the problem here is that it does not remove duplicates(even though i had put SUM FIELDS=NONE). |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Which field is basis to remove duplicates? |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Just specify the field on which u want to remove duplicate in sort fields then it will remove the duplicate
like this
Code: |
SORT FIELDS=(6,65,CH,A)
SUM FIELDS=NONE
OUTFIL FILES=A,CONVERT,OUTREC(5,1005),
INCLUDE=(5,1,CH,EQ,C'A') |
|
|
Back to top |
|
|
|
|