Highlighted
Valued Contributor.
Valued Contributor.
148 views

CURRENT-DATE reserved word reported as undefined during Release Mode compilation

Jump to solution

What would cause a program to compile cleanly in debug mode but in release mode fails and reports the following error:  Undefined data item: CURRENT-DATE ????

Running Acubench for 10.1.1.  Newly installed on a clean system but was doing the same thing on an old system. 

Release Compile options = -ox .\object\@.acu -Fo c:\A2\datafiles -Sa

Debug   Compile options = -ox .\object\@.acu -Cp -Fo c:\A2\datafiles -Sa8 -Ga

What am I missing?

Thanks for your help.

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Valued Contributor.
Valued Contributor.

Re: CURRENT-DATE reserved word reported as undefined during Release Mode compilation

Jump to solution
I double checked the compatibility settings under Release Mode as you stated and HP Cobol was in fact checked. This is what the Project Options show in the Project Settings:
-ox .\object\@.acu -Losca .\list\@.lst -Cp -Fp -Fo "C:\A2\FD" -Sad8 -Di -Ga -Zi

However, when I actually run the compile what is shown is this:
------------------------- A2 - Release Mode-------------------------
--------- Compiling NMenu.cbl ----------
--------- Compile options = -ox .\object\@.acu -Fo c:\A2\datafiles -Sa
C:\A2\copylib\NMenu.evt, line 2520: Undefined data item: CURRENT-DATE
NMenu.acu - Compilation Failure

Is there somewhere else that could be overriding the settings in the Project Settings? Something in the AcuBench.ini or the AcuCobol.ini?

View solution in original post

0 Likes
3 Replies
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: CURRENT-DATE reserved word reported as undefined during Release Mode compilation

Jump to solution

According to the product documentation, the CURRENT-DATE register is only available when compiling in one of the compatibility modes. In the case of your debug compile, it appears that you are employing the HP COBOL compatibility mode switch(-Cp), which, does support CURRENT-DATE. However, in your release compile, you are not specifying this compatibility mode switch.

For more information in regards to this topic, please see the following links to the on-line ACUCOBOL-GT extend product documentation:

The -Cp HP COBOL Compatibility Switch 

CURRENT-DATE 

0 Likes
Highlighted
Valued Contributor.
Valued Contributor.

Re: CURRENT-DATE reserved word reported as undefined during Release Mode compilation

Jump to solution
I double checked the compatibility settings under Release Mode as you stated and HP Cobol was in fact checked. This is what the Project Options show in the Project Settings:
-ox .\object\@.acu -Losca .\list\@.lst -Cp -Fp -Fo "C:\A2\FD" -Sad8 -Di -Ga -Zi

However, when I actually run the compile what is shown is this:
------------------------- A2 - Release Mode-------------------------
--------- Compiling NMenu.cbl ----------
--------- Compile options = -ox .\object\@.acu -Fo c:\A2\datafiles -Sa
C:\A2\copylib\NMenu.evt, line 2520: Undefined data item: CURRENT-DATE
NMenu.acu - Compilation Failure

Is there somewhere else that could be overriding the settings in the Project Settings? Something in the AcuBench.ini or the AcuCobol.ini?

View solution in original post

0 Likes
Highlighted
Valued Contributor.
Valued Contributor.

Re: CURRENT-DATE reserved word reported as undefined during Release Mode compilation

Jump to solution
I seem to have found the problem. Apparently I had inadvertently selected my program in the tree view while inside of the Project Settings and had cleared the "Follow project default options". After check what the compatibility setting was in THAT case I found that HP Compatability was not checked. Rechecking the Follow Project Default Options resolved the issue perfectly. Thank you so much for your help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.