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

how to reject records in file1 whose hse# is presnt infile2


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

New User


Joined: 18 Jan 2008
Posts: 30
Location: mumbai

PostPosted: Thu Apr 02, 2009 1:17 pm
Reply with quote

how to reject records in file1 whose hse# is presnt infile2
HSE number is coomon fields in files.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Thu Apr 02, 2009 3:06 pm
Reply with quote

Please provide some sample of data.
Back to top
View user's profile Send private message
hac

New User


Joined: 18 Jan 2008
Posts: 30
Location: mumbai

PostPosted: Thu Apr 02, 2009 3:41 pm
Reply with quote

File 1
------
HSE data
106`123`qw`
120`999`qe`

File2
------
HSE data
120`567`qw

Output
------
106`123`qw
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Apr 02, 2009 8:43 pm
Reply with quote

hac,

Here's a DFSORT/ICETOOL job that will do what you asked for. I assumed your input files have RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1  EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN1      DD *
106`123`QW`
120`999`QE`
//IN2      DD *
120`567`QW
121`567`QW
/*
//T1 DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//OUT      DD SYSOUT=*
//TOOLIN   DD *
COPY FROM(IN1)  TO(T1) USING(CTL1)
COPY FROM(IN2)  TO(T1) USING(CTL2)
SELECT FROM(T1) TO(OUT) ON(1,3,CH) NODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:C'1')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(81:C'2')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=OUT,INCLUDE=(81,1,CH,EQ,C'1'),
    BUILD=(1,80)
/*
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(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top