My requirement is I have to overlay the 9,5 chars from 'CSE00641' record to 'CSE04011' record and then convert all the 'CSE04011' to 'CSE00645'. Can this be accomplished in dfsort?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Huh? Your explanation makes no sense and doesn't match your input/output.
For example, I see the following in positions 1-8 in your fifth input record:
CSE0401I
and the following in positions 1-8 in your fifth output record:
CSE00645
If you said you wanted to change 'CSE0401I' in positions 1-8 to 'CSE0645', that would make sense.
But instead you say you want to "overlay the 9,5 chars from 'CSE00641' record to 'CSE04011' record and then convert all the 'CSE04011' to 'CSE00645'". How does that relate to the input and output you show? What is 9,5? Why would you want to do a double conversion instead of a single conversion? I don't see any change to the 'CSE00641' input records.
I can show you how to do what you want to do with DFSORT, but first you have to do a better job of explaining what you want to do in terms of an example of input and output that makes sense.
I was in a hurry so didn't do a good job of explaining what I want. I will rephrase my requirements.
There will be only one 'CSE00641' (1,8) for each 'ARP1' (14,4). But there can be more than one 'CSE04011' (1,8) for each 'ARP1' (14,4).
1) By "overlay the 9,5 chars from 'CSE00641' record to 'CSE04011' record" I meant, if (1,8) is 'CSE00641' copy (9,5) from this record and paste it to (9,5) in record where (1,8) is 'CSE04011', for the corresponding 14,4 (ARP1).
2) The next requirement is to change all 'CSE04011' to 'CSE00645' in (1,8).
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Yes, that's more clear.
However, it appears that each group of records starts with a CSE0641 record and you want to propagate the LTx value from that record to the rest of the records in the group. Is that true? Or is it possible that another record of the group (e.g. CSE0642) would have a different LTx value than the CSE0641 record for that group? Propagating the LTx value to each record of the group and changing each CSE0411 to CSE00645 would be easier than what you described.
You are right CSE00641 will not have a different LTX than CSE00642,3,4 with in the same group of (14,4). You restated the requirement exactly as I wanted but more clearly.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can now do this more easily and efficiently with DFSORT's new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this: