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

TSQ Deletion by submiting CICS program as batch job


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

New User


Joined: 15 May 2008
Posts: 41
Location: Chennai

PostPosted: Thu May 15, 2008 3:26 pm
Reply with quote

Hi
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.

Thanks
Saagu
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
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.

HTH....

Regards,

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

Global Moderator


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

PostPosted: Thu May 15, 2008 4:56 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
Search our Forums:

Back to Top