Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
saagu

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

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: 2504
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.

HTH....

Regards,

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
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 The same REXX program doesnt work for... jackzhang75 CLIST & REXX 5 Wed Dec 06, 2017 2:51 am
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts CA Intertest Batch 555shanth CA Products 0 Tue Nov 28, 2017 11:10 am
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Calling IKJEFT01 program from Rexx upendrasri CLIST & REXX 8 Wed Nov 15, 2017 4:27 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us