Page 1 of 1

ASSIGN PROGRAM

PostPosted: Tue Apr 17, 2018 12:00 pm
by pranav283
Hi,

Is there any possibility that the below CICS ASSIGN PROGRAM name could not assign the current program name to the variable WV-PGM:

EXEC CICS ASSIGN                      
          PROGRAM (WV-PGM)
          RESP    (WV-EIBRESP)        
END-EXEC                              
 


Lets say the current program name is - PGMOLCB1 and WV-PGM is defined as PIC X(08).

Re: ASSIGN PROGRAM

PostPosted: Tue Apr 17, 2018 5:18 pm
by Robert Sample
According to the manual, the ASSIGN PROGRAM will return the 8-character name of the currently executing program. So the answer to your question is no, there is no possibility that ASSIGN PROGRAM will not return the name of the currently executing program. HOWEVER, note that if a COBOL CALL is used to invoke a subprogram, CICS does not know about that CALL and hence will return the name of the currently executing main program, not the name of the subprogram since the subprogram executes as part of the main program.

Re: ASSIGN PROGRAM

PostPosted: Mon Apr 23, 2018 11:59 am
by pranav283
Thanks for the clarification Robert!

And sorry for the late reply..