IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting VB to FB using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kirthika

New User


Joined: 27 Apr 2006
Posts: 2

PostPosted: Tue Mar 06, 2007 8:09 pm
Reply with quote

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
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Tue Mar 06, 2007 8:33 pm
Reply with quote

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
View user's profile Send private message
kirthika

New User


Joined: 27 Apr 2006
Posts: 2

PostPosted: Wed Mar 07, 2007 10:50 am
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Mar 07, 2007 12:36 pm
Reply with quote

Hi There,

Which field is basis to remove duplicates?
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Mar 07, 2007 12:43 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
Search our Forums:

Back to Top