CICS Guy,
I apologize if my comments sounded offensive. No, I don't think you would have MF terminal at your coffee table.
I am not trying to correct you but rather just pointing to the fact that you are overlaying 5th through 7th bytes with values from 8th through 10th bytes and later overlaying 8th through 10th bytes with values from 5th through 7th bytes(which had been overlaid previously). So it should be repeatation of the field(BBB). Please correct me if I am wrong.
Regarding post "move one columns value...", OP wanted to overlay FIELD10 position with SPACES and hence no question about preserving values stored in FIELD10. Here OP needs to shuffle fields and hence needs to preserve both the values.
Unfortunately, I am having connectivity issues and can't test yours as well as my untested version but I promise to test my solution and post it later.
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
sqlcode1 wrote:
but rather just pointing to the fact that you are overlaying 5th through 7th bytes with values from 8th through 10th bytes and later overlaying 8th through 10th bytes with values from 5th through 7th bytes(which had been overlaid previously). So it should be repeatation of the field(BBB). Please correct me if I am wrong.
Regarding post "move one columns value...", OP wanted to overlay FIELD10 position with SPACES and hence no question about preserving values stored in FIELD10. Here OP needs to shuffle fields and hence needs to preserve both the values.
No problem...
Just going on my underlying belief that the simpler explanation is probably the answer, I am assuming the the sort does not modify in place, i.e., the source data is not overlaid and the destination data is not contaminated by a prior move (something we programmers have to be aware of when we code... ).
Overlapping moves are either a disaster or a very 'artful' technique, depending on if you intend to do it......grin....
I'm sure Frank or Skolusu will either confirm or 'cut me a new one' come next week.....
hi, CICS Guy,
in batch process , created record contains key one and key two.
but online process, I want to read all key two records using startbr cics statement.
so, batch file contains key one and key two ,online file contains key two and key one.
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
zawx wrote:
in batch process , created record contains key one and key two.
but online process, I want to read all key two records using startbr cics statement.
so, batch file contains key one and key two ,online file contains key two and key one.
but failed exchange key one and key two.
My english is poor, do you understand?
NO, I do not understand....
CICS Guy wrote:
Please quit providing what you think we need, provide the entire sysins and sysouts of your original problem!
Please provide the information needed to solve your problem!
Since, your shuffled fields are part of your VSAM key, I think you need to rebuild your VSAM file and/or key after conversion.
Looking at ICE218A message, you need either of the method from below.
Code:
INREC BUILD=(1,4,5:8,3,8:5,3,11:11)
SORT FIELDS=(5,3,CH,A, --> your key2 from original file
8,3,CH,A) --> your key1 from original file
this tells dfsort to copy the bytes from 11th position to the end of record.
You may also try below solution. Again untested..(making me scarred and nervous at the same time)…
Code:
INREC IFTHEN=(WHEN=INIT,OVERLAY=(16:5,3)),
IFTHEN=(WHEN=INIT,OVERLAY=(5:8,3,8:16,3,11:11,5))
SORT FIELDS=(5,3,CH,A, --> your key2 from original file
8,3,CH,A) --> your key1 from original file
OUTREC BUILD=(1,15)
CICS Guy,
I think he means to say, he has 2 process (Batch and Online) reading the same input file and these 2 processes expects data by 2 different keys.
1) For CICS he is creating VSAM file by KEY1,KEY2 order.
2) For Batch process, he is creating VSAM file by KEY2,KEY1 order.
Meanwhile, I am not currently working on CICS but I think you really don't have to create one more version of file to meet your requirement.
INREC IFTHEN=(WHEN=INIT,OVERLAY=(16:5,3)),
IFTHEN=(WHEN=INIT,OVERLAY=(5:8,3,8:16,3,11:11,5))
SORT FIELDS=(5,3,CH,A, --> your key2 from original file
8,3,CH,A) --> your key1 from original file
OUTREC BUILD=(1,15)
the sysin run error, target records change to fix length(max length).