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

SAVE option without INCLUDE


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madmartinsonxx

New User


Joined: 10 Dec 2010
Posts: 96
Location: Massachusetts

PostPosted: Wed Sep 28, 2011 10:33 pm
Reply with quote

I have a 10 byte input file of account numbers and an output file of 10 bytes. I need to drop duplicates from the input file, but, I need to keep the dropped records. I thought I could use the SAVE option of OUTFIL that I saw from another post but I cannot get the output for the dropped records without using INCLUDE it seems. I tried the following code but all I get is the records sort keeps and not the ones it drops.

Code:

000007 //SORTIN   DD *             
000008 0000000000                 
000009 0000000000                 
000010 0000000001                 
000011 0000000001                 
000012 0000000002                 
000013 0000000003                 
000014 //OUT1     DD SYSOUT=*     
000015 //OUT2     DD SYSOUT=*     
000016 //SYSIN    DD *             
000017   SORT FIELDS=(01,10,CH,A) 
000018   SUM  FIELDS=NONE         
000019   OUTFIL FNAMES=OUT1       
000020   OUTFIL FNAMES=OUT2,SAVE   
000021 /*                         
000022 //                         
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Sep 28, 2011 10:54 pm
Reply with quote

madmartinsonxx,

Once you use SUM FIELDS=NONE , your duplicate records are gone by the time OUTFIL processing is done. You need to use SELECT operator with FIRST option. The following DFSORT/ICETOOL JCL will give you the desired results.
Code:

//STEP0100 EXEC PGM=ICETOOL                               
//TOOLMSG  DD SYSOUT=*                                   
//DFSMSG   DD SYSOUT=*                                   
//IN       DD *                                           
0000000000                                               
0000000000                                               
0000000001                                               
0000000001                                               
0000000002                                               
0000000003                                               
//OUT1     DD SYSOUT=*                                   
//OUT2     DD SYSOUT=*                                   
//TOOLIN   DD *                                           
  SELECT FROM(IN) TO(OUT1) DISCARD(OUT2) ON(1,10,CH) FIRST
//*
Back to top
View user's profile Send private message
madmartinsonxx

New User


Joined: 10 Dec 2010
Posts: 96
Location: Massachusetts

PostPosted: Wed Sep 28, 2011 11:36 pm
Reply with quote

thanks mucho ! i will keep this in my hip pocket.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts SCOPE PENDING option -check data DB2 2
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts CICS vs LE: STORAGE option CICS 0
No new posts INSYNC option with same function as I... JCL & VSAM 0
Search our Forums:

Back to Top