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- problem with Include condition

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

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Fri May 21, 2010 2:57 pm    Post subject: SYNCSORT- problem with Include condition
Reply with quote

Hi,

I have a requirement to remove the duplicates from a given file
The length of records is 5

Code:
11111
22222
11111
33333
11111


I am using SYNCSORT,

Code:
//SYSIN  DD *                                 
  SORT FIELDS=(1,5,CH,A) EQUALS               
  OUTREC IFTHEN=(WHEN=INIT,                   
  BUILD=(1,5,6:SEQNUM,4,ZD,RESTART=(1,5))) 
  INCLUDE COND=(6,4,ZD,EQ,1)                 
/*     


Upto Build, it's working fine.. But include condition is not working

Output : If I remove the include condition, it's correctly coming as

Code:
111110001
111110002
111110003
222220001
333330001


I need those records with seqnum 0001. But if I give the Include condition,
it results in no output. Can't I apply condition to out rec?

I got many other options to remove duplicates. But I want to know, what is the problem with this sort card
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Fri May 21, 2010 3:13 pm    Post subject:
Reply with quote

Quote:
Upto Build, it's working fine.. But include condition is not working

Because it(COND) is precessed before your SORT FIELDS\OUTREC is applied...
Use OUTFIL INCLUDE=(6,4,ZD,EQ,1) instead
Back to top
View user's profile Send private message
lokeshwar_manoharan

New User


Joined: 22 Sep 2008
Posts: 49
Location: Chennai,Tamilnadu

PostPosted: Tue May 25, 2010 4:29 pm    Post subject:
Reply with quote

Thanks Escapa
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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 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