Quantcast
Channel: Visual COBOL
Viewing all 5819 articles
Browse latest View live

Forum Post: RE: Using 'Call' in Method

$
0
0
Hi Juan, You can call programs within other projects by adding a reference to those other projects within the calling project. A single Winform application should only have one main project that is created using the Winform application template as this will compile as an .EXE. The other projects that it calls should be created using the Class Library template which will compile as a .DLL. You can then issue a call prog-name from the main .EXE to a COBOL program that exists in the .DLL as long as you have a reference to that .DLL. You can add a project reference by right clicking on the references folder under the main project name in solution explorer and selecting the .DLL project. If you have other ..DLL projects that contain programs that you need to call and they are not within the same solution then you can add a reference to them in the same manner but instead of adding a project reference you would browser to the actual .DLL location. Note that the CALL statement is only used to call COBOL procedural programs. If you wish to run another winform you would create a new instance of it and then invoke its methods. These forms can exist in other class library projects as long as you have a reference to them. In short, you do not actually call projects or solutions but you call the programs that exist within them. You can call a COBOL program just like you normally would passing parameters through CALL USING and then using a linkage section in the subprogram. If you can provide more detail as to what exactly it is that you are trying to do then perhaps I can provide a small demo to get you started in the right direction. Thanks.

Forum Post: RE: Using 'Call' in Method

$
0
0
Thanks Chris, In a traditional Cobol app (character or gui based) you normally have a main menu with all the options available, ie Customers, Proposals, Sales, Statistics, ..... and all the modules/programs are done separately and when the user selects one option, the control is transfered via a CALL from the main menu to the selected program. In your opinion, what is the best strategy to do this with Visual COBOL? Regards,

Forum Post: RE: Using 'Call' in Method

$
0
0
The strategy would be the same if you wish to keep it that way. Your main application can present the main menu and then you can have separate Class Library projects for Customers, Proposals, Sales, etc. Each of these could have their own set of winforms for presentation to the user but it is normally best to separate the UI portion of the application from the business logic so you may wish to handle all of your presentation logic within the main application and then just call into these other modules as required. I will try to put together a simple demo and then attach it to this post. If others out there could share their own experiences with packaging of a WinForm application, that would be great. Thanks.

Forum Post: RE: Using 'Call' in Method

$
0
0
Great Chris, I am not able to call or invoke the other class projects from the main exe. I will wait for the sample. Thank you!

Forum Post: RE: Using 'Call' in Method

$
0
0
Here is a real simple demo of one way to possibly do this. This is a solution that contains a main Winform application project named mainapp. It also has two class library projects named customer and accounting. Mainapp displays a main menu form allowing you to either run customer, accounting or quit. Depending on the option selected it will invoke a class in either the customer project or the accounting project. These classes in turn will display their own forms with a pushbutton which will call a COBOL subprogram passing parameters and will then return the parameters to the class where the parameter will be displayed on the form. When you click Quit it will exist back a level. Again, this is only one way to set this up. The best method really depends on your particular application. Thanks.

Forum Post: RE: Using 'Call' in Method

$
0
0
Thank you Chris! You allways need all the projects in the same solution? Is not possible to have ie customers in another solution and invoke it from the mainapp? In this particular case, the original Cobol app used to build a dynamic main menu based on a configuration file (COBOL indexed file) and then call each module taking the name from that file. This does not seem to be easy to do with Visual COBOL. Regards

Forum Post: RE: Using 'Call' in Method

$
0
0
You can add a reference to an assembly that is not within the same solution by right-clicking the references folder and selecting browse to navigate to the assembly name, i.e. customer .dll on disk. You can dynamically call COBOL programs by using call data-name just like you always have. In the example that I provided instead of creating an instance of a class for customer or accounting you could make these into programs instead of classes and then you could just call them using call data-name. If you need an example of this let me know and I will try to put one together this week some time. Thanks.

Forum Post: RE: Using 'Call' in Method

$
0
0
I am attaching a new example which shows how to dynamically call COBOL programs which are not within the current solution based on a dynamically created menu. Unzip testdynamicall.zip onto your C drive retaining the folder structure in the zip file. Open up solution file c:\testdynamic\customer\customer.sln and do a rebuild. This solution contains 3 projects, customer, accounting and inventory. Each project contains a main COBOL program which will display a Windows Form allowing you to enter data in a textbox and then return. Open solution c:\testdynamic\testdynamic\testdynamic.sln and do a rebuild. This solution contains the single project testdynamic. If you run this project it will call a subprogram which will read a file containing a list of menu items and their associated program names and then pass back this data in a COBOL table. This data will then be used to populate a list box on the main form and then it will present this form to the user. The user can select a menu item and click the Run program button and it will dynamically call the selected COBOL program which happens to be one of the programs within the customer solution. When you enter data into the forms of these programs it will be returned back to the main program and displayed. You can use any control for a menu including an actual menu or menu strip. I selected a listbox for the sake of simplicity. The testdynamic project contains references to the 3 output files, ACCTPROG.DLL, CUSTPROG.dll, and INVPROG.dll with the Copt Local property set to true. This will cause those .dlls to be copied into the output folder along with testdynamic.exe so that they can be found when the dynamic call is done. Let me know if you have any questions. Thanks.

Forum Post: RE: Using 'Call' in Method

$
0
0
Fantastic Chris! Thank you so much.

Forum Post: Sample Win Book

$
0
0
I'm looking at the example "Win Book - Windows Forms". It is an example of FORMS and CLASS work with in Visual Cobol. If I create another way of working with FORMS and CLASS would be wrong? I'm still doing tests.

Forum Post: RE: Sample Win Book

$
0
0
Hi Claudio, I am not quite sure what you are asking for here. Our Samples are just one way of accomplishing a particular programming task, they are by no means the only way of accomplishing that task. If you provide some more detail on what it is that you are trying to accomplish, perhaps we can offer some suggestions. Thanks.

Forum Post: RE: Semantics

$
0
0
Dear Chris, cobol testprog p(cobsql) csqlt=ora makesyn end-c  xref=yes mode=ansi endp list(); This RUN in Visual Cobol for Eclipse for Windows. But when I try todo the same in a Shell of Compilation in UNIX AIX and don´t Run. Could you please say to me how I have to do this in a shel in UNIX AIX ??? Many Thaks in advanced. PJM

Forum Post: RE: Semantics

$
0
0
Please see the documentation under Preprocess(cobsql) directive here: This shows several examples of how to use this directive from the command line. Thanks.

Forum Post: RE: Semantics

$
0
0
Hi Sorry these are just quick rough notes. If this is a new development then think about using open esql some simple examples in $COBDIR/demo/sql/openesql This would mean your code is note tied to oracle. Your question is about oracle. The IDE is setup to use cobsql this will call oracle procob by default. Using cobsql will mean you will be able to debug your actual code and not the output from the procob precompilier. I would do my first compile using the command line Check you oracle installation points to the correct procob command /home1/support/support/tonyt/procobol which procob /home/products/oracle/11gR2/client_32/bin/procob Whilst you are installing the full client software install everything to get procob installed. Some installation information docs.oracle.com/.../oui4_product_install.htm Install the examples all of them. Interesting maybe www.oratoolkit.ch/.../eeSrv-11g-R2-on-RHEL-6.0-x86_64.php http://www.orafaq.com/wiki/SQL *Plus_FAQ Micro focus documentation documentation.microfocus.com/.../BKDBDBCSQL.html The procob examples have a make file so you will see the compile command and the directives used this should be your base compile command. These are good reference points. If you want to see how procob works then run the example make file, make sure cobsetenv has been run. See setup.sh script. This procob document is also good docs.oracle.com/.../pco08err.htm I did find once a document on the oracle installation, but you will need to go and find it. I would set a side a good day to do this. They have a product oracle sql developer this is worth getting you will need x11 setup thou. COBSQL does use the procob compilier To execute cobsql from the command line Below is a setup.sh /home1/support/support/tonyt/procobol cat setup.sh # # setup oracle # export ORACLE_HOME=/home/products/oracle/11gR2/client_32 export PATH=$ORACLE_HOME/bin:$PATH export LIBPATH=$ORACLE_HOME/lib:$LIBPATH export ORACLE_SID=ORA62SUPXE export TWO_TASK=$ORACLE_SID # # contents of tnsnames.ora # cat $ORACLE_HOME/network/admin/tnsnames.ora | head -12 # JAVA_HOME=/usr/java6 export JAVA_HOME PATH=$HOME/bin:$JAVA_HOME/bin:/sbin:/usr/sbin:$PATH export PATH LANG=en_US export LANG TERM=ansi export TERM # # this set env for visual cobol development HUB # . /home/products/vcdevhub22/bin/cobsetenv COBMODE=32 export COBMODE # # set up path so that ant build script is accessable # PATH=$COBDIR/remotedev/ant/apache-ant-1.7.1/bin:$PATH: export PATH # # test it # cob -V java -version # # end # buildit.sh builds a .o object /home1/support/support/tonyt/procobol cat buildit.sh # # lets produce a 32 bit executable using cobsql. # export COBMODE=32 # # this works # #cob -xgt -C anim -v -k oraclecursor.cbl -C"p(cobsql) makesyn sqldebug debugfile end-c verbose xref==yes mode==ansi endp list()" $ORACLE_HOME/precomp/lib/cobsqlintf.o -L$ORACLE_HOME/lib/ -lclntsh -Nnolitlink # # customer one # # the compile command only has a small number of characters so use a config file. # COBCONFIG=$PWD/rtcob.cfg export COBCONFIG cat $COBCONFIG EOF set cobconfig_error_report=TRUE set core_on_error=3 set CORE_FILENAME="$PWD/core%f%d%t" EOF # # lets just put some test oracle configs into a infile # examplecfg=$PWD/example.cfg export examplecfg cat $examplecfg EOF PAGELEN=10000 MAXOPENCURSORS=250 MODE=ORACLE CLOSE_ON_COMMIT=YES DECLARE_SECTION=NO END_OF_FETCH=100 HOLD_CURSOR=NO RELEASE_CURSOR=NO IRECLEN=250 ORECLEN=250 UNSAFE_NULL=YES DBMS=V8 COMP5=NO SQLCHECK=FULL userid=user/password@ORA62SUPXE EOF # # this outputs a object file .o # cob -xcgt -C anim -v -k oraclecursor.cbl -C"p(cobsql) makesyn sqldebug debugfile end-c verbose config==$examplecfg P(cp) sy endp endp list() listwidth=132" -o oraclecursor.o # # end # There is a config parameter you will need Include=/mycopybooks Here is a simple dummy program change password and user oraclecursor.cbl /home1/support/support/tonyt/procobol cat oraclecursor.cbl       program-id. oraclecursor as "oraclecursor".       environment division.       configuration section.       data division.       working-storage section.           exec sql include sqlca end-exec.      * after an sql error this has the full message text openesql       01  mfsqlmessagetext                      pic x(250).           01  ans                                   pic x(1).       01  abort-flag                            pic x value "N".           88  not-in-abort                            value "N".           88  in-abort                                value "Y".           exec sql begin declare section end-exec.           01  username                          pic x(10).           01  passwd                            pic x(10).           01  oracletime                        pic x(23) value " ".           01  int-col                           pic S9(4) comp-5.           01  rec-col.               03  char-col                      pic x(10).               03  dec92                         pic s9(7)V99 comp-3.               03  testnull-col                  pic x(3).           01  rec-col-null.               03  testnull-col-null            pic s9(4) comp.           exec sql end declare section end-exec.       01  full-rec.           03  char-col-2                        pic x(10).           03  int-col-2                         pic s9(4) comp-5.           03  dec92-2                           pic s9(7)V99 comp-3.           03  testnull-col-2                    pic x(3).       procedure division.       main section.       main-010.           display "main Started "           perform init           if not-in-abort               perform work           end-if           perform fini           display "main press any key to return"           accept ans           .       main-090.           goback.       init section.       init-010.           display "init Started "           set not-in-abort to true           exec sql whenever sqlerror do perform sqlerror end-exec           exec sql whenever sqlwarning do perform sqlwarning end-exec           exec sql whenever not found continue end-exec           move "user" to username.           move "password" TO passwd.           exec sql              connect :username identified by :passwd           end-exec.      *      * let test we can get data from data base      *           exec sql               select to_char(systimestamp, 'DD/MM/YYYY HH24:MI:SS')                   into :oracletime from dual           end-exec           display "time from database ", oracletime, " "           .       init-090.           exit.       work section.       work-010.           display "work Started "      *      * drop table create new table      * populate this table with 2 rows      *           display "work drop table "           exec sql               drop table mfsqltest           end-exec           display "work create table "           exec sql               create table mfsqltest (                   char_col            char(10),                   int_col             integer not null,                   dec92               decimal(9,2),                   testnull_col        char(3))           end-exec           display "work create row 1 using host variables "           move "ORIGINAL" to char-col           move 9999 to int-col           move 1234567.12 to dec92           exec sql               insert into mfsqltest                   (char_col,int_col,dec92,testnull_col) values                   (:char-col, :int-col, :dec92, NULL)           end-exec           display "work insert row 2 using host record "           move "NEW" to char-col           move 1111 to int-col-2           move 98765.43 to dec92-2           move "DTM" to testnull-col-2           exec sql               insert into mfsqltest                   values                   (:full-rec)           end-exec           display "work commit work "           exec sql               commit work           end-exec      *      * lets test a update of a row      *           display "work update row "           move "UPDATED" to char-col           move 9999 to int-col           move 7654321.21 to dec92           exec sql               update mfsqltest set char_col = :char-col,                                    dec92 = :dec92                   where int_col = :int-col           end-exec           display 'work Verify updated data before rollback '           display "work test the null column processing"           initialize full-rec           move 9999 to int-col           exec sql              select * into :full-rec                    from mfsqltest                    where int_col = :int-col           end-exec           display 'work rollback '           exec sql               rollback           end-exec           display 'work Verify data after rollback using cursor '           exec sql               declare vcurs cursor for                   select char_col, dec92, testnull_col from mfsqltest                       where int_col = :int-col           end-exec           move 9999 to int-col           initialize rec-col           exec sql               open vcurs           end-exec           display 'work fetch row-col 1 '           exec sql               fetch vcurs into :rec-col           end-exec           display 'work test past end of fetch '           exec sql               fetch vcurs into :rec-col           end-exec           exec sql               close vcurs           end-exec           .       work-090.           exit.       fini section.       fini-010.           display "fini Started "               exec sql commit work release end-exec           .       fini-090.           exit.       sqlerror Section.       sqlerror-010.            display "Error code sqlcode is " sqlcode.            display "Error message sqlerrmc is " sqlerrmc.            display "mf mfsqlmessagetext is " mfsqlmessagetext            display "sqlerror press enter Y to abort :"            move "N" to ans            accept ans            if ans = "Y"               move sqlcode to return-code               goback            end-if            .       sqlerror-090.            exit.       sqlwarning Section.       sqlwarning-010.            display "Warning code sqlcode is " sqlcode.            display "Warning message sqlerrmc is " sqlerrmc.            display "mf mfsqlmessagetext is " mfsqlmessagetext            if sqlwarn1 equal "W"                display "Data has been truncated.".            if sqlwarn2 equal "W"                display "A null value was eliminated from the argument      -                 " set of a function.".            if sqlwarn3 equal "W"                display "An into clause had too many or too few host      -         " variables.".            if sqlwarn4 equal "W"                display "A dynamic update or delete was lacking a where      -         " clause.".            if sqlwarn5 equal "W"                display "A server conversion or truncation error      -         " occurred.".            display "sqlwarning press enter :"            accept ans            .       sqlwarning-090.           exit.       end program oraclecursor. Program build a command line build to executable cob -xgt -C anim -v -k oraclecursor.cbl -C"p(cobsql) makesyn sqldebug debugfile end-c verbose config==$examplecfg P(cp) sy endp endp list() listwidth=132" $ORACLE_HOME/precomp/lib/cobsqlintf.o -L$ORACLE_HOME/lib/ -lclntsh –Nnolitlink The output from -v cob32 -C nolist -xgt -C anim -v -k oraclecursor.cbl -Cp(cobsql) makesyn sqldebug debugfile end-c verbose config==/home1/support/support/tonyt/procobol/example.cfg P(cp) sy endp endp list() listwidth=132 /home/products/oracle/11gR2/client_32/precomp/lib/cobsqlintf.o -L/home/products/oracle/11gR2/client_32/lib/ -lclntsh -Nnolitlink * Micro Focus COBOL                  V2.2 revision 000           Compiler * Copyright (C) Micro Focus 1984-2013. All rights reserved. * Accepted - verbose * Accepted - reentrant * Accepted - nolist * Accepted - anim * Accepted - p(cobsql) makesyn sqldebug debugfile end-c verbose config=/home1/support/support/tonyt/procobol/example.cfg P(cp) sy * Accepted - list() * Accepted - listwidth(132) * Cobsql Integrated Preprocessor * Compiling oraclecursor.cbl * CSQL-I-004: Accepted makesyn * CSQL-I-004: Accepted sqldebug * CSQL-I-004: Accepted debugfile * CSQL-I-004: Accepted verbose * CSQL-I-005: Passing config=/home1/support/support/tonyt/procobol/example.cfg * CSQL-I-003: COBSQLTYPE is incorrect defaulting to Oracle * CSQL-I-008: Invoking cp Preprocessor * CSQL-I-017: Creating "oraclecursor.cs9" * CSQL-I-018: Invoking Oracle Precompiler/Translator procob iname="oraclecursor.sks" oname="oraclecursor.cs9" lname="oracle cursor.lis" config=/home1/support/support/tonyt/procobol/example.cfg "oraclecursor.sdb" * Host Variables * -------------- * 03  CHAR-COL OF REC-COL                                 Charf(10) *   oraclecursor.sks        26       108       134 * 03  DEC92 OF REC-COL                                    Decimal(9,2) *   oraclecursor.sks        27       108       135 * 01  FULL-REC                                            Group Item *   oraclecursor.sks        33       119       145 * 01  INT-COL                                             Short Integer *   oraclecursor.sks        24       108       136       147       159 * 01  ORACLETIME                                          Charf(23) *   oraclecursor.sks        22        73 * 01  PASSWD                                              Charf(10) *   oraclecursor.sks        20        66 * 01  REC-COL                                             Group Item *   oraclecursor.sks        25       170       175 * 01  USERNAME                                            Charf(10) *   oraclecursor.sks        19        66 * Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reser * SQL Identifiers * --------------- * BIT32                 DEFINE                        Command Line * COMP5                 DEFINE                        Command Line * UNIX                  DEFINE                        Pre-defined * VCURS                 CURSOR *   oraclecursor.sks       157       165       170       175       179       157 * Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reser *                               Precompiler Options * ------------------------------------------------------------------------------ * Option Name    Current Value        Where set * ------------------------------------------------------------------------------ * asacc             no                default * assume_sqlcode    no                default * auto_connect      no                default * charset_picn      nchar_charset     default * charset_picx      db_charset        default * close_on_commit   yes               /home1/support/support/tonyt/procobol/exam * common_parser     no                default * comp5             no                /home1/support/support/tonyt/procobol/exam * config            /home1/support/supcommand linerocobol/example.cfg * cwh_sql99         yes               default * date_format       local             default * db2_array         no                default * dbms              V8                /home1/support/support/tonyt/procobol/exam * declare_section   no                /home1/support/support/tonyt/procobol/exam * define            BIT32             /home/products/oracle/11gR2/client_32/prec *                   COMP5             /home/products/oracle/11gR2/client_32/prec *                   *none*            /home/products/oracle/11gR2/client_32/prec * dynamic           oracle            mode * end_of_fetch      100               /home1/support/support/tonyt/procobol/exam * errors            yes               default * file_id           0                 default * fips              no                default * format            ansi              default * hold_cursor       no                /home1/support/support/tonyt/procobol/exam * host              cobol             default * implicit_svpt     no                default * iname             oraclecursor.sks  command line * include           *none*            default * ireclen           250               /home1/support/support/tonyt/procobol/exam * litdelim          quote             default * lname             oraclecursor.lis  command line * lreclen           132               default * ltype             long              default * maxliteral        256               default * maxopencursors    250               /home1/support/support/tonyt/procobol/exam * max_row_insert    0                 default * mode              ORACLE            /home1/support/support/tonyt/procobol/exam * nested            yes               default * nls_local         no                default * oname             oraclecursor.cs9  command line * oraca             no                default * oreclen           250               /home1/support/support/tonyt/procobol/exam * outline           no                default * outlnprefix       *none*            default * pagelen           10000             /home1/support/support/tonyt/procobol/exam * picn_endian       big               default * picx              charf             dbms * prefetch          1                 default * release_cursor    no                /home1/support/support/tonyt/procobol/exam * runoutline        no                default * select_error      yes               default * sqlcheck          FULL              /home1/support/support/tonyt/procobol/exam * stmt_cache        0                 default * threads           no                default * type_code         oracle            mode * unsafe_null       yes               /home1/support/support/tonyt/procobol/exam * userid            dbsupport/Unidos30/home1/support/support/tonyt/procobol/exam * varchar           no                default * xref              yes               default * Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reser * Statistics * ---------- * Return code: 0 * Number of messages at severity I: 0 * Number of messages at severity W: 0 * Number of messages at severity E: 0 * Number of messages at severity F: 0 * Number of input lines: 234 * Number of host variables declared: 20 * Number of cursor names: 1 * Number of statement names: 0 * Maximum memory (bytes) used: 149617 * CSQL-I-020: Processing output of Oracle Precompiler * CSQL-I-027: Detected Working-Storage, now processing it * CSQL-I-028: Now processing through Procedure Division * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-029: Found an EXEC SQL Statement, processing it * CSQL-I-001: Cobsql has finished returning to the Checker * Total Messages:     0 * Data:        2640     Code:       10739 * Micro Focus COBOL Code Generator * Copyright (C) Micro Focus 1984-2013. All rights reserved. * Accepted - verbose * Accepted - anim * Accepted - nolitlink * Generating oraclecursor * Data:        2424     Code:       24080     Literals:        1544 Entry points defined in module: oraclecursor.o        *oraclecursor Entry points defined in module: /home/products/oracle/11gR2/client_32/precomp/lib/cobsqlintf.o        SQLAB1        SQLGSST        SQLGSS        SQLGS2        SQLGLS        SQLGLST        SQLADR        SQLADRCR        SQLADRVC        SQLAD1        SQLALD        SQLALDT        SQLBS1        SQLCDA        SQLCUR        SQLFCC        SQLFCH        SQLGB1        SQLLO1        SQLLDA        SQLLD2        SQLLEN        SQLMOV        SQLOCA        SQLOS1        SQLPCS        SQLSQS        SQLSTRD        SQLTFL        SQLTOC        SQLGRI        SQLNUL        SQLNULT        SQLPRC        SQLPRCT        SQLPR2        SQLPR2T        SQLBEX        SQLBXT        SQLORA        SQLORAT        SQLGLM        SQLGLMT        SQLBCC        SQLBTE        DSNTIAR        SQLROWIDGET Run the executable /home1/support/support/tonyt/procobol ./oraclecursor main Started init Started time from database 19/02/2014 15:04:42     work Started work drop table work create table work create row 1 using host variables work insert row 2 using host record work commit work work update row work Verify updated data before rollback work test the null column processing work rollback work Verify data after rollback using cursor work fetch row-col 1 work test past end of fetch fini Started main press any key to return You need tnsnames.ora setup to point to db if not on this machine And two_task environment variable. /home1/support/support/tonyt/procobol . ./setup.sh # tnsnames.ora Network Configuration File: /home/products/oracle/product/11.2.0/client_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. ORA62SUPXE =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = nwb-ora62sup)(PORT = 1521))    (CONNECT_DATA =      (SERVER = DEDICATED)      (SERVICE_NAME = XE)    )  ) COBDIR set to /home/products/vcdevhub22 version @(#)cob.c       2.2.0.93 PRN=KXCAI/AAD:Ao.U4.13.04 PTI=32/64 bit PTI=Micro Focus Visual COBOL Development Hub 2.2 PTI=pkg_77569 PTI=ES PTI=SOA Configured I see no work java version "1.6.0" Java(TM) SE Runtime Environment (build pap3260sr6-20090925_01(SR6)) IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 AIX ppc-32 jvmap3260sr6-20090923_42924 (JIT enabled, AOT enabled) J9VM - 20090923_042924 JIT  - r9_20090902_1330ifx1 GC   - 20090817_AA) JCL  - 20090924_01 Well if we have got this far. We can use eclipse creating a remote project. Before we start You will need two make sure these variables are available to the remote rdo daemon The oracle ones # # setup oracle # export ORACLE_HOME=/home/products/oracle/11gR2/client_32 export PATH=$ORACLE_HOME/bin:$PATH export LIBPATH=$ORACLE_HOME/lib:$LIBPATH export ORACLE_SID=ORA62SUPXE export TWO_TASK=$ORACLE_SID # # contents of tnsnames.ora # cat $ORACLE_HOME/network/admin/tnsnames.ora | head -12 # JAVA_HOME=/usr/java6 export JAVA_HOME PATH=$HOME/bin:$JAVA_HOME/bin:/sbin:/usr/sbin:$PATH export PATH LANG=en_US export LANG TERM=ansi export TERM # # this set env for visual cobol development HUB # . /home/products/vcdevhub22/bin/cobsetenv COBMODE=32 export COBMODE Then start the rdo daemon $COBDIR/remotedev/startrdodaemon On the PC Create a remote project. Add the program I have given you here or a example. Add this to additional directives LIST() COPYEXT(CPY,cpy,cob) OSEXT(CPY,cpy,cob) p(cobsql) DISPLAY VERBOSE SQLDEBUG end-c DEFINE=BIT64  COMP5=YES  DEFINE=COMP5  p(cp)  endp endp The above you can change to use config files and directives files. Now we need to get this project to know about the clntsh lib Put this in additional link directives -L/home/products/oracle/11gR2/client_32/lib/ -lclntsh –Nnolitlink Now we need to tell the project about external object files We add this to addition items to be linked cobsqlintf.o press add external files and browse to the 32 bit directory /home/products/oracle/11gR2/client_32/precomp/lib/cobsqlintf.o Apply and then clean compile Now just try to debug this application. Sorry these are very rough notes, but hope they help Regards Tony

Forum Post: Error in COPY "lixmldef.cpy".

$
0
0
We are compiling using Visual Cobol 2.2 with SQL embedded, and ProCobol Oracle. Everything was working fine until we include the copy: lixmldef.cpy. The Oracle Pre-compiler  gives us the next error: System default option values taken from: /SOFTORACLE/product/11.2.0/client_1/pre Error at line 4988, column 21 in file /MNG/DESA/VFUENTES/ATS/TIEN286.sks          MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions. ....................1 PCB-S-00400, Encountered the symbol "COBOL" when expecting one of the following:    integer IDENTIFICATION ENVIRONMENT DATA PROCEDURE    WORKING-STORAGE LINKAGE END COMMUNICATION FILE LOCAL-STORAGE    REPORT SCREEN CONSTANT THREAD-LOCAL-STORAGE DECIMAL-POINT    REPLACE COPY end of statement EXEC EXEC_SQL EXEC_SQL_BEGIN    EXEC_SQL_END EXEC_SQL_VAR EXEC_SQL_INCLUDE EXEC_ORACLE    EXEC_ORACLE_ENDIF EXEC_ORACLE_ELSE The symbol "COPY" was substituted for "COBOL" to continue. PCB-I-0556:  Unrecoverable error.  Fix previous errors and re-precompile Error at line 4988, column 27 in file /MNG/DESA/VFUENTES/ATS/TIEN286.sks          MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions. ..........................1 PCB-S-00400, Encountered the symbol "XmlExtensions" when expecting one of the fo llowing:    integer IDENTIFICATION ENVIRONMENT DATA PROCEDURE    WORKING-STORAGE LINKAGE END COMMUNICATION FILE LOCAL-STORAGE    REPORT SCREEN CONSTANT THREAD-LOCAL-STORAGE DECIMAL-POINT    REPLACE COPY end of statement EXEC EXEC_SQL EXEC_SQL_BEGIN    EXEC_SQL_END EXEC_SQL_VAR EXEC_SQL_INCLUDE EXEC_ORACLE    EXEC_ORACLE_ENDIF EXEC_ORACLE_ELSE and we do not know because the pre-compiler gives us this error. Can anyone help us?

Forum Post: RE: Error in COPY "lixmldef.cpy".

$
0
0
Hi Jose, So your program is using both Pro*COBOL and XML extensions is that correct? The statement that is causing it to fail for you is a conditional compile statement in the copybook that is meant to set a data item only if compiling for .NET managed code. $IF ILGEN SET       01  XMLEXT  type         MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions. $END XML extensions are supported in both native code and managed code programs but ProCOBOL is only supported for native. I just tested this here and I do get the same results as you and that is because Pro*COBOL does not know what to do when encountering this structure. You might try commenting out these offending statements or you might want do not use XML extensions directly within COBOL programs containing embedded SQL but instead place XML extensions in subprograms that can be called and compiled without procobol. If this is still a problem for you then I would suggest that you open up a support incident with Customer Care to report this problem and perhaps we can find a different workaround for you, Thanks.

Forum Post: RE: Error in COPY "lixmldef.cpy".

$
0
0
Hi Chris, I appreciate your speed in answering our problem. Yes our programs are using both, XML and PRoCobol. We are not compiling for .NET. Our executables program are running under UNIX. If we comment these sentences, this could solve the problem? Could we modify the code like this ?:      *  $IF ILGEN SET      *  01  XMLEXT  type      *        MicroFocus.COBOL.XmlExtensions.MicroFocusCOBOLXmlExtensions.      * $END Thank in advance Jose Maria

Forum Post: RE: Error in COPY "lixmldef.cpy".

$
0
0
Yes, try commenting out the code as you indicate. I am not really sure if that is the only place that you will need to do this but give it a try and see.

Forum Post: RE: Error in COPY "lixmldef.cpy".

Forum Post: PL-SQL TYPE HEADER

$
0
0
Dear Chris, Could you please say to me how I can put a PL-SQL TYPE HEADER into a Visual Cobol Program ??? Many Thanks, PJM
Viewing all 5819 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>