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
 
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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