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

Syncsort Delete processing!


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

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Thu Jan 20, 2011 9:53 pm
Reply with quote

Hi ,

We have SYNCSORT FOR Z/OS 1.3.2.2RI .

I am trying to process a file in which I'll have to delete the duplicates (leave just one instance of it) and have some exceptions which I will not process.


The exceptions are

????????????
9999999999 records.

The dataset is FB , LRECL = 500

Also, I want the data to be not altered in the output.

Sample Input:


Code:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA         
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             
99999999999999999999999999999999999999999999999999
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC             
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA         
????????????????????????????????????????         
????????????????????????????????????????         
99999999999999999999999999999999999999999999999999
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC             
????????????????????????????????????????         
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA         
99999999999999999999999999999999999999999999999999
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD         
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             
????????????????????????????????????????         
????????????????????????????????????????         
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC             
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA         
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             









Code:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA         
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB             
99999999999999999999999999999999999999999999999999
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC             
????????????????????????????????????????         
????????????????????????????????????????         
99999999999999999999999999999999999999999999999999
????????????????????????????????????????         
99999999999999999999999999999999999999999999999999
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD         
????????????????????????????????????????         
????????????????????????????????????????       



Any suggestions if this can be done and how?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 21, 2011 4:45 am
Reply with quote

Hi,

you can try this
Code:
//STEP0100 EXEC PGM=SYNCTOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN       DD DSN=input file                     
//T1       DD DSN=&&T1,DISP=(,PASS,DELETE),UNIT=SYSDA,                 
//            SPACE=(TRK,(10,5),RLSE)                                   
//OUT      DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
  SORT FROM(IN) TO(T1) USING(CTL1)                                     
  SORT FROM(T1) TO(OUT) USING(CTL2)                                     
/*                                                                     
//CTL1CNTL DD *                                                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(501:SEQNUM,8,ZD)),                   
        IFTHEN=(WHEN=(1,7,CH,EQ,C'9999999'),                           
                OVERLAY=(509:SEQNUM,8,ZD)),                             
        IFTHEN=(WHEN=(1,7,CH,EQ,C'???????'),                           
                OVERLAY=(509:SEQNUM,8,ZD))                             
   SORT FIELDS=(1,500,BI,A,509,8,BI,A)                                 
   SUM FIELDS=NONE                                                     
/*                                                       
//CTL2CNTL DD *                                         
  SORT FIELDS=(501,8,ZD,A)                               
  OUTREC BUILD=(1,500)                                   
/*                                                       



Gerry
Back to top
View user's profile Send private message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Sun Jan 23, 2011 2:23 am
Reply with quote

gcicchet wrote:
Hi,

you can try this
Code:
//STEP0100 EXEC PGM=SYNCTOOL                                           
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN       DD DSN=input file                     
//T1       DD DSN=&&T1,DISP=(,PASS,DELETE),UNIT=SYSDA,                 
//            SPACE=(TRK,(10,5),RLSE)                                   
//OUT      DD SYSOUT=*                                                 
//TOOLIN   DD *                                                         
  SORT FROM(IN) TO(T1) USING(CTL1)                                     
  SORT FROM(T1) TO(OUT) USING(CTL2)                                     
/*                                                                     
//CTL1CNTL DD *                                                         
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(501:SEQNUM,8,ZD)),                   
        IFTHEN=(WHEN=(1,7,CH,EQ,C'9999999'),                           
                OVERLAY=(509:SEQNUM,8,ZD)),                             
        IFTHEN=(WHEN=(1,7,CH,EQ,C'???????'),                           
                OVERLAY=(509:SEQNUM,8,ZD))                             
   SORT FIELDS=(1,500,BI,A,509,8,BI,A)                                 
   SUM FIELDS=NONE                                                     
/*                                                       
//CTL2CNTL DD *                                         
  SORT FIELDS=(501,8,ZD,A)                               
  OUTREC BUILD=(1,500)                                   
/*                                                       



Gerry



Thanks for that...
I'll try that and let you know how it goes...
Back to top
View user's profile Send private message
fredrick andrews

New User


Joined: 10 Jun 2010
Posts: 52
Location: chennai

PostPosted: Wed Jan 26, 2011 3:02 pm
Reply with quote

Worked! Perfectly..
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 DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Delete file row if blanks in the firs... DFSORT/ICETOOL 5
Search our Forums:

Back to Top