PaulPeplinski Beginner
Joined: 17 Feb 2006 Posts: 11 Topics: 3
|
Posted: Fri Jul 14, 2006 1:11 pm Post subject: |
|
|
It is difficult to explain. Essentially I need to get fields 1-n from a series of VSAM files to create a new VSAM file to act as a cross reference. I am hesitant to provide specific details so I'll provide an analogy.
Let's say some entity stores automobile data containing make, model, year, VIN (serial number), owner, etc. in slightly different formats. In no case is owner the key or the beginning of the key. I need a cross-reference of all cars arranged by owner.
Three of them store all data for a car in a single record, albeit at a different location. This is the easy part - read a record, move fields to the new file record accordingly and write the record. Same logic, different locations. SYNCSORT FOR Z/OS 1.2.0.0R, Easytrieve or COBOL would all work.
The others store the data for a car in multiple files, say a control record for the auto and one or more detail (owner) records. In this case I'd create one cross-reference record for each owner record, but I'd have to correlate it with its control record (hence the file synchronization issue). Another option is direct reads.
Further complicating this is in some files the control and detail records have the same (partial) key, meaning I can read both files sequentially. However, in other files they are not. There is a field that ties them together so one file would need to be sorted in that order first, which eliminates VSAM direct read approach.
There are over a half-billion input records, so this can be very time-consuming.
Paul |
|