Highlighted
Absent Member.
Absent Member.
3143 views

Compiling Visual Cobol 2.2 with Oracle

Jump to solution

We are having problem to compiling Visual Cobol 2.2 with SQL embedded (Oracle).

We are not using neither Eclipse nor .NET environment development.

We are compiling using a script, setting de compiler directives into the program using $SET USE statement. According with the documentation we separate de directives into two files.

Within the program the SET statements appear so:

      $SET USE"/MNG/DESA/VCFG/VCDirecSQL.dir"
      $SET USE"/MNG/DESA/VCFG/VCDirectivesP1.dir"

: first file includes:

p(cobsql)  csqlt=oracle8 nomakesyn  end-c comp5=no sqlcheck=full mode=oracle dbms=V8 varchar=yes unsafe_null=yes close_on_commit=no end_of_fetch=1043 dynamic=oracle type_code=ansi USERID=CBL_OWNER/cobol2014@LBDCOB01 endp

second file with the rest of the compiler directives.

When we try to compile, we receive the next message:

    2$SET USE"/MNG/DESA/VFUENTES/ATS/TST1F(·=.CBL
*  53-S********************************                 (   0)**
** DIrective P invalid or not allowed here
cob64:  error(s) in compilation  etc.

we try to put together in one directives file but we receive the same error.

What are we doing wrong?

Do I need to configure anything else?

I appreciate your help.

Thanks in advance.

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

The directives file must be referenced on the "very first line".  Your program has a comment line as the very first line, followed by the $SET USE directive.  Thus, the P directive is not the very first source line and is rejected.

View solution in original post

0 Likes
9 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

Hi Jose,

What does the second directives file contain?

The error message is pointing to a completely different directives file than the ones that you show in your $SET statements.

$SET USE"/MNG/DESA/VFUENTES/ATS/TST1F(•=.CBL

Where is this coming from?

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

This piece of text is a part of the message that the compiler shows on screen.

Here is the screen with complete message.

The second directives file contains only directives for the compiler.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

Sorry but I think that the screen was not included.

This is the content of .LST file.

* Micro Focus COBOL                  V2.2 revision 000 03-Oct-14 10:44 Page   1

* /MNG/DESA/VFUENTES/ATS/TST1F830.CBL

* Options: int("TST1F830.int") anim csi nolist verbose confirm CHECK endp

*          list("TST1F830.lst")

    1****Linea insertada automaticamente (MIGRA)

    2$SET USE"/MNG/DESA/VCFG/VCDirecSQL.dir"

*  53-S**************************************                          (   0)**

**    Directive P invalid or not allowed here

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

The lst file shows in the list of directives the "endp" directive which is actually supposed to have a matching "p" directive to turn on the precompiler.

p(cobsql) should contain options and then end with the endp

Can you show me the contents of the cobol directives file?

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

The p (preprocess) compiler directive is documented as "$SET  On very first source line only".  I think that is your problem.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

This is the content of the first directives  file:

p(cobsql)  csqlt=oracle8 nomakesyn  end-c comp5=no sqlcheck=full mode=oracle dbms=V8 varchar=yes unsafe_null=yes close_on_commit=no end_of_fetch=1043 dynamic=oracle type_code=ansi USERID=CBL_OWNER/cobol2014@LBDCOB01 endp

 

This is the content of the second directives file:

XMLGEN(WS)
DATAMAP
DIALECT(RM)
RM"ANSI"
sign(ebcdic)
COMP2(DECIMAL)
ADDSYN "COMP-2" = "COMP"
ADDSYN "COMP-2" = "COMPUTATIONAL"
COMP-6(2)
COMP1(BINARY)
TRACE
DEFAULTCALLS(0)
REMOVE"MANUAL"
REMOVE"TIMEOUT"
COBFSTATCONV
REMAINDER"2"
PERFORM-TYPE"RM"
NOCHECKDIV
SIGN-FIXUP
CHANGE-MESSAGE "305 N"
CHANGE-MESSAGE "1111 E"
CHANGE-MESSAGE "1112 N"
CHANGE-MESSAGE "1136 N"
CHANGE-MESSAGE "1140 N"
CHANGE-MESSAGE "1146 N"
CHANGE-MESSAGE "1203 N"
CHANGE-MESSAGE "1205 N"
CHANGE-MESSAGE "1207 N"
CHANGE-MESSAGE "1209 N"
CHANGE-MESSAGE "1202 N"
CHANGE-MESSAGE "1204 N"
CHANGE-MESSAGE "1216 N"
CHANGE-MESSAGE "1654 N"
WARNINGS "3"
NOMFCOMMENT

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

Yes this directive is in the first directives files.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

The directives file must be referenced on the "very first line".  Your program has a comment line as the very first line, followed by the $SET USE directive.  Thus, the P directive is not the very first source line and is rejected.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Compiling Visual Cobol 2.2 with Oracle

Jump to solution

Thanks Bruce.

This Works!

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.