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
 
Remove duplicates from VB file and write into FB file using

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 36
Location: Chennai

PostPosted: Sat Jul 09, 2011 12:15 am    Post subject: Remove duplicates from VB file and write into FB file using
Reply with quote

Hello,

I have a input file with Variable length and it contains records in the following manner:

First 7 bytes is record type and next 14 bytes is key

Code:

HEADER1
A000010123456A0000010
B000010123456A0000010
C000010123456A0000010
A000010123456A0000011
B000010123456A0000011
C000010123456A0000011
TRAILER1
HEADER2
A000010123456A0000012
B000010123456A0000012
C000010123456A0000012
A000010123456A0000010
B000010123456A0000010
C000010123456A0000010
TRAILER2


I'm trying to write duplicate records into SORTXSUM dataset (FB) using below JCL, but its giving error with user abned U0016 and the error message is also shown below:

Code:

//SORT01   EXEC  PGM=SORT                                             
//SORTIN   DD DSN=GDGT.TEST.INPUT.G0024V00,DISP=SHR           
//SORTOUT  DD DSN=TEST.OUT1.UNQRCD,                       
//            DISP=(,CATLG,CATLG),                     
//            SPACE=(CYL,(1,1),RLSE),UNIT=(SYSDA,8)                   
//SORTXSUM DD DSN=TEST.OUT2.DUPRCD,                       
//            DISP=(,CATLG,CATLG),                   
//            SPACE=(CYL,(1,1),RLSE),UNIT=(SYSDA,8)                   
//SYSIN    DD *                                                       
   SORT FIELDS=(1,80,CH,A)                                             
   OUTFIL FNAMES=SORTOUT,OUTREC=(1:5,7,8:20,14,22:59C' '),CONVERT     
   INCLUDE COND=(5,7,CH,EQ,C'A000010')                                 
   SUM  FIELDS=NONE,XSUM                                               
   OUTFIL FNAMES=SORTXSUM,OUTREC=(1:5,7,8:20,14,22:59C' '),CONVERT     
//SYSOUT      DD SYSOUT=*                                       


Error message:
Code:

SYSIN :                                                           
   SORT FIELDS=(1,80,CH,A)                                         
   OUTFIL FNAMES=SORTOUT,OUTREC=(1:5,7,8:20,14,22:59C' '),CONVERT 
   INCLUDE COND=(5,7,CH,EQ,C'A000010')                             
   SUM  FIELDS=NONE,XSUM                                           
   OUTFIL FNAMES=SORTXSUM,OUTREC=(1:5,7,8:20,14,22:59C' '),CONVERT
WER202A  SORTXSUM RECFM INCOMPATIBLE                               


Could any of you please help me out to get the duplicates in SORTXSUM dataset and unique records in SORTOUT dataset. Output files are FB and Input file is VB.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Sat Jul 09, 2011 1:50 am    Post subject: Reply to: Remove duplicates from VB file and write into FB f
Reply with quote

Krishna, I cleaned up your original JCL to make it look at least somewhat right for a SORT job. Now, I don't have access to Syncsort manuals, but I'd think that first, you'd need to change your SORT statement so that you're not including the RDW of your VB dataset in the sort. It should probably be:

SORT FIELDS=(5,80,CH,A)

as far as SORTXSUM, maybe you should try letting the product determine what the output should look like, and see what it does.
Back to top
View user's profile Send private message
Krishnadeva Reddy

New User


Joined: 14 Nov 2007
Posts: 36
Location: Chennai

PostPosted: Mon Jul 11, 2011 6:56 pm    Post subject: Reply to: Remove duplicates from VB file and write into FB f
Reply with quote

Thanks superK.

I have changed the SORT condition to SORT FIELDS=(20,14,CH,A)
to sort based on the key values and identify duplicate keys.

Code:

//SORT01   EXEC  PGM=SORT                                             
//SORTIN   DD DSN=GDGT.TEST.INPUT.G0024V00,DISP=SHR           
//SORTOUT  DD DSN=TEST.OUT1.UNQRCD,                       
//            DISP=(,CATLG,CATLG),                     
//            SPACE=(CYL,(1,1),RLSE),UNIT=(SYSDA,8)                   
//SORTXSUM DD DSN=TEST.OUT2.DUPRCD,                       
//            DISP=(,CATLG,CATLG),                   
//            SPACE=(CYL,(1,1),RLSE),UNIT=(SYSDA,8)                   
//SYSIN    DD *                                                       
   SORT FIELDS=(20,14,CH,A)                                             
   OUTFIL FNAMES=SORTOUT,OUTREC=(1:5,7,8:20,14,22:59C' '),CONVERT     
   INCLUDE COND=(5,7,CH,EQ,C'A000010')                                 
   SUM  FIELDS=NONE,XSUM                                               
   OUTFIL FNAMES=SORTXSUM,OUTREC=(1:5,7,8:20,14,22:59C' '),CONVERT     
//SYSOUT      DD SYSOUT=*                                       


Still trying, no luck.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Jul 11, 2011 8:06 pm    Post subject:
Reply with quote

Hello,

Once again, a basically wasted iteration. . .

DO NOT POST "It didn't work". . . . icon_sad.gif

Why did you not post the diagnostic information generated by the most recent run?
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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

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