Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Converting VB to FB using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Converting VB to FB using SYNCSORT
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    Post subject: Re: VB to FB using SYNCSORT
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    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Mar 07, 2007 12:36 pm    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Wed Mar 07, 2007 12:43 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us