I'm trying to develop a seemingly simple SPLICE operation where all the input comes from a single dataset. I want to combine several records types into 1 record containing the fields from each input record type. For example I have an input file where various types can appear in a header-trailer1 or header-trailer1-trailer2 or header only sequence of records. There is no key, only the type to work with.
The input sequence of record can look like any of the following: H02 T21 or H02 T21 T22 or H03 T21 or H04 T21 H02 T21 T22 T23 or H02 only H03 only H04 only My output should look like: H02 fields + t21 fields H02 fields + t21 fields + t22 fields H03 fields + t21 fields H04 fields + t21 fields H02 _ t21 + t22 + t23 H02 H03 H04 No sorting is needed, the records are in the desired sequence already. Only the combining of fields is necessary. I've done quite a bit of reading in the DF/SORT APG but could not find a relevant example. I've considered SPLICE but lack a key. I tried WHEN=GROUP but I don't see a method to create a combined record. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
