The CURSOR phrase from RM/COBOL is not supported in
Enterprise Developer. In
Enterprise Developer, you must use the data item specified in the CURSOR clause in the special-names paragraph. To obtain the offset in the accepted field as returned by RM/COBOL for the CURSOR phrase of the ACCEPT statement, do the following:
- Set the data item specified in the CURSOR clause to have the line and column where the ACCEPT statement begins. If the ACCEPT statement is not positioned and will start at the current cursor location, the CBL_GET_CRSR library routine can be used to get the current cursor position; note that CBL_GET_CRSR returns zero-relative position information, which must be adjusted to one-relative position information when setting the location in the data item specified by the CURSOR clause.
- Save the start column in another data item.
- Execute the ACCEPT statement (without a CURSOR phrase since it is not supported).
- Subtract the original start column from the current column in the data item specified in the CURSOR clause and store this as the offset.