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

Storage problem


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

New User


Joined: 19 Dec 2009
Posts: 16
Location: Mumbai

PostPosted: Tue Apr 19, 2011 2:38 pm
Reply with quote

Hi,

i have a storage related problem. So needed suggestion for it.

i have one CICS screen which displays one table. the table is currently defined in COMM-AREA with 200 OCCURS clause.

Now what is happening is due to increase in data we have a need to increase the OCCURS clause, but to bring a permanent solution, we are trying to store the data in VSAM file and retrieve the data to be displaced on the screen when page up and page down is pressed.

So what is the best way to do this?
1) Use VSAM file to store the table
2) I have a vague idea about TDQ and TSQ
3) or any other way to do this ?

Im new to CICS programming, simultaneously im reading TDQ and TSQ to get more idea about what it is.

Thanks a lot 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: Tue Apr 19, 2011 3:56 pm
Reply with quote

You need to talk to your team leader, coworkers, or site support group. Most sites have some standard method for paging in CICS that they expect you to follow. Going off on your own is not typically a good idea.
Back to top
View user's profile Send private message
rackshit

New User


Joined: 19 Dec 2009
Posts: 16
Location: Mumbai

PostPosted: Tue Apr 19, 2011 8:01 pm
Reply with quote

Robert Sample wrote:
You need to talk to your team leader, coworkers, or site support group. Most sites have some standard method for paging in CICS that they expect you to follow. Going off on your own is not typically a good idea.



Thanks Robert for a quick reply.

I have some questions which might help me.
1) Can a TSQ be limited to a single task. I mean to say if a transaction is initiated from one user terminal then it should have one TSQ and for the same transaction initiated from other terminal at the same time should created another TSQ so that data integrity is there.

2) Similar to above question what if a VSAM file is filled with data with help of one task running and the same program is invoked with a seperate task initiated from other terminal, then will the vsam be locked for access ?


I want to access data unloaded from database for a transaction Tx initiated from a terminal T1 and it should not interfere with data unloaded with help of transaction Tx from a terminal T2.

I hope you are able to understand the scenario. I lag CICS knowledge in this area and am going through the manuals but need some assistence.

Thnx a lot 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: Tue Apr 19, 2011 8:17 pm
Reply with quote

1. TSQ names are 8 bytes (if you use QUEUE) or 16 bytes (if you use QNAME). 4 of those bytes could be the terminal identifier -- which will be unique for that user in that region. Typically, terminal identifier is combined with something to make a unique name for the TSQ.

2. VSAM locks at the CI level, depending on the SHROPTIONS. If you're doing nothing but reads, there won't be any locking involved. If you are doing updates, as long as the updates are in different CI you're okay. Otherwise, the second task to attempt to lock the CI (usually) waits for the CI to be released (depending on how you code the program). The VSAM Demystified Redbook can be very helpful in understanding concepts for VSAM files.
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: Tue Apr 19, 2011 8:49 pm
Reply with quote

Adding to Robert's reply, if accessing the TSQ/QNAME is to be done by multiple concurrent tasks, then to ensure data integrity, you'll need ENQ/DEQ API's for serialisation in all program's which access the QUE.

Bill
Back to top
View user's profile Send private message
rackshit

New User


Joined: 19 Dec 2009
Posts: 16
Location: Mumbai

PostPosted: Tue Apr 19, 2011 10:39 pm
Reply with quote

Bill O'Boyle wrote:
Adding to Robert's reply, if accessing the TSQ/QNAME is to be done by multiple concurrent tasks, then to ensure data integrity, you'll need ENQ/DEQ API's for serialisation in all program's which access the QUE.

Bill


Thnx Robert and Bill.

Bill, Each task needs to have a different TSQ so associating the queue name to the terminal will suffice as said by Robert.

The users are trying to view data from database on the screen, and there is paging done. But since the COMM-AREA has limitation the requirement is to do some other way. So I will be trying to test with TSQ.

Is there any limit on storage limit on TSQ ?

if you feel this method wont work let me know. I have gone through the manuals and got some idea of extra partition and intra partition. So if i have not wrongly understood, extra partition can help me to store the TSQ on DASD ?

thnx in advance ! 824.gif
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: Tue Apr 19, 2011 11:20 pm
Reply with quote

If for some reason, the terminal gets logged-off and the TSQ remains, there's the possibility that the terminal could be reused (via terminal Autoinstall) and attached to the same transaction, the program may "Think" the TSQ data is correct.

So, whenever the logic in your process knows that this is the initial TSQ creation, first issue a DELETEQ (with NOHANDLE), to ensure you're starting from scratch with a new TSQ.

This is where the 16-Byte QNAME could come in handy as you could build the QNAME with EIBTRNID, then EIBTRMID and finally EIBTASKN (Unpacked as a PIC 9(08)).

EG: TRN1TRM100123456

Also -

MAX NUMBER OF ITEMS ===> 32767 (Signed Halfword)

MAX ITEM LENGTH ===> 32763 (Signed Halfword)

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Apr 20, 2011 1:08 am
Reply with quote

if the table does not have an index,
after design of a paging method,
create one.

basic concept: do not think that you are saving time by storing everything that the user may want to see. learn to save the current first and last of the display, and based on PF7 or PF8 get the next or get the previous.

no user is going to go thru 10 or 15 screens looking at garbage.
if the data needs to be extracted and downloaded, use unload and com:direct.

the problems
  • of orphan queues
  • user not paging down or back
preclude the unnecessary waste of resources to build everything in memory ahead of time. That is why we have cursors. they can be reopened at some starting point.

anyone who is telling you to use TSQ's or commarea, to build it all,
does not have the skills to write a professional program.

yes this is a personal opinion. and opinions are like assholes,
and i am an asshole,
i have no time for rookie bullshit.
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 CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts CICS vs LE: STORAGE option CICS 0
No new posts Insufficient Storage ABENDS & Debugging 7
No new posts z/vm installation problem All Other Mainframe Topics 0
Search our Forums:

Back to Top