Is there a command to get the CICS jobname I am working with?
The following CICS command will do it: CECI INQUIRE SYSTEM JOBNAME()
It will display on the top right side of the screen the field: 'NAME=' where you can enter a value.
Enter 'x' and press enter, it will show '&x' then press enter again, all the fields should now be displayed with their values.
You may now press PF8 until you see the field Jobname value and other system field values.
For example:
inq system jobname()
STATUS: COMMAND EXECUTION COMPLETE NAME=
EXEC CICS INQuire SYSTem
+ < ERdsasize( +0027262976 ) >
< ESdsasize( +0001048576 ) >
< EUdsasize( +0001048576 ) >
< Forceqr( +0000001054 ) >
< GMMTExt( 'CTS 4.1/CICS 6.6 eMAIL/ETC & IDEALr11/IPCr11/DBr1' ... )
GMMLength( +00050 ) >
< GMMTRanid( 'CSGM' ) >
< Initstatus( +0000000628 ) >
< Jobname( 'DIDACICS' ) > <==== Jobname
< Logdefer( +0000000005 ) >
< MAXOpentcbs( +0000000012 ) >
< MAXTasks( +0000000005 ) >
< MEmlimit( Nolimit ) >
< MQconn( ' ' ) >
< MRobatch( +0000000001 ) >
< OPRel( +00021 ) >
+ < OPSys( 'X' ) >
RESPONSE: NORMAL EIBRESP=+0000000000 EIBRESP2=+0000000000
PF 1 HELP 2 HEX 3 END 4 EIB 5 VAR 6 USER 7 SBH 8 SFH 9 MSG 10 SB 11 SF
CECI: CICS-supplied Command Interpreter transaction. It verifies the syntax of a CICS command and executes the command.
See IBM KnowledgeCenter for more about CECI transaction:
https://www-01.ibm.com/support/knowledgecenter/#!/SSGMCP_5.3.0/com.ibm.cics.ts.systemprogramming.doc/transactions/ceci/dfha71y.html?cp=SSGMCP_5.3.0%2F20-9-1-7