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

shared and non-shared tsq


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
roopannamdhari
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 71
Location: Bangalore

PostPosted: Sat Apr 04, 2009 8:25 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Apr 04, 2009 9:23 pm
Reply with quote

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
View user's profile Send private message
roopannamdhari
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 71
Location: Bangalore

PostPosted: Sat Apr 04, 2009 9:52 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Sat Apr 04, 2009 9:54 pm
Reply with quote

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
View user's profile Send private message
roopannamdhari
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 71
Location: Bangalore

PostPosted: Sat Apr 04, 2009 10:11 pm
Reply with quote

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
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 Copying Db2 BSDS and logs to another ... JCL & VSAM 11
No new posts how can I access zEDC shared disk fro... Mainframe Interview Questions 3
No new posts VPUT SHARED CLIST & REXX 4
No new posts CICS SOCKET shared between two transa... CICS 3
No new posts Moving files across LPARS through Sha... JCL & VSAM 2
Search our Forums:

Back to Top