SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Mon Oct 11, 2004 9:52 am Post subject: problem in obtaining the caller's mode - Batch/Online/SP |
|
|
Hi,
I have a Cobol program to determine if the caller is in Batch or Online or Stored Procedure. It works fine for Batch and Online, but takes an exception when the call is from a stored procedure. What may be the reason ? The SP is using WLM. Is the MVS address block different ? I think the pointers I am referring to may have be corrupted or not existing, has anyone encounterd such a situation. Thanks
following is the PD code
LINKAGE SECTION.
01 DFHCOMMAREA PIC X(01).
01 BATCH-OR-CICS REDEFINES DFHCOMMAREA
PIC X(01).
01 CB1.
05 PTR1 POINTER OCCURS 256.
01 CB2.
05 PTR2 POINTER OCCURS 256.
PROCEDURE DIVISION.
SET ADDRESS OF CB1 TO NULL
SET ADDRESS OF CB1 TO PTR1(136).
SET ADDRESS OF CB2 TO PTR1(53).
IF CB2(21:4) = LOW-VALUES THEN
MOVE BATCH TO BATCH-OR-CICS
ELSE
MOVE ONLINE TO BATCH-OR-CICS
END-IF.
GOBACK. |
|