Please, experts, take a look at the little program below. The question is simple: Is it legal for a section performing it self ??
It runs fine using Net Express 3.1, but Fujitsu Cobol version 6 is getting completely mad if more than two times "Y" is answered.
Is it a bug in Fujitsu or a "feature" from Net Express??
Marcel
It runs fine using Net Express 3.1, but Fujitsu Cobol version 6 is getting completely mad if more than two times "Y" is answered.
Is it a bug in Fujitsu or a "feature" from Net Express??
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. XXX.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VELD1 PIC 9(09) VALUE 0.
01 ONCEMORE PIC X.
PROCEDURE DIVISION.
MAIN SECTION.
M1.
PERFORM R010.
STOP RUN.
M9.
EXIT.
R010 SECTION.
R01001.
ADD 1 TO VELD1.
DISPLAY VELD1 " --- Again ??".
ACCEPT ONCEMORE.
IF FUNCTION UPPER-CASE (ONCEMORE) = "Y"
PERFORM R010.
SUBTRACT 1 FROM VELD1.
DISPLAY VELD1.
R01099.
EXIT.
Marcel