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
 
Eliminating records based on fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
nivethitha_kumar

New User


Joined: 24 Jan 2007
Posts: 11
Location: chennai

PostPosted: Wed Feb 07, 2007 10:56 pm    Post subject: Eliminating records based on fields
Reply with quote

hi
i have two input files

file A
--------

aaaa1111
bbbb2222
cccc3333
aaaa2222
dddd4444

file B
------
cccc4444
fffff55555
gggg6666


i need to compare the files on the first 4 fields alone and need to get all the records tht are present in file A alone...

ie my output should be

output
-------
aaaa1111
bbbb2222
aaaa2222
dddd4444

i do not need cccc3333 as it matches with the first 4 fields of file2 's record cccc

Also like i have pointed out i need to have any duplicates in fileA in my output too... the records tht do not ahve any match in file B...
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Feb 07, 2007 11:39 pm    Post subject:
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes. The output records will be in order by key. If you want the output records in the original input record order, we'd need to change the job to add a sequence number and sort on it. Let me know if you need me to show you how to do that.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN1 DD *
aaaa1111
bbbb2222
cccc3333
aaaa2222
dddd4444
/*
//IN2 DD *
cccc4444
fffff55555
gggg6666
/*
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD SYSOUT=*
//TOOLIN   DD    *
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN1) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(1,4,CH) -
  KEEPNODUPS KEEPBASE -
  WITHALL WITH(1,81) USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:C'BB')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(81:C'VV')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(81,2,CH,EQ,C'VV'),
    BUILD=(1,80)
/*
Back to top
View user's profile Send private message
nivethitha_kumar

New User


Joined: 24 Jan 2007
Posts: 11
Location: chennai

PostPosted: Thu Feb 08, 2007 12:18 pm    Post subject:
Reply with quote

Thank you so much...also i checked out the sorttrck pdf .. are all the syntaxes and functions compatible with ice tool too?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Feb 08, 2007 9:19 pm    Post subject:
Reply with quote

Quote:
also i checked out the sorttrck pdf .. are all the syntaxes and functions compatible with ice tool too?


I don't know what you mean by this. My "Smart DFSORT Tricks" paper shows "tricks" that use functions available with DFSORT and DFSORT's ICETOOL.

If that doesn't answer your question, then please clarify what it is you're asking.
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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 4 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm

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