Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

READQ and WRITEQ

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: READQ and WRITEQ
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed May 30, 2012 7:50 pm    Post subject: Reply to: READQ and WRITEQ
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

Senior Member


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

PostPosted: Thu May 31, 2012 1:59 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READQ TS returning inconsistent addre... moezbud CICS 14 Wed May 04, 2016 1:09 am
No new posts WRITEQ SYSIDERR RESP 53 krish2309 CICS 5 Fri May 08, 2015 10:25 am
No new posts Error with WRITEQ - TSQ balukanna CICS 4 Wed Oct 23, 2013 2:20 am
No new posts More READQ TS on TSQ which is enqued ... Rogerio Ferreira Coelho CICS 1 Sat May 01, 2010 1:03 am
No new posts Temporary storage WRITEQ change Main ... wkobylarz CICS 2 Wed May 13, 2009 7:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us