Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: Extract set of records matching on acct number

$
0
0
Author: bhaskar_kanteti
Subject: Extract set of records matching on acct number
Posted: Mon Mar 06, 2017 7:19 am (GMT 5.5)

Hi,

I have two input files like given below. I need to extract all R* set of records that match on account number in first R record of R01. The problem here is input file 1 is not sorted on account number order.

Input File 1:
- Each account will have set of R* records starting with R01 and ending with R99. Both R01 and R99 will be there for every account.
- Account number will be in R01 record only (sample acct 6623).
- R01 records with account number is not in account number order.

Code:

R01 ABC 6623 100.00 X
R35 MD X
R22 BP X
R61 OPTION X
R48 AP X
R99 X
R01 XYZ 1143 150.00 X
R35 MD X
R74 ADD X
R61 OPTION X
R99 X
R01 DEF 2344 090.00 X
R22 BP X
R54 CELL X
R74 ADD X
R99 X
R01 AAA 3452 125.00 X
R74 ADD X
R61 OPTION X
R99 X
R01 DDD 4398 120.00 X
R22 BP X
R54 CELL X
R61 OPTION X
R35 MD X
R48 AP X
R74 ADD X
R99 X


Input File 2:
Only account numbers with sorted order.

Code:

1143
4398
6623


I should extract all R* records from Input File 1 that matches in Input File 2.

Please let me know how to get this output.
_________________
Bhaskar


Viewing all articles
Browse latest Browse all 8500

Trending Articles