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

Task Number Active/Runing..


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Thu Jan 31, 2008 11:16 pm
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 01, 2008 12:20 am
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

Moderator Emeritus


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

PostPosted: Fri Feb 01, 2008 12:35 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top