View previous topic :: View next topic
|
Author |
Message |
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
hi...
can any one tell me the differnece between non-share tsq and shared tsq.
and how to create non-shared tsq
Thanks in advance |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Perhaps if you tell us what you mean by "non-share tsq" and "shared tsq". The only reference in the CICS Language Reference to "shared" is an option on the GETMAIN statement. |
|
Back to top |
|
|
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
hmm.... unfortunatly i too dont know , i came across these term non-shared and shared in TSQ , so i thinking that this rite site get my question answered i posted here |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
A "non-shared" TSQ does not require exclusive control when being accessed. Typically, this would be a TSQ, whose name is associated with the transid and terminal-id (IE: TRN1TRM1). TSQ's like these are used to hold data outside of (or used in conjunction with), the transaction's commarea and is unique to the given task. They are normally built at the start of the task and should be deleted before task termination (your logic may vary).
A "shared" TSQ is a well-known TSQ, whose name is known by many other program's. To ensure TSQ data integrity (unless the TSQ is Read-Only with a fixed number of items), use of the CICS ENQ and DEQ API's are a necessity to ensure exclusive control. A unique and well-known RESOURCE name is necessary for these API's to work properly. It's best NOT to use the TSQ name as the RESOURCE name. You could use a RESOURCE name which includes the TSQ name, but surrounded by (or includes) different characters to ensure uniqueness. RESOURCE name's can be up to 255-Bytes in length. Also, TSQ names can optionally be 16-Bytes long.
Non-shared TSQ's can either be written to AUX or MAIN storage, whereas, shared TSQ's should be written to MAIN storage and will be automatically deleted when the region is brought down, unless there is a need for the TSQ to be RECOVERABLE, but this requirement is site specific.
EG:
Code: |
03 WS-TSQ-NAME PIC X(08).
03 WS-RSRCE-NAME PIC X(16).
03 WS-RSRCE-LGTH PIC 9(04) BINARY.
MOVE 'UNIQUETS' TO WS-TSQ-NAME.
MOVE '***' TO WS-RSRCE-NAME.
MOVE WS-TSQ-NAME TO WS-RSRCE-NAME (5:8).
MOVE WS-RSRCE-NAME TO WS-RSRCE-NAME (14:).
MOVE LENGTH OF WS-RSRCE-NAME TO WS-RSRCE-LGTH.
* IF THE ENQBUSY CONDITION IS RAISED, THE TASK WILL WAIT AND
* EVENTUALLY, FALLTHRU WHEN CONTROL HAS BEEN RELINQUISHED
EXEC CICS HANDLE CONDITION ENQBUSY END-EXEC.
* ENQ AND GAIN EXCLUSIVE CONTROL OVER THE TSQ RESOURCE
EXEC CICS ENQ RESOURCE(WS-RSRCE-NAME) LENGTH(WS-RSRCE-LGTH) END-EXEC.
* ACCESS TSQ, FALLTHRU AND DEQ ON THE RESOURCE
EXEC CICS DEQ RESOURCE(WS-RSRCE-NAME) LENGTH(WS-RSRCE-LGTH) END-EXEC.
|
Although issuing a DEQ API is optional, it is highly recommended in order to release exclusive control so that the next task can gain exclusive control. If an explicit DEQ is NOT issued, then an implict DEQ is issued by CICS at task termination.
For more information, review your applicable CICS APPLICATION PROGRAMMING REFERENCE and CICS APPLICATION PROGRAMMING GUIDE.
IBM Book Manager ===> publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library
Regards, |
|
Back to top |
|
|
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
Thanks Billl...
Do you mean that no-shared TSQ is reserved for only one CICS region and shared TSQ can be accessed between multiple cics region.
What’s the difference between creating these two TSQ.Do we have to make any table entry for this shared TSQ |
|
Back to top |
|
|
|