Joined: 10 Dec 2010 Posts: 96 Location: Massachusetts
Hi,
I have a Parmlib (80 bytes) that holds keys that are in an 319 byte data set at posiition 35 and can be 20 bytes long. This parmlib member gets updated frequently so the requirement changes and I have to run a report which I have been asked to overhaul.
Code:
---3----+----4--
@....06 20870709
3615 0000000 0
my task is to find that key and get the order number at 24,04,PD from F1.
Then from the order file (F2) 45,7,ZD LRECL 1034 bytes:
find the F1 order number and write out the F1 data and the F2 data as one record with Reformat probably.
Only have the starting key for this req. I checked posts for UNPAIRED and could not identify a workable solution that I could plagarize.
Thanks again.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
So you have three files?
First, an 80-byte record where there is plain text "numbers". One, or more than one?
Then you use that to get the order number on the "first file". Then you get the matches against order number on the 2nd file, outputting a comined record from first and second files.
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
madmartinsonxx wrote:
yes, 3 files.
first file ( the numbers) ,no duplicates there and more than one.
yes, get matches on second file from the numbers file ( could be duplicates in second file).
Yes, use order number from second file to get order number ( no duplicates).
All files are FB and output is combined 'second' and 'third' full lrecl.
Unpaired / Paired was how i was thinking about trying to get done. Wasn't sure how to work that though.
madmartinsonxx,
You really confuse people with your requirements. I am not sure as to why you complicate simple requests.
Lets start over again. So far I got this . Answer all the fields that have ????
Code:
FILE-NAME RECFM LRECL KEY AND REQUIREMENTS
PARMFILE FB 80 20 BYTES IN POS 1
FILE-1 FB ???? CHECK FOR PARMFILE VALUE IN POS 319
IF EQUAL THEN USE THE VALUE AT POS 24
FOR 4 BYTES IN PD FORMAT AS KEY.
THIS WILL BE MATCHED TO ZD FORMAT KEY
IN FILE-2 AT POS 45 FOR A LENGTH OF 7
FILE-2 FB 1034 ZD KEY FOR LENGTH OF 7 AT POS 45
OUTPUT FB ???? MATCHED RECORD FROM FILE-1 AND FILE-2 ??
UNMATCHED RECORDS FROM FILE-2 ??
UNMATCHED RECORDS FROM FILE-1 ??
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
madmartinsonxx wrote:
FILE-1 FB ???? s/b 391
OUTPUT FB ???? s/b 1034 (order record)
MATCHED RECORD FROM FILE-1 AND FILE-2 ?? s/b 1034 (order record)
UNMATCHED RECORDS FROM FILE-2 ?? s/b discarded, bit bucket
UNMATCHED RECORDS FROM FILE-1 ?? s/b discarded, bit bucket
What is s/b discarded, bit bucket mean? S/B stands for Should be? Can we stick to plain English instead of Chat/Twitter language ? This job gets you all the matched records from the file with LRECL 1034