Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1239
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us