0

I am issuing an exec cics assign statement in a Cobol program and getting an impossible response code. The eibresp is returning spaces. I mean the returning value assigned in the RESP clause of an exec cics command. Some code below:

77  W-RESP                  PIC S9(08)  VALUE 0 COMP.   
77  W-RESP-X REDEFINES                                  
    W-RESP                  PIC  X(04).                 
77  W-RESP2                 PIC S9(08)  VALUE 0 COMP.   


EXEC CICS ASSIGN                                  
    USERID    ( W-CICS-USER     )                
    RESP      ( W-RESP         )                 
    RESP2     ( W-RESP2        )                 
END-EXEC                                          
DISPLAY CTE-PROG ' ARESP='W-RESP '/' W-RESP2 ' RESPX=' W-RESP-X               

The value I am getting in W-RESP is SPACES (X'40404040'). This is a standard mainframe application, running in the IBM Zos operating system. The program that starts the request is a Natural one, executing under cics.

NATURAL PROGRAM --> COBOL PGM 1 ---> MY COBOL PGM

I could not find any explanation or user case in the web and always though the eibresp would always, in any circumstance, return a valid value.

Can someone shed some light on why I am getting an impossible eibresp (spaces)?

Thanks a lot.

David Buck
  • 3,752
  • 35
  • 31
  • 35
user2568276
  • 89
  • 2
  • 13

1 Answers1

0

Each CICS transaction has an Execute Interface Block (EIB, mapped in COBOL by the DFHEIBLK or DFHEIBLC copybook). Common practice is to pass the EIB on CALLs.

Your program likely has an EIB generated by the CICS translator in its Linkage Section.

You indicate that the first program executed in your transaction is written in Software AG's Natural programming language, which then calls another COBOL program, which then calls your COBOL program. If the EIB isn't being passed to your COBOL program, that may be the source of your problem.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • Thanks a lot. I am not only checking the value of eibresp (the eib variable). I am checking the RESP response parameter too, and it is returning spaces x"404040" as well. I mean, either EIBRESP or RESP are being returned spaces. To make things even more misterious, I have a situation in which the problem happens and another one in which it does not happen, and both are started from a Natural program. Thanks again. – user2568276 Oct 10 '19 at 11:53