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

 

Task Number Active/Runing..

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

New User


Joined: 31 Jan 2008
Posts: 5
Location: USA

PostPosted: Thu Jan 31, 2008 10:30 pm    Post subject: Task Number Active/Runing..
Reply with quote

Hi,

I do have a question on CICS Task Number .

I want to know how to find if the task is still running/active. I need to check this in the CICS-COBOL program (Not using CEMT commnad on the CICS screen).

I have a task number stored in database and I want to check if this task is still active or not.

Please let me know and appreciate your help and time.

Thanks
Jairam
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Jan 31, 2008 11:16 pm    Post subject:
Reply with quote

Hello,

Quote:
I have a task number stored in database and I want to check if this task is still active or not.
How did the task number get into the database? Might it be possible to make a mark in the same row when the task ends (using something similar to whatever put the task number in the database in the first place)?

I suggest that because trying to find a task across one or more CICS regions from within an application program may take more work than is feasible. The way we did things like this ages ago was to "chase control blocks" and find what we needed. This meant writing in assembler and was vulnerable to system upgrades when "things change".
Back to top
View user's profile Send private message
Jairam21

New User


Joined: 31 Jan 2008
Posts: 5
Location: USA

PostPosted: Thu Jan 31, 2008 11:29 pm    Post subject: Reply to: Task Number Active/Runing..
Reply with quote

Thanks for your response.
Once the task completes successfully (means program) I will delete it from the database. At the start of the transaction the Program will insert the task number.

I tried using INQUIRE supplying the task number from table and I am getting response code as 00000091 where i don't what this repsonse code means.

If this task number processing involved assembler level coding, then I will drop this idea in my program functionality.

Thanks
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Feb 01, 2008 12:20 am    Post subject: Task Number Active/Runing..
Reply with quote

Probably the easiest to use, would be to issue -

Code:

03  WS-TASK-NBR PIC S9(07) COMP-3.

EXEC CICS INQUIRE TASK(WS-TASK-NBR) NOHANDLE END-EXEC.

IF  EIBRESP = DFHRESP(TASKIDERR)
    PERFORM TASK-NOT-RUNNING
ELSE
    IF  EIBRESP NOT = DFHRESP(NORMAL)
        PERFORM SOME-OTHER-ERROR
    END-IF
END-IF.


I'm assuming that WS-TASK-NBR contains the task-nbr in question.

However, if your shop standards don't allow you to specify the Translator (NOT Compile) Option "SP" (System Programmer), then you wouldn't be able to use this.

Keep in mind that if you're in an MRO and/or CICSPLEX environment and the task is running in a different region, you'd have to specify the REMOTESYSTEM parameter, which is essentially the SYSID of the target region.

HTH....

Regards,

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Feb 01, 2008 12:35 am    Post subject:
Reply with quote

Hello,

Quote:
you'd have to specify the REMOTESYSTEM parameter, which is essentially the SYSID of the target region
Would this also need to be put into the database to be available to the code that checks if the task is still running?
Back to top
View user's profile Send private message
Jairam21

New User


Joined: 31 Jan 2008
Posts: 5
Location: USA

PostPosted: Fri Feb 01, 2008 2:57 am    Post subject:
Reply with quote

Thanks for your replies guys. I will code it as given by Bill and will test it.
I will update the forum once I am done with the testing.

Appreciate your timely help.

Jairam
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 SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts how to mask the phone number kumarinfy DB2 4 Mon Apr 03, 2017 5:23 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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