SiouxCityElvis
Programmer
I'm on RMCOBOL-85 on Linux.
I have a parent program running as a server.
It calls a child program.
In the Parent Program...
PROCEDURE DIVISION.
...
...
A pipe msg is read,
...
CALL "CHILD.COB"
...
Go back to the top and read for more pipe msgs(A loop on the pipe read in other words - a pseudo "server").
...
...
in Child prg.
IDENTIFICATION DIVISION.
PROGRAM-ID. CHILD.
...
..
WORKING STORAGE.
WS-INCREMENT PIC 9(3) VALUE 0.
PROCEDURE DIVISION.
..
..
DISPLAY WS-INCREMENT.
ADD 1 TO WS-INCREMENT.
GO TO END-IT.
END-IT.
END PROGRAM CHILD.
...
..
My question regards the WS-INCREMENT variable no re-initializing to value 0 each time the CHILD is called.
My DISPLAY Statement should always show "0", but does not, it increments. Shouldn't the "calling" of the Child program show a 0 everytime the Child program is called?
Especially since I have the END-IT procedure which "ends" the PROGRAM "CHILD"???
I'm lost...
Any help would be great.
Thanks.
-David
I have a parent program running as a server.
It calls a child program.
In the Parent Program...
PROCEDURE DIVISION.
...
...
A pipe msg is read,
...
CALL "CHILD.COB"
...
Go back to the top and read for more pipe msgs(A loop on the pipe read in other words - a pseudo "server").
...
...
in Child prg.
IDENTIFICATION DIVISION.
PROGRAM-ID. CHILD.
...
..
WORKING STORAGE.
WS-INCREMENT PIC 9(3) VALUE 0.
PROCEDURE DIVISION.
..
..
DISPLAY WS-INCREMENT.
ADD 1 TO WS-INCREMENT.
GO TO END-IT.
END-IT.
END PROGRAM CHILD.
...
..
My question regards the WS-INCREMENT variable no re-initializing to value 0 each time the CHILD is called.
My DISPLAY Statement should always show "0", but does not, it increments. Shouldn't the "calling" of the Child program show a 0 everytime the Child program is called?
Especially since I have the END-IT procedure which "ends" the PROGRAM "CHILD"???
I'm lost...
Any help would be great.
Thanks.
-David