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


TSQ Deletion by submiting CICS program as batch job

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message

New User

Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Thu May 15, 2008 3:26 pm    Post subject: TSQ Deletion by submiting CICS program as batch job
Reply with quote

Could anyone help me in deleting TSQ by submitting a CICS program as batch job?

My issue is that i want to delete all the existing TSQ in a particular CiCS region by submitting a job at the end of the day. Can i do that? please illustrate me with an example.

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: Thu May 15, 2008 4:23 pm    Post subject: Re: TSQ Deletion by submiting CICS program as batch job
Reply with quote

You would probably be better off writing a CICS program, running as a non-terminal background task, which begins with an INQUIRE TSQNAME START command/API, followed by an INQUIRE TSQNAME NEXT command. After sucessfully completing the NEXT (EIBRESP=DFHRESP (NORMAL)), determine whether the TSQ is old enough to delete by comparing the amount of time between the current date/time and the LASTUSEDINT keyword of the INQUIRE command (you'll have to do some calculations as LASTUSEDINT is a fullword value in seconds) or is a candidate for deletion, regardless. If the amount of time exceeds your site's criteria or the TSQ can be deleted, then issue a DELETEQ TS command. Then, containing browsing the NEXT TSQNAME, regardless of the action made on the last TSQNAME, until you've reached the end of the TSQ's (EIBRESP=DFHRESP (END)).

However, you must be very careful not to delete TSQ's which belong to IBM, 3rd-Party vendors, etc or you may be looking for another employer. icon_eek.gif

Your program would have to be written to bypass all TSQ's that must not be deleted and it would be advisable to contact your CICS Tech Support personnel and/or CICS System Programmer(s) to determine the names of the TSQ's which cannot and the names which can be deleted.

Your program (transid) can be invoked at CICS Startup time during the 3rd-Stage of the PLT-PI and then within the program, it can issue a deferred start of itself, based upon the site requirements, without requiring manual intervention. For example, an INTERVAL of 10 minutes might be a favorable restart interval after reaching the END of the TSQ's.

The INQUIRE command structure (as well as other commands) requires that your program use the "SP" translator option during translation and sometimes, shops don't allow application programs to issue "System Programmer" commands. You need to verify whether you have the ability to use the "SP" option.

Please review the "CICS System Programming Reference" for your particular version/release. The INQUIRE TSQNAME command accompanied with the LASTUSEDINT keyword was introduced with CICS/TS 1.1, when the Hursley folks rewrote the TSQ DOMAIN logic and functionality.

If the LASTUSEDINT keyword is not available in your INQUIRE TSQNAME API, then your CICS version/release doesn't support it.



Back to top
View user's profile Send private message

Global Moderator

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

PostPosted: Thu May 15, 2008 4:56 pm    Post subject:
Reply with quote

I guess it is easier to write a program to clean up instead of having each program that creates a que also delete when the tran is finshed. I agree this is predicated on using a return tranid in the exit process of a module, but this problem has been around since cics began and most shops have found a way to delete unnecessary tsqs.

I could see this as a repeated process during the day, but why at the end of day? Is CICS 'SHUT DOWN' at the end of day?

if cics is not brought down at the end of day (at our shop most cics regions are 24/7) then either this, as bill said, possibly dangerous methodolgy (run a job) or properly write the programs that create the tsqs to delete them at the appropriate time.

At my current client, we have some 400 TSQ possibilites in one application alone, and unless the user is 'disconnected' and does not re-connect, each program recognizes when transfer is to change (dfhaid = ? or new tranid) and deletes the tsq before exiting. we have some 8000 users (400 x 8000) and this would leave just too many ques to have sitting around until a separate job deletes them.

though it will work (your separate job whether batch or cics) i feel it is a sledgehammer approach to correcting what should be programmatically accomplished by the que creating program.

but, that is just my opinion.
Back to top
View user's profile Send private message
Earl Haigh

Active User

Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat May 17, 2008 3:53 am    Post subject:
Reply with quote

You can't delete CICS TSQ's from batch UNLESS you write your own EXCI processing OR use a 3rd party product.

Try google search on>> batchcics
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 Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm
No new posts ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm

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