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
 

 

how to get TASK for CICS program

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

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Tue Feb 16, 2010 11:48 am    Post subject: how to get TASK for CICS program
Reply with quote

Hi,
How to get the task number for the particular COBOL-CICS program.

say in the cobol program i need to store the particular task number.



Code:

    EXEC CICS
       INQUIRE TASK CURRENTPROG('progname')
    END-EXEC.
 
 


i need to store the task number in a working-storage variable.

and how to display that particular task number.

how do i?? well does the above code work and get me the task number???

Please help me out if im wrong.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Tue Feb 16, 2010 4:35 pm    Post subject:
Reply with quote

Please click on the manuals link above, find the CICS Language Reference manual, and look at Appendix A.1.1 on the EIB fields. Pay special attention to EIBTASKN in this chapter. You don't have to issue a CICS command to get the task number -- it is always available to your program anyway.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Wed Feb 17, 2010 6:04 am    Post subject:
Reply with quote

Quote:
EXEC CICS
INQUIRE TASK CURRENTPROG('progname')
END-EXEC.



HUH ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Wed Feb 17, 2010 6:20 am    Post subject:
Reply with quote

Code:
    EXEC CICS
       INQUIRE TASK CURRENTPROG('progname')
    END-EXEC.
And, by the way, this is not standard application code -- this requires use of the CICS system programming interface. If you inquire on the task, CURRENTPROG is not an option for the command; PROGRAM is but PROGRAM does not return a task number -- it returns the 8-character name of the program associated with the current task (i.e., the first program executed in the task chain). Furthermore, note that I said the field is returned -- you cannot specify a literal for the PROGRAM value, only a variable name since it is returned to your program.
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Feb 17, 2010 8:50 am    Post subject:
Reply with quote

Thanks for the help.

I got to know the system properties of a particular CICS task by putting.

CEMD

and then giving the transaction name.
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: Wed Feb 17, 2010 9:13 am    Post subject:
Reply with quote

Hello,

Quote:
say in the cobol program i need to store the particular task number.
So, what you asked for was not what you actually wanted at all . . .?

What is CEMD?
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Feb 17, 2010 9:27 am    Post subject:
Reply with quote

No,
I wanted to get the task number in the cobol program.

As per the earlier posts i have researched on the 'EIBTASKN' and found the Task number for a particular CICS program.
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: Wed Feb 17, 2010 9:45 am    Post subject: Reply to: how to get TASK for CICS program
Reply with quote

Hello,

As long as you have what you want/need, it does not matter that i'm confused. . . icon_confused.gif

d
Back to top
View user's profile Send private message
tecnokrat
Warnings : 1

Active User


Joined: 22 May 2009
Posts: 160
Location: Bangalore

PostPosted: Wed Feb 17, 2010 10:02 am    Post subject:
Reply with quote

I got the resolution by the following statement in my cobol program.

Code:


 MOVE EIBTASKN TO WS-VARIABLE.

  EXEC CICS SEND TEXT           
   FROM  (WS-VARIABLE)             
   RESP  (WS-RESP-CD)   
 END-EXEC.
                   



This would send the TASK number on the screen.

Thanks for the help icon_smile.gif icon_smile.gif
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 IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts CICS Transaction Timeout Hooman24 CICS 2 Sun Apr 16, 2017 2:16 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm


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