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 commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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