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
 

 

Fetch Unmatched records from Input File Using SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Fetch Unmatched records from Input File Using SORT
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 05, 2008 7:02 pm    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Thu Jun 05, 2008 7:11 pm    Post subject: Re: Fetch Unmatched records from Input File Using SORT
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    Post subject: Reply to: Fetch Unmatched records from Input File Using SORT
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    Post subject: Reply to: Fetch Unmatched records from Input File Using SORT
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am


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