View previous topic :: View next topic
|
Author |
Message |
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
Quote: |
EXEC CICS
INQUIRE TASK CURRENTPROG('progname')
END-EXEC. |
HUH ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As long as you have what you want/need, it does not matter that i'm confused. . .
d |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
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 |
|
Back to top |
|
|
|