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
 
comparing file using sortcard with three keyfields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: comparing file using sortcard with three keyfields
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    Post subject:
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    Post subject: Reply to: comparing file using sortcard with three keyfields
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    Post subject:
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    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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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