ASSIGN PROGRAM

Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer
pranav283
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Skillset: JCL, COBOL, DB2, CICS, VSAM, MQ
Referer: Internet

ASSIGN PROGRAM

Postby pranav283 » Tue Apr 17, 2018 12:00 pm

Hi,

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

Code: Select all

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).

Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: ASSIGN PROGRAM

Postby Robert Sample » Tue Apr 17, 2018 5:18 pm

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.

pranav283
Posts: 47
Joined: Sat Aug 30, 2014 3:52 pm
Skillset: JCL, COBOL, DB2, CICS, VSAM, MQ
Referer: Internet

Re: ASSIGN PROGRAM

Postby pranav283 » Mon Apr 23, 2018 11:59 am

Thanks for the clarification Robert!

And sorry for the late reply..


  • Similar Topics
    Replies
    Views
    Last post