Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort Delete processing!

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort Delete processing!
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: 1703
Location: Australia

PostPosted: Fri Jan 21, 2011 4:45 am    Post subject:
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    Post subject:
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    Post subject: Reply to: Syncsort Delete processing!
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    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 processing a XML file in PL/1 grvtomar PL/I & Assembler 2 Fri Jun 09, 2017 1:07 pm
No new posts File processing vishwakotin Mainframe Interview Questions 14 Fri Apr 28, 2017 11:38 am
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us