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

comparing file using sortcard with three keyfields


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

New User


Joined: 23 Jan 2014
Posts: 6
Location: india

PostPosted: Fri Jan 24, 2014 10:58 pm
Reply with quote

Hi,
I hve used pgm=icetool ,sortcard with one keyfield (112,19,CH),but i need to do for two more fields (70,6,CH)and (78,6,PD) within same sortcard,which stores the duplicates and nonduplicates records in separate dataset . The below code works properly for onefield how to do for threefields. Give some sample

Code:

//STEP001 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG    DD SYSOUT=*
//SYSPRINT  DD SYSOUT=*
//SYSOUT    DD SYSOUT=*
//SORTIN    DD DSN=INPUT.FILE1,
//                 DISP=SHR
//NODUPES DD DSN=OUTPUT.NODUP,
// DISP=SHR
//DUPES DD DSN=OUTPUT.DUP,
// DISP=SHR
//TOOLIN DD *
SELECT FROM(SORTIN) TO(NODUPES) -
ON(112,19,CH) NODUPS
SELECT FROM(SORTIN) TO(DUPES) -
ON(112,19,CH) ALLDUPS
/*
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sat Jan 25, 2014 12:19 am
Reply with quote

Code:
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.FILE1,
// DISP=SHR
//NODUPES DD DSN=OUTPUT.NODUP,
// DISP=SHR
//DUPES DD DSN=OUTPUT.DUP,
// DISP=SHR
//TOOLIN DD *
SELECT FROM(SORTIN) TO(NODUPES) -
ON(112,19,CH) NODUPS
SELECT FROM(SORTIN) TO(DUPES) -
ON(112,19,CH) ALLDUPS
/*

Hit Code* after pasting your code to get the ending [/code].
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Sat Jan 25, 2014 1:25 am
Reply with quote

Annie Mary George,

I am not sure as to why you need 2 passes to split the unique and duplicate records. It can all be done in a single pass with DISCARD parameter. You just need to use a separate ON statement for every field you want to validate.

Ex:
Code:

//TOOLIN   DD *                                             
  SELECT FROM(SORTIN) TO(NODUPES) NODUPS DISCARD(DUPES) -   
  ON(112,19,CH) ON(70,6,CH) ON(78,6,PD)                     
//*
Back to top
View user's profile Send private message
Annie Mary George

New User


Joined: 23 Jan 2014
Posts: 6
Location: india

PostPosted: Mon Jan 27, 2014 3:24 pm
Reply with quote

Hey thanks

its working
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top