MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Displace the fields in the copybook

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Tue Jan 05, 2010 4:20 pm    Post subject: Displace the fields in the copybook Reply with quote

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
View user's profile Send private message Send e-mail
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Wed Jan 06, 2010 3:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group