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

Fetch Unmatched records from Input File Using SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Tharageshwari Marukkutti

New User


Joined: 10 Oct 2007
Posts: 12
Location: India

PostPosted: Thu Jun 05, 2008 6:10 pm
Reply with quote

Hi,

Input File1 FILEA:

AAAAA
BBBBB
CCCCC

Input File 2 : FILEB
BBBBB
DDDDD
EEEEE

Expected Output File : OUTA
AAAAA
CCCCC

Simply termed by OUTA=FILEA-FILEB
i.e. The output file should contain the records which are not present in FILEB.
PLease help to acheive this using SORT and not by ICETOOL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 05, 2008 7:02 pm
Reply with quote

ICETOOL is part of SORT.

There are a few examples posted quite recently using the SPLICE function.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Jun 05, 2008 7:11 pm
Reply with quote

Tharageshwari Marukkutti wrote:
PLease help to acheive this using SORT and not by ICETOOL.
Why?
compare two files and write output file with unmatched recor
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Thu Jun 05, 2008 7:35 pm
Reply with quote

Hi,
Please find this jcl with out icetool.

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD  SYSOUT=*                                       
//SORTIN   DD DSN=INPUT.BALU1,DISP=SHR                   
//SORTOUT  DD DSN=OUTPUT.BALU1,DISP=(NEW,CATLG,DELETE), 
//             AVGREC=K,SPACE=(90,(40,40),RLSE),             
//             RECFM=FB,LRECL=80                             
//SYSIN    DD *                                               
 SORT FIELDS=COPY                                             
 OUTREC OVERLAY=(76:C'F')                                     
//*                                                           
//STEP0200 EXEC PGM=SORT                                                   
//SYSOUT   DD  SYSOUT=*                                                   
//SORTIN   DD DSN=OUTPUT.BALU1,DISP=SHR                               
//         DD DSN=INPUT.BALU2,DISP=SHR                               
//SORTOUT  DD DSN=OUTPUT.BALU2,DISP=(NEW,CATLG,DELETE),               
//             AVGREC=K,SPACE=(80,(40,40),RLSE),                           
//             RECFM=FB,LRECL=80                                           
//SYSIN    DD *                                                           
 INREC OVERLAY=(71:C'00001')                                               
 SORT FIELDS=(1,5,CH,A)                                                   
 SUM FIELDS=(71,5,ZD)                                                     
 OUTFILE FNAMES=SORTOUT,BUILD=(1,70,10X),INCLUDE=(71,6,CH,EQ,C'00001F')   
//*                                                                       


But with icetool we can do it in one step.... icon_lol.gif

Thanks,
Balu
Back to top
View user's profile Send private message
Tharageshwari Marukkutti

New User


Joined: 10 Oct 2007
Posts: 12
Location: India

PostPosted: Thu Jun 05, 2008 8:56 pm
Reply with quote

Hi Babu,
Thanks Very much for your Kind Response..It work fine and gives the expected Output.

Like to give a little enhancement over your JCL to give the Output ,if the Input File contains Duplicates.
In step1
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE
OUTREC OVERLAY=(10:C'W')
/*
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
Search our Forums:

Back to Top