[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Problem with DECLARATIVES
From: |
Doug Vogel |
Subject: |
[open-cobol-list] Problem with DECLARATIVES |
Date: |
Fri, 15 Dec 2006 11:29:31 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) |
Is the DECLARATIVES supported? If yes, it does not seem to produce code
that acts as it should.
The COBOL code looks like the following :
PROCEDURE DIVISION USING
DFHEIBLK
DFHCOMMAREA
DATA-RECORD.
*****************************************************************
DECLARATIVES.
*****************************************************************
DATA-FILE-ERROR SECTION.
USE AFTER STANDARD ERROR PROCEDURE ON DATA-FILE.
END DECLARATIVES.
/
*****************************************************************
RUIOCPY-MAIN.
*****************************************************************
MOVE ZEROS TO ML006-RETURN-CODE
ML006-RETCODE-EXT.
The following are exceprts from the C code
/* PROCEDURE DIVISION */
/* DATA-FILE-ERROR SECTION: */
l_106:;
/* OMPARMPS: */
l_107:;
..........
/* OMPARMPS.cob:177: OPEN */
//line# 177 "OMPARMPS.cob"
{
cob_exception_code = 0;
{
cob_open (h_DATA_FILE, 3, 1, &f_21);
}
if (unlikely(cob_exception_code != 0))
{
/* PERFORM DATA-FILE-ERROR THRU DATA-FILE-ERROR */
if (unlikely(++frame_index >= COB_STACK_SIZE))
-> cob_fatal_error (COB_FERROR_STACK);
frame_stack[frame_index].perform_through = 106;
frame_stack[frame_index].return_address = 17;
-> goto l_106;
l_155:
frame_index--;
}
}
When the code in the DECLARATIVES get executed it then falls back
through the main procedure. Once the code is executed in declaratives
control should go back to the point from
which it came. I have not checked to see if this problem would be
resolved by actually putting some code in the DECLARATIVES, but this
code does work on other platforms as it is.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [open-cobol-list] Problem with DECLARATIVES,
Doug Vogel <=