Hi ,
I am calling a subprogram by passing one variable to it. When I am executing the main program I am facing S0C4 abend. All the passed variables & passing variables have the same length still facing the problem. Here is my below code.
Main Program:
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-PGM PIC X(06) VALUE SPACES.
01 WS-VAR PIC X(06) VALUE SPACES.
PROCEDURE DIVISION.
MOVE 'CALLS1' TO WS-PGM.
MOVE 'SRIRAJ' TO WS-VAR.
DISPLAY WS-PGM ':' WS-VAR.
CALL WS-PGM USING WS-VAR
END-CALL.
STOP RUN.
Sub Program :
WORKING-STORAGE SECTION.
01 WS-STATUS1 PIC X(06) VALUE SPACES.
LINKAGE SECTION.
01 WS-VAR PIC X(06).
PROCEDURE DIVISION USING WS-VAR.
MOVE 'SUBPGM' TO WS-STATUS1.
DISPLAY WS-STATUS1.
DISPLAY WS-VAR.
GOBACK.
Facing S0C4 error at the statement -- > DISPLAY WS-VAR.
Please advice.