View previous topic :: View next topic
|
Author |
Message |
adarsh.bhalke
New User
Joined: 06 May 2007 Posts: 16 Location: pune
|
|
|
|
Hi
my requirement is as follows
1. There are two Input files
File1 - with one of the fields as F1
File2 - with fields F1(same as in file1) and F2
2. One output file should be generated with all the records from
File1 where field F1 of File1 = field F1 of File2
please tell me the solution |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
adarsh,
This was discussed earlier. Search DFSORT fourm. |
|
Back to top |
|
|
ksk
Active User
Joined: 08 Jun 2006 Posts: 355 Location: New York
|
|
|
|
Hi,
You want to do it using DFSORT/ICETOOL only or even without using DFSORT/ICETOOL?
We can write a simple COBOL program to execute your requirement.
Regards,
KSK |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
adarsh.bhalke,
Please show an example of the records in each input file (relevant fields only) and what you expect for output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example. |
|
Back to top |
|
|
adarsh.bhalke
New User
Joined: 06 May 2007 Posts: 16 Location: pune
|
|
|
|
my requirement is like this
File1 one contains
F1 000001 010408SAP4WITA 19991201
F1 000002 010408SAP4WITA 19991201
and file 2 contains
F1 112333 010408SAP4WITA 19991201
Here if first two bytes of file 1 matches with that of file2 then i want all curressponding records of file 1 in output file
I.e.
the output should be as follows
F1 000001 010408SAP4WITA 19991201
F1 000002 010408SAP4WITA 19991201 |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
Code: |
//*******************************************************
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD *
F1 000001 010408SAP4WITA 19991201
F1 000002 010408SAP4WITA 19991201
/*
F1 112333 010408SAP4WITA 19991201
//IN2 DD *
/*
//TMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=SYSDA
//BOTH DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(TMP1) USING(CP01)
COPY FROM(IN2) TO(TMP1) USING(CP02)
SELECT FROM(TMP1) TO(BOTH) ON(1,2,CH) ALLDUPS USING(CP03)
/*
//CP01CNTL DD *
OUTREC OVERLAY=(80:C'1')
/*
//CP02CNTL DD *
OUTREC OVERLAY=(80:C'2')
/*
//CP03CNTL DD *
OUTFIL FNAMES=BOTH,INCLUDE=(80,1,ZD,EQ,1),OVERLAY=(80:C' ')
/*
|
BOTH
Code: |
F1 000001 010408SAP4WITA 19991201
F1 000002 010408SAP4WITA 19991201
|
|
|
Back to top |
|
|
|