View previous topic :: View next topic |
Author |
Message |
THRIVIKRAM Beginner
Joined: 03 Oct 2005 Posts: 70 Topics: 34
|
Posted: Tue Jan 05, 2010 4:20 pm Post subject: Displace the fields in the copybook |
|
|
Hi all,
I have a copybook of lenght 2000bytes. I read the MQ record into this copybook(generally the mq record is about 1500 bytes).
If the processing of this record fails, I want to write this message to an Error MQ with some error description appended at the beginning of the mq record.
Ex: MQ record after reading:
apple apple apple apple .......(1500bytes)
I want to displace the mq record in the copybook by 20 bytes to append error message like this:
Error on table XXXXX apple apple apple apple .......(1520bytes)
Could someone help me on how to do this.
Thanks!! |
|
Back to top |
|
 |
Anuj Dhawan Intermediate
Joined: 19 Jul 2007 Posts: 298 Topics: 7 Location: Mumbai,India
|
Posted: Wed Jan 06, 2010 3:37 am Post subject: |
|
|
I'm not sure if I understood it correctly, howerver, I'll try... May be you can add a FILLER as a first elementary item to the copy book and when there is an error, populate your error-message in this FILLER.
OR create a new copy-book something like
Code: | 01 MQ-mesage
05 error-message pic x(20).
05 mq-actual-data pic ?(1500). | and when there is an error "display" mesage from this copybook.
OR you may use redefines as well -- but all depends what exactly you are looking for. _________________ Regards,
Anuj |
|
Back to top |
|
 |
|
|