Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SAVE option without INCLUDE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: SAVE option without INCLUDE
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    Post subject: Reply to: SAVE option without INCLUDE
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
This topic is locked: you cannot edit posts or make replies. How to save expanded jcl's into one l... enrico-sorichetti CLIST & REXX 13 Thu Jul 27, 2017 2:45 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us