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

SYNCSORT- problem with Include condition


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
Search our Forums:

Back to Top