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 To get Non matching row after compari... vinu78 DB2 7 Fri Jan 05, 2018 5:43 pm
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

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