IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

READQ and WRITEQ


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
George Tillmon

New User


Joined: 22 Mar 2010
Posts: 27
Location: Montgomery, AL

PostPosted: Wed May 30, 2012 7:40 pm
Reply with quote

Greetings.

I have a program that uses READQ and WRITEQto perform intermediate calculations before writing to a VSAM file. Is there a better way, other than using the comm-area, to do this?

Since January when writing the records to the VSAM file, it is picking up extraneous information that does not belong to that record. When this program is being used, two users are keying data at the same time.

I am thinking that the code, in the program, needs to be modernized/cleaned up. I am looking for suggestions on replacing the READQ and WRITEQ part.

Thanks,
George
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed May 30, 2012 7:50 pm
Reply with quote

You CAN use the same TSQ, although you really should have separate TSQ's.

To guarantee integrity, you must use ENQ and DEQ API's, which enforces serial access, using a RESOURCE name known by every program which accesses the TSQ. Otherwise, TSQ data integrity will be in question, similar to what you're dealing with now.

You may want to review your TSQ naming convention and build the TSQ name unique to the user and the transaction-id.

TSQ names can now be up to 16-Bytes long, so you have the opportunity for uniqueness.

One last recommendation; Delete the TSQ when you're done or issue a DELETEQ (specifying NOHANDLE) when you're about to write the first TSQ Item (TSQ creation).

Commarea usage can replace the TSQ's. If you're short on extra commarea space, take a look at CONTAINERS, introduced with CICS/TS 3.1.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu May 31, 2012 1:59 pm
Reply with quote

That's an excellent answer, Bill.

Regards,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts READQ TS returning inconsistent addre... CICS 14
No new posts WRITEQ SYSIDERR RESP 53 CICS 5
No new posts Error with WRITEQ - TSQ CICS 4
No new posts More READQ TS on TSQ which is enqued ... CICS 1
No new posts Temporary storage WRITEQ change Main ... CICS 2
Search our Forums:

Back to Top