Pro*Cobol  compilation error

Hi all,
We have two Identical servers DEV1 and PROD1 with same SunOS and Oracle Db versions.
Then we have a pro*cobol program "prog1" which compile clean at DEV1, but when copied to PROD1 and compiled it does not
go clean compile.
Can you help me how to troubleshoot this problem please.
Is there a bug in Oracle pro*cobol that I may not be aware of?
How do I compare the pro*cobol version of the 2 servers?
I also tried to check the server OS versions:
@DEV1
uname -a
SunOS DEV1 5.10 Generic_144488-12 sun4v sparc SUNW,T5440
@PROD1
uname -a
SunOS PROD1 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Fire-V440Are our OS in sync?
MF cobol version:
check cobrun:
DEV1 MF Cobol Version:
V5.1 revision 0 build 10/10/2 G; 07109. Run Time System RXCTI/AA0/00000Q.
DEV2 MF Cobol Version:
V5.1 revision 0 build 10/10/2 G; 07209. Run Time System RXCTI/AA0/00000QIs our cobol compiler in sync?
Thanks a lot,
Edited by: KinsaKaUy? on 16-Sep-2011 02:44

What kind of error it throw ??
Are both server have similar hardware configuration??
Thanks
Cheeta

Similar Messages

  • Unable to locate the Pro Cobol Compiler

    I'm installed Oracle 9i client using Oracle 9.2.0.2.0 for HP-UX.
    The Pro Cobol compiler is not present in any of the installation options.
    Where can I download Oracle Pro Cobol compiler for Oracle 9.2.0.2.0 for HP-UX?
    G-

    after some research I found out that the Pro Cobol compiler is not available on the HP Itanium for version 9.2.0.1, 9.2.0.2 and 9.2.0.3. I will not be available until 9.2.0.4 or later per Oracle on Metalink

  • Pro*C compilation error - bulk insert statement

    Guys, I am screwed up!
    There's this Pro*C application that I am working on. I made some changes in some of the functions and when I compile using Pro*C pre-compiler (Version 9), it throws an error in one of the modules that I have not even touched.
    Following is the error:
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>
    ++: Release 9.0.1.1.1 - Production on Fri May 25 20:35:30 2007
    (c) Copyright 2001 Oracle Corporation. All rights reserved.
    System default option values taken from: C:\oracle\ora90\precomp\admin\pcscfg.cfg
    Error at line 1512, column 1 in file D:\Siemens\GABS-R\Source\GSM-R_Rating\RTLRa
    ting\multimainrate_supp1_cug.pc
    EXEC SQL FOR :record_roaming
    1
    PLS-S-00382, expression is of wrong type
    Error at line 1512, column 1 in file D:\Siemens\GABS-R\Source\GSM-R_Rating\RTLRa
    ting\multimainrate_supp1_cug.pc
    EXEC SQL FOR :record_roaming
    1
    PLS-S-00000, SQL Statement ignored
    Semantic error at line 1512, column 1, file D:\Siemens\GABS-R\Source\GSM-R_Rating\RTLRating\multimainrate_supp1_cug.pc:
    EXEC SQL FOR :record_roaming
    1
    PCC-S-02346, PL/SQL found semantic errors
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    The location it is referring to is:
    EXEC SQL FOR :record_roaming
    INSERT /*+ PARALLEL(GT_RATED_ROAMING_CALLS) */
    INTO GT_RATED_ROAMING_CALLS
    (GF_SEQ_NO,
    GF_CALL_PRODUCT,
    GF_CDR_TYPE,
    GF_REC_NO,
    GF_REC_STAT,
    GF_INTER_REC_NO,
    GF_SS_REC_NO,
    GF_SS_CODE,
    GF_CALLING_NUM,
    GF_CALLED_NUM,
    GF_CALLING_IMSI,
    GF_CALLED_IMSI,
    GF_CALLED_NUM_TON,
    GF_DIALLED_DIGITS,
    GF_LAC,
    GF_CELL,
    GF_IN_CKTGRP,
    GF_IN_CKTID,
    GF_OUT_CKTGRP,
    GF_OUT_CKTID,
    GF_BS_TYPE,
    GF_BS_CODE,
    GF_DURATION,
    GF_THREAD_ID,
    GF_CARRIER,
    GF_AIR_TIM_CHARGE,
    GF_TOLL_CHARGE,
    GF_TOLL_UNITS,
    GF_ROAM_SURCHARGE,
    GF_ROAMING_CHARGES,
    GF_ADDITIONAL_CHARGES,
    GF_CUST_ID,
    GF_CONT_ID,
    GF_BILL_PRD,
    GF_STATUS,
    GF_ERROR_CODE,
    GF_RECON_STAT_LANDLINE,
    GF_RECON_STAT_ROAMING,
    GF_CALLING_IMEI,
    GF_CALLED_IMEI,
    GF_MSC_ID,
    GF_ACTION_CODE,
    GF_MSRN,
    GF_LONG_DISTANCE_AIR_CHRG,
    gf_home_zone_surcharge,
    GF_SWITCH_CODE,
    GF_BILL_DATE,
    GF_CITY_CODE,
    GF_BILL_FREQ,
    GF_CALL_START_DATE,
    GF_CALL_END_DATE,
    GF_SMS_TEXT,
    GF_TIME_STAMP_AVAILABLE,
    GF_TYPE_OF_CALL,
    GF_PEAK_OFFPEAK,
    GF_PROCESS_DATE,
    GF_MATCH_DATA,
    GF_ORIG_ZONE_CODE,
    GF_DEST_ZONE_CODE,
    GF_PRICE_PLAN_CODE
    values
    (:gt_rated_roaming_calls,sysdate,:roaming_details_match_data,:l_gf_rcd_zone,:l_gf_price_plan);
    Pls note that the host variables match exactly the number of fields in the INTO clause (anyway, the error in such a case is different).
    Please save my soul!
    Sanchit

    Hi, check Metalink Note 451413.1 Pro*C Build Fails With Error PCC-02014 on File /usr/include/standards.h
    I did workarround #2, and worked.
    *+<Moderator edi t- deleted MOS Doc content - pl do NOT post contents of MOS Docs - this is a violation of your Support agreement>+*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Pro*C Compilation Error

    Hi Friends,
    Database Oracle 9i - Pro*C/C++: Release 9.2.0.4.0
    OS - powerpc-ibm-aix5.3.0.0
    C Compiler - GNU gcc version 4.2.0
    I am using the below command to compile "daemon.pc"
    /usr/bin/make -f proc.mk build OBJS=daemon.o EXE=daemon
    The errors I am facing while compiling "daemon.pc" are --
    GGC heuristics: param ggc-min-expand=100 param ggc-min-heapsize=131072
    Compiler executable checksum: 390e64d91265cc859d3a136f414a35d0
    daemon.c:117: warning: type defaults to 'int' in declaration of 'sqlcxt'
    daemon.c:119: warning: type defaults to 'int' in declaration of 'sqlcx2t'
    daemon.c:121: warning: type defaults to 'int' in declaration of 'sqlbuft'
    daemon.c:122: warning: type defaults to 'int' in declaration of 'sqlgs2t'
    daemon.c:123: warning: type defaults to 'int' in declaration of 'sqlorat'
    daemon.c: In function 'connect_error':
    daemon.c:281: warning: implicit declaration of function 'sqlglm'
    daemon.c:285: warning: implicit declaration of function 'exit'
    daemon.c:285: warning: incompatible implicit declaration of built-in function 'exit'
    daemon.c: In function 'sql_error':
    daemon.c:300: warning: too few arguments for format
    daemon.c: At top level:
    daemon.c:305: warning: return type defaults to 'int'
    daemon.c: In function 'main':
    daemon.c:482: warning: implicit declaration of function 'system'
    daemon.c:745: warning: incompatible implicit declaration of built-in function 'exit'
    daemon.c: At top level:
    daemon.c:114: warning: 'sqlstm' defined but not used
    daemon.c:126: warning: 'IAPSUCC' defined but not used
    daemon.c:127: warning: 'IAPFAIL' defined but not used
    daemon.c:128: warning: 'IAPFTL' defined but not used
    =============================================================
    After compiling when I try to execute "daemon", the following error appears -
    Memory fault(coredump)
    =============================================================
    When I debug "daemon" with "dbx" debugger, I get the following errors -
    dbx daemon core
    Type 'help' for help.
    [using memory image in core]
    reading symbolic information ...internal error: expected char ',', found ';12,64,384;;'
    internal error: expected char ';', found ',384;;'
    internal error: index("384;;", ':') failed
    Segmentation fault in sqlglmt at 0x9000000057f795c ($t1)
    0x9000000057f795c (sqlglmt+0x94) 9c030001 stbu r0,0x1(r3)
    (dbx) where
    sqlglmt(??, ??, ??, ??) at 0x9000000057f795c
    sqlglm(??, ??, ??) at 0x9000000057f7070
    unnamed block in main(), line 281 in "daemon.c"
    unnamed block in main(), line 281 in "daemon.c"
    unnamed block in main(), line 281 in "daemon.c"
    main(), line 281 in "daemon.c"
    =============================================================
    Please help me identifying the issue. Even a small hint would help me solve the problem. Thank you very much in advance.
    Regards,
    Abhishek Jain

    What are includes you have used in the .PC file ..? are you missing some standard headers ..??
    Try without using make files
    PROC file_name.pc Check any errors on this.
    Then link with -lclntsh -lexc -lmld -lrt -laio -lm -lxti -lpthread
    regards
    Prajith

  • Pro*C Compile Errors

    I am trying to compile a simple Pro*C program. i wrote this for
    solaris, and it worked fine. i am now trying to run it on linux,
    i am getting some real funky errors...
    Error at line 0, column 0 in file test01.pc
    PCC-S-02201, Encountered the symbol "<eof>" when expecting one of
    the following
    i have RH5.1, 96M Ram, P133. everything else is working
    beautifully. great job by the people at oracle...
    thanks for any help,
    -- adam
    null

    Adding the option common_parser=yes removes the errors !
    But brings errors linked to the PL/SQL parser such like
    CSF-S-00000, ORA-06544: PL/SQL : erreur interne, arguments : [55916], [], [], []
    1>, [], [], [], []
    1>ORA-06553: PLS-801: erreur interne [55916]
    Really vicious..and still not precompiling !
    By the way : Server is 10.2.0.1... and i guess thoses errors are normal since the common parser is not available in this version...
    So bye bye option common_parser and i'm back to my orignals errors.
    Message was edited by:
    Vicenzo

  • Pro*Cobol Cannot Find Newly Added Field

    We are running Oracle 8.1.7.4.0 on Unix, using MicroFocus cobol. We recently added a field to one of our tables, it shows up in SQLPlus and can be updated there, but when it is referenced in a cobol program the Pro Cobol compiler flags it as an error - 'undefined column'. In the compiler options we specify the userId, password and schema name. One of our DBAs looked at the schema we are referring to in the compiler options and the table shows the field is present. The server has two other instances of Oracle, neither of which has the new field added to the table. It appears that the Pro Cobol compiler is not looking at the updated schema. I would appreciate any guidance. Thanks.

    Thanks for the quick response. We only use capital letters in the field names, so that isn't the problem. I guess the question I would ask is if our installation of Pro Cobol could have been set to look at a specific schema, and ignore the signon info passed as a compiler option.

  • PRO*COBOL Oracle 9.2

    I am trying to run a COBOL program using SQL. The program is pre-compiled with PRO*COBOL and the then with Microfocus NET Express. At runtime i get the following error.
    $ ./testsample
    Execution error : file 'sample1'
    error code: 114, pc=0, call=1, seg=0
    114 Attempt to access item beyond bounds of memory (Signal 10)
    HP/MF COBOL Version: B.13.45
    HP-UX hptest B.11.11 U 9000/800
    pid: 22012 gid: 102 uid: 104
    Thu Nov 21 19:03:12 2002
    7:03pm up 36 days, 6:23, 34 users, load average: 0.28, 0.16, 0.13
    Thread mode: No Threads
    RTS Error: COBOL
    Sync Signals: COBOL
    ASync Signals: COBOL
    cobtidy on exception: False
    I get the same error with the sample program. Any idea what the cause may be?

    after some research I found out that the Pro Cobol compiler is not available on the HP Itanium for version 9.2.0.1, 9.2.0.2 and 9.2.0.3. I will not be available until 9.2.0.4 or later per Oracle on Metalink

  • Pro*Cobol PCO Compilation problem in Linux

    Hi,
    DB :oracle 11g on RHEL 5.5
    when we are compiling the (Pro*cobol ) PCO code it is giving us the error :
    System default option values taken from: /oracle/oracle11g/app/product/11.2.0/dbhome_1/precomp/admin/pcbcfg.cfg
    Error at line 320, column 35 in file BR2385.PCO
    WHERE A.SOC_NO = :PARAM-SOC
    ..................................1
    PCB-S-00223, Undeclared variable "PARAM-SOC".
    when we change the pcbcfg.cfg file with flag : declare_section=no it's compile without error.
    But in this scenario cobol app doesn't run.
    if we declare the undeclared variable in the section
    EXEC SQL BEGIN DECLARE SECTION END-EXEC.
    PARAM-SOC PIC X(25).
    EXEC SQL END DECLARE SECTION END-EXEC.
    and compile it with declare_section=yes then cobol app. run fine.
    Are different files generated (cob,int,gnt) after compilation with the option declare_section=no and declare_section=yes.
    Pls help us in this regards. we have lot of file which having these issue and we don't want to do manual changes "EXEC SQL BEGIN" in it.
    Thanks in advance..

    Your code is faulty and has to be fixed.
    No compilation problem is present, the compiler correctly barfs.
    As this is not a support forum, kindly keep your non-issues out of this forum.
    Thank you!!!
    Sybrand Bakker
    Senior Oracle DBA

  • Can't compile old Cobol Programs with Oracle9i Pro*Cobol.

    I'm a Cobol and Oracle greenhorn - so please apologise my question.
    Here are the details:
    We want to switch our db from
    Oracle8i Enterprise Edition Release 8.1.7.0.0
    to
    Oracle9i Enterprise Edition Release 9.2.0.4.0
    If I have the "Oracle 8i client" installed on my developing system (using procob precompiler) my program compiles without problems. Connecting to our old 8i db works fine.
    On connecting to our new 9i db my program crashes on the first EXEC SQL statement with:
    114 Attempt to access item beyond bounds of memory
    So I have installed the "Oracle 9i client" to use the new precompiler
    Pro*COBOL: Release 9.2.0.1.0
    BUT now I can't execute my program because procob inserts some CALL "ORASQL8" which doesn't exist in my Oracle installation. Maybe ORASQL9 would work, because there are some files with this name in my Oracle dir.
    How can I make my NET Express Version 3.1.11 Service Pack 1 work together with Oracle9i?
    Here are my current (old) Precompilersettings from the file cobol.dir:
    p(cobsql) csqlt=ora8 cbl2ora8 sqldebug end-c ireclen=132 oreclen=132 maxliteral=160 picx=varchar2 p(cp) sy endp copyext (pco,cbl,cpy,cob) osext(pco);
    This forum is my last resort. Maybe anyone can help?
    Thanks in advance
    lual

    ...solved by myself.
    After wasting a lot of time, i've found a quick and dirty solution...
    C:\oracle9i\bin\ORASQL9.DLL
    duplicated and renamed to ORASQL8.DLL
    C:\oracle9i\precomp\lib\msvc\oraSQL9.LIB
    duplicated and renamed to oraSQL8.LIB
    C:\oracle9i\precomp\lib\orasql9.lib
    duplicated and renamed to orasql8.lib
    ...now my old programs run again without errors.
    lual

  • NVL2 in pro cobol giving the error.

    For some reason we are getting an compiler error when we use NVL2 function in embedded sql statement in a pro-cobol module. Here is the output from the compiler. Do we have to add any options to recognize the new functions/keywords?
    procob iname=vas107h2.pco include=/oracle/home/product/9.2.0/precomp/public ireclen=132 oreclen=132 sqlcheck=full ltype=none
    " PICX=VARCHAR2 include=/jsbatch/vista/dev/cobol/cpy
    Pro*COBOL: Release 9.2.0.7.0 - Production on Tue Oct 31 13:49:35 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: /oracle/home/product/9.2.0/precomp/admin/pcbcfg.cfg
    Error at line 595, column 12 in file vas107h2.pco
    EXEC SQL DECLARE DRIVER CURSOR FOR
    ...........1
    PCB-S-00576, PLS-201: identifier 'NVL2' must be declared
    Error at line 595, column 12 in file vas107h2.pco
    EXEC SQL DECLARE DRIVER CURSOR FOR
    ...........1
    PCB-S-00576, PLS-0: SQL Statement ignored
    *** Error code 1
    make: Fatal error: Command failed for target `vas107h2'
    Thanks,

    I'm not familiar with Pro*Cobol, but there's a similar issue with Pro*C, the parser does not recognize this built-in function. Given workaround is:
    1) Use NVL() instead of NVL2().
    2) Use Dynamic Sql in Pro*C. For example:
    EXEC SQL EXECUTE
    declare
    v_var varchar2(100);
    BEGIN
    execute immediate 'select nvl2(user, user, 'N/A') from dual' into v_var;
    END;
    END-EXEC;
    If that doesn't help, you should contact Oracle support.
    Werner

  • PRO*COBOL/Oracle 9.2 Error

    I am trying to run a COBOL program using SQL. The program is pre-compiled with PRO*COBOL and the then with Microfocus NET Express. At runtime i get the following error.
    $ ./testsample
    Execution error : file 'sample1'
    error code: 114, pc=0, call=1, seg=0
    114 Attempt to access item beyond bounds of memory (Signal 10)
    HP/MF COBOL Version: B.13.45
    HP-UX hptest B.11.11 U 9000/800
    pid: 22012 gid: 102 uid: 104
    Thu Nov 21 19:03:12 2002
    7:03pm up 36 days, 6:23, 34 users, load average: 0.28, 0.16, 0.13
    Thread mode: No Threads
    RTS Error: COBOL
    Sync Signals: COBOL
    ASync Signals: COBOL
    cobtidy on exception: False
    I get the same error with the sample program. Any idea what the cause may be?

    Hello,
    Reason: Your data might contain some foreign characters [non-english] ie., your server nls_lang settings might be different to the client nls_lang settings, as a result the new nls_lang characters will occupy extra bytes because of which even though it is apparent that you are using around 2000 bytes you may be using more than 4000 bytes. Examples Japanese characters seem to take 2 bytes per character, similarly russian takes 3 bytes per character.
    The ojdbc14.jar seems to be doing some check on this and if the characters are more than 4000 bytes it gives u the ora-01461 error but the new 10G ojdbc14.jar allows this.
    On the other hand you may be genuinely trying to insert more than 4000 bytes characters into varchar [example trying to insert the text values into a varchar()]
    You may want to try this:
    * Please download ojdbc14.jar from
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.htmla>
    * Replace the old $omwb_home/lib/ojdbc14.jar with the ojdbc14.jar that you have downloaded in the step above.
    Try a capture now.
    Thank you.
    Srinivas

  • Pro*C compile/runtime errors w/ XMLTYPE

    On an Oracle 9iR2 NT machine (Pro*C/C++: Release 9.2.0.1.0)...
    1. The following SQL works without error from SQL*Plus:
         DECLARE
         xml_clob CLOB;
         file_name VARCHAR2(200);
         BEGIN
         file_name := 'rsand.xml';
         xml_clob := f_get_xml_document(file_name);
         insert into RCTXMLD values(file_name, XMLTYPE(xml_clob));
         END;
         select extractValue(RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]/@EntityId')
         from rctxmld
         where rctxmld_docname = 'rsand.xml'
         SELECT existsNode (RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]')
         FROM RCTXMLD
         WHERE RCTXMLD_DOCNAME = 'rsand.xml'
         SELECT existsNode (RCTXMLD_XMLDOC,'/CommonRecord/ReportingSchl[1]/AttendingSchl[1]')
         FROM RCTXMLD
         WHERE RCTXMLD_DOCNAME = 'rsand.xml'
         SELECT XMLTYPE.existsNode (RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]')
         FROM RCTXMLD
         WHERE RCTXMLD_DOCNAME = 'rsand.xml'
    2. The following SQL compiles and works without error from Pro*C:
    EXEC SQL DECLARE REPORTING_SCHOOL CURSOR FOR
    SELECT XMLTYPE.existsNode (RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]')
    FROM RCTXMLD
    WHERE RCTXMLD_DOCNAME = :file_name_parm;
    Note: This only compiles when existsNode is prefixed by "XMLTYPE."
    3. The following SQL generates runtime errors from Pro*C:
    static void ins_xml_doc(void)
    #ifdef SCT_DEBUG
    printf("Executing ins_xml_doc\n");
    fflush(stdout);
    #endif
    EXEC SQL EXECUTE
    DECLARE
    xml_clob CLOB;
    BEGIN
    xml_clob := f_get_xml_document(:file_name_parm);
    INSERT into RCTXMLD VALUES (:file_name_parm, XMLTYPE(xml_clob));
    END;
    END-EXEC;
    POSTORA;
    Run Sequence Number....................................:
    Processing C:\TEMP\jobsub\finaid\rsand.xml...
    Connected.
    ORA-22288: file or LOB operation FILEOPEN failed
    The process cannot access the file because
    it is being used by another process
    ORA-06512: at "SYS.DBMS_LOB", line 672
    ORA-06512: at "FAISMGR.F_GETñ
    WRN-ORACERR: Error occurred in file "d:\banner\finaid\c\rerim04.pc" at line 1318
    WRN-ERRSTMT: Following statement was last statement parsed:
    declare xml_clob CLOB ; BEGIN xml_clob := f_get_xml_document ( :file_n
    Unable to initialize device default
    4. The following SQL generates compile errors from Pro*C:
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]/@EntityId')
    INTO :ReportingSchlEntityId
    FROM RCTXMLD
    WHERE RCTXMLD_DOCNAME = :file_name_parm;
    POSTORA;
    Processing rerim04, type pc...
    Pro*C/C++: Release 9.2.0.1.0 - Production on Thu Feb 6 08:59:46 2003
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: D:\oracle\ora92\precomp\admin\pcscfg.cfg
    Error at line 1887, column 5 in file d:\banner\finaid\c\rerim04.pc
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC,
    ....1
    PLS-S-00302, component 'EXTRACTVALUE' must be declared
    Error at line 1887, column 5 in file d:\banner\finaid\c\rerim04.pc
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC,
    ....1
    PLS-S-00000, SQL Statement ignored
    Semantic error at line 1887, column 5, file d:\banner\finaid\c\rerim04.pc:
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC,
    ....1
    PCC-S-02346, PL/SQL found semantic errors
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
    Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
    rerim04.c
    fatal error C1083: Cannot open source file: 'C:\TEMP\rerim04.c': No such file or directory

    On an Oracle 9iR2 NT machine (Pro*C/C++: Release 9.2.0.1.0)...
    1. The following SQL works without error from SQL*Plus:
         DECLARE
         xml_clob CLOB;
         file_name VARCHAR2(200);
         BEGIN
         file_name := 'rsand.xml';
         xml_clob := f_get_xml_document(file_name);
         insert into RCTXMLD values(file_name, XMLTYPE(xml_clob));
         END;
         select extractValue(RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]/@EntityId')
         from rctxmld
         where rctxmld_docname = 'rsand.xml'
         SELECT existsNode (RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]')
         FROM RCTXMLD
         WHERE RCTXMLD_DOCNAME = 'rsand.xml'
         SELECT existsNode (RCTXMLD_XMLDOC,'/CommonRecord/ReportingSchl[1]/AttendingSchl[1]')
         FROM RCTXMLD
         WHERE RCTXMLD_DOCNAME = 'rsand.xml'
         SELECT XMLTYPE.existsNode (RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]')
         FROM RCTXMLD
         WHERE RCTXMLD_DOCNAME = 'rsand.xml'
    2. The following SQL compiles and works without error from Pro*C:
    EXEC SQL DECLARE REPORTING_SCHOOL CURSOR FOR
    SELECT XMLTYPE.existsNode (RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]')
    FROM RCTXMLD
    WHERE RCTXMLD_DOCNAME = :file_name_parm;
    Note: This only compiles when existsNode is prefixed by "XMLTYPE."
    3. The following SQL generates runtime errors from Pro*C:
    static void ins_xml_doc(void)
    #ifdef SCT_DEBUG
    printf("Executing ins_xml_doc\n");
    fflush(stdout);
    #endif
    EXEC SQL EXECUTE
    DECLARE
    xml_clob CLOB;
    BEGIN
    xml_clob := f_get_xml_document(:file_name_parm);
    INSERT into RCTXMLD VALUES (:file_name_parm, XMLTYPE(xml_clob));
    END;
    END-EXEC;
    POSTORA;
    Run Sequence Number....................................:
    Processing C:\TEMP\jobsub\finaid\rsand.xml...
    Connected.
    ORA-22288: file or LOB operation FILEOPEN failed
    The process cannot access the file because
    it is being used by another process
    ORA-06512: at "SYS.DBMS_LOB", line 672
    ORA-06512: at "FAISMGR.F_GETñ
    WRN-ORACERR: Error occurred in file "d:\banner\finaid\c\rerim04.pc" at line 1318
    WRN-ERRSTMT: Following statement was last statement parsed:
    declare xml_clob CLOB ; BEGIN xml_clob := f_get_xml_document ( :file_n
    Unable to initialize device default
    4. The following SQL generates compile errors from Pro*C:
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC, '/CommonRecord/ReportingSchl[1]/@EntityId')
    INTO :ReportingSchlEntityId
    FROM RCTXMLD
    WHERE RCTXMLD_DOCNAME = :file_name_parm;
    POSTORA;
    Processing rerim04, type pc...
    Pro*C/C++: Release 9.2.0.1.0 - Production on Thu Feb 6 08:59:46 2003
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    System default option values taken from: D:\oracle\ora92\precomp\admin\pcscfg.cfg
    Error at line 1887, column 5 in file d:\banner\finaid\c\rerim04.pc
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC,
    ....1
    PLS-S-00302, component 'EXTRACTVALUE' must be declared
    Error at line 1887, column 5 in file d:\banner\finaid\c\rerim04.pc
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC,
    ....1
    PLS-S-00000, SQL Statement ignored
    Semantic error at line 1887, column 5, file d:\banner\finaid\c\rerim04.pc:
    EXEC SQL SELECT XMLTYPE.extractValue(RCTXMLD_XMLDOC,
    ....1
    PCC-S-02346, PL/SQL found semantic errors
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
    Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
    rerim04.c
    fatal error C1083: Cannot open source file: 'C:\TEMP\rerim04.c': No such file or directory

  • Error: Writing LOB with Pro*COBOL

    Hi,
    I'm trying to write an Oracle CLOB object using a COBOL application and Pro*COBOL. The following code is quite similar to the Oracle Documentation Example. However, I would always get the fatal error
    Attempt to access item beyond bounds of memory (Signal 10)
    Here's my code (erased the EXEC SQL...END-EXEC for readability):
    ALLOCATE :WC-MESSAGE-TXT
    SELECT MESSAGE INTO :WC-MESSAGE-TXT
    FROM T_MESSAGE
    WHERE ID = :WV-ID
    FOR UPDATE
    LOB WRITE :WC-MESSAGE-LEN
    FROM :WV-MESSAGE
    INTO :WC-MESSAGE-TXT
    FREE :WC-MESSAGE-TXT
    Can anyone help, please!
    Thanks, Ulf

    Have you checked the system requirements for using Pro-Cobol with Oracle 11g and Linux? See here:
    Pro*COBOL® Programmer's Guide 11g Release 1 (11.1)
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28428/pcoabops.htm#insertedID1
    Hope this helps,
    Ben

  • Oracle 11g and PRO*C :  pre-compile errors only with 11g !

    Hi !
    I didn't find a forum specific to pro*c, so here i am.
    I've downloaded Oracle 11g and recompiled our applications using pro*c
    We currently precompiling without any problem our sources against Oracle 7, 8, 9, 10.
    With Oracle 11g, it doesn't work !
    every EXEC SQL followed by a command works.
    every EXEC SQL followed by a query generates the same error.
    Example :
    char *oracle_date_courante()
         static char buf[SIZE_ORADATE+1];
         EXEC SQL SELECT sysdate into :buf from DUAL;
         if(ORA_SQLERROR())
              oracle_error("sélection date courante");
              buf[0]=0;
         return buf;
    PRO*C output :
    Erreur Ó la ligne 105, colonne 2 dans le fichier src\oracle.pc
    EXEC SQL
    .1
    PLS-S-00000, SQL Statement ignored
    erreur sÚmantique Ó la ligne 105, colonne 2, fichier src\oracle.pc:
    EXEC SQL
    .1
    PCC-S-02346, PL/SQL a trouvÚ des erreurs sÚmantiques
    So, we investigated... And found that thoses errors come when we use the option sqlcheck=semantics.
    If we use an inferiour check level, it works but because we use PL/SQL keywords, pro*c prints errors and wants us to provide the 'semantics' sqlcheck level !
    So, it's a vicious circle !
    Any ideas ?
    Thanks...
    Vincent

    Adding the option common_parser=yes removes the errors !
    But brings errors linked to the PL/SQL parser such like
    CSF-S-00000, ORA-06544: PL/SQL : erreur interne, arguments : [55916], [], [], []
    1>, [], [], [], []
    1>ORA-06553: PLS-801: erreur interne [55916]
    Really vicious..and still not precompiling !
    By the way : Server is 10.2.0.1... and i guess thoses errors are normal since the common parser is not available in this version...
    So bye bye option common_parser and i'm back to my orignals errors.
    Message was edited by:
    Vicenzo

  • Using WITH clause in Pro*Cobol

    Hi!
    I am trying to improve the performance of a query by introducing WITH clause.
    The query is in Pro*Cobol Release 9.2.0.6.0 - Production.
    I got compilation error
    WITH DPTCOST AS (
    ...............1
    PCB-S-00400, Encountered the symbol "DPTCOST" when expecting one of the following:
    END-EXEC
    ....continued
    So I wonder if we could use that clause at all with Pro*Cobol
    Here is the excerp of the code
    EXEC SQL
    DECLARE INPUT_ACTUAL CURSOR FOR
    WITH DPTCOST AS (
    SELECT /*+ rule */
    A.CODE_COMBINATION_ID,
    A.SEGMENT1, A.SEGMENT2, A.SEGMENT3,
    A.SEGMENT6,
    D.COSTING, D.PROCESS,
    D.MTL_CODE, D.FACTOR
    FROM
    GL_CODE_COMBINATION A,
    ALCGL_DEPARTMENT_COSTINGS D
    WHERE
    A.TEMPLATE_ID IS NULL
    AND A.SUMMARY_FLAG <> 'Y'
    AND A.SEGMENT1 = D.PLANT_NUMBER
    AND A.SEGMENT3 <> '6999001'
    AND A.SEGMENT3 <> '6999002'
    AND SUBSTR(A.SEGMENT2,4,3) = D.DEPARTMENT
    AND D.ACTUAL_FLAG = 'A'
    ) ... continued

    Materialized views are basically stored query results. They offer advanced functionality like query rewrite, refresh on commit, and more;
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm
    Unlike a view, they actually store the results of the query - not just the query;
    SQL> create table t (cid number primary key)
    Table created.
    SQL> insert into t select object_id from dba_objects where object_id is not null
    12791 rows created.
    SQL> create materialized view mv
       as select * from t
    Snapshot created.
    SQL> select object_name, object_type from user_objects where object_name ='MV'
    OBJECT_NAME                    OBJECT_TYPE       
    MV                             TABLE             
    MV                             MATERIALIZED VIEW 
    2 rows selected.
    SQL> select segment_name, bytes from user_segments where segment_name in ('T', 'MV')
    SEGMENT_NAME                        BYTES
    T                                  196608
    MV                                 196608
    2 rows selected.Temporary tables are simply tables that are created then dropped. GLOBAL TEMPORARY TABLES have the advantage (or disadvantage) of only existing until commit or the end of the session. They results are visible to the user that inserted the data - but only temporarily;
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#sthref7483

Maybe you are looking for