Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

xmlattribute not identified in pro cobol

user-zuv3wOct 26 2023 — edited Oct 27 2023

in sqlplus i was able to execute

SELECT XMLELEMENT("EMPLOYEE",XMLATTRIBUTES('RAM' "NAME"),1022) FROM DUAL;

but when compiling the pro cobol program

000001 IDENTIFICATION DIVISION.
000002 PROGRAM-ID. XMLGEN.
000003 ENVIRONMENT DIVISION.
000004 INPUT-OUTPUT SECTION.
000005 DATA DIVISION.
000006 WORKING-STORAGE SECTION.
000007 EXEC SQL BEGIN DECLARE SECTION END-EXEC.
000008 01 XML-VAL PIC X(100).
000009 EXEC SQL END DECLARE SECTION END-EXEC.
000010 EXEC SQL INCLUDE SQLCA END-EXEC.
000011 PROCEDURE DIVISION.
000012 PERFORM PARA-FETCH THRU PARA-FETCH-EXIT.
000013 EXIT PROGRAM.
000014
000015 PARA-FETCH.
000016 EXEC SQL
000017 SELECT
000018 XMLELEMENT("EMPLOYEE",XMLATTRIBUTES(
000019 'RAM' "NAME"),1022)
000020 INTO XML-VAL
000021 FROM DUAL
000022 END-EXEC.
000023 PARA-FETCH-EXIT.
000024 EXIT.

getting error.

==============

Error at line 19, column 24 in file XMLGEN.PCO
000019 'RAM' "NAME"),1022)
.......................1
PCB-S-00400, Encountered the symbol ""NAME"" when expecting one of the following
:

    • * / , ) AT DAY YEAR ||
      The symbol "+" was substituted for ""NAME"" to continue.

PCB-I-0556: Unrecoverable error. Fix previous errors and re-precompile

Comments

Processing

Post Details

Added on Oct 26 2023
2 comments
85 views