Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Accessing an Excel 97 Spreadsheet with Embedded SQL Resolution: Create a spreadsheet that will be used with embedded SQL by creating one that contains name/titles at the top of each column. These titles will be the column names used in the embedded SQL statements. Highlight the whole table or the applicable piece of the worksheet and assign a name to this group of data. This is accomplished by selecting INSERT > NAME > DEFINE function. This name will be the table name assigned to this data. The Save As function must be used to save this spreadsheet. Now you can create a datasource using an appropriate ODBC driver for Excel, and point it to this .xls file. Below is an example of a spreadsheet. The group of data is named tsttable. Table tsttable has 4 columns - field1, field2, field3 and field4. In the attached COBOL program, generated by the OpenEsql Assistant, you will see the columns identified in the SELECT statement as f
Problem: Got back this error and have to use INITIALIZE for numeric data items. Resolution: Yes, you will get back this error also if the VALUE clause is not used for data items at compile time. The reason for this is (s. Language Reference Chapter 3:Language Fundamentals): >The initial state of a data item depends on the presence or absence of a VALUE clause in its data description entry...< Therefore, you have to adjust all data items to the correct numeric data type to avoid error 163. You can get additional information from KB article#17644. Old KB# 7024
Problem: OPEN Cursor declared as ... WITH HOLD returned SQLCODE of -19520 Error states connection does not support HOLD cursors. Resolution: Make sure that the ODBC driver is configured to allow Cursors declared as WITH HOLD Old KB# 7072
Problem: Error 107 "Operation not implemented in this Run-Time System" when creating a thread using the START verb. Resolution: The error occurs if you are using the single-threaded runtime when creating a thread. If you get this when animating or running .int code, you must specify the multi-threaded runtime in the "Animate...Settings" menu, "Use multi-threaded runtime" checkbox. Old KB# 7034
Problem: Calling Microsoft SQL Server Stored Procedures from OpenESQL Resolution: The attached program illustrates various methods of invoking SQL Server stored procedures. The procedures are very simplistic but demonstrate the mechanism for creating and calling stored procedures with SQL Server. Solution: The stored procedure 'mfexecsptest' has two input parameters and one output parameter. The procedure adds the two input parameters together to produce the output value. It is invoked in the first and second examples through an embedded sql CALL statement. Example 1 demonstrates invoking the procedure with positional values, that is, the physical order of the input data in the CALL is associated, in order, with the stored procedure parameters as defined in the Create Procedure statement. This is referred to as 'passing by position'. Example 2 demonstrates invoking the stored procedure and passing the data by reference. The name of each st
Problem: How to call ORACLE stored procedures and functions using the ODBC interface in Net Express . Resolution: The attached program illustrates various methods of invoking an Oracle stored procedures and functions. This Cobol program illustrates invoking these procedures and functions with positional values, that is the physical order of the input data in the CALL is associated, in order, with the stored procedure and functions parameters as defined in the CREATE statement. This sample program also demonstrates the use of an Oracle package. An oracle package is just a logical way of grouping objects together. It consists of a specification which identifies the interface to each object (stored procedure and function) and the body, which implements the procedural logic. The procedures and functions are very simplistic but demonstrate the mechanism for creating and calling ORACLE stored procedures and functions through the ODBC interface in Net Express. The
Problem: The following is an example of how to use the XML PARSE statement within Net Express. This example is different to the XMLPARSE example on the SupportLine Net Express examples page. That demonstrates the use of the Microsoft XML parser MSXML COM server, whereas this example demonstrates IBM XML PARSE. Resolution: $SET MF id division. program-id. testparse. data division. working-storage section. 01 xml-document. 05 pic x(36) value '<?xml version="1.0" encoding="UTF-8"'. 05 pic x(19) value ' standalone
Problem: INSERT/UPDATE/DELETE statements return SQLCODE of 0, though the changes have not been applied to the database. Why are the INSERT/UPDATE/DELETE statements not working? Resolution: The default behavior will be to rollback. You should either code an explicit EXEC SQL COMMIT statement, or with OpenESQL applications, compile with the SQL(AUTOCOMMIT) compiler directive. Old KB# 7009
Problem: Using Net Express I-O syntax to read an XML document which is in the form: <containing-doc> <childdoc1></childdoc1> <childdoc2></childdoc2> </containing-doc>, where there can be 100,000 or more instances of the <childdocn> element. When this file is opened for input, and a READ filename is executed, the entire document will be read into memory in the form of an XML DOM tree. If the document being read is very large, say 60MB , this READ operation could take up to an hour or so, and it may actually use up all the available virtual memory on your computer. This would result in a Windows error message about the system's Virtual Memory being too low and the program would then crash. Resolution: There are a few ways that you can work around this problem. 1. Increase the amount of Virtual Me
Problem: RTS114 error returned on call to Oracle procedure from OpenESQL application COBES0100S Incorrect SQL statement syntax near begin Resolution: When converting Pro*COBOL applications to execute using OpenESQL, note that the syntax for calling Oracle procedures may differ. Specifically : o PL/SQL cannot be used with OpenESQL applications. o Parameters should be followed by the parameter type, i.e. IN, INPUT, INOUT, OUT, OUTPUT. If no type is specified, INPUT is assumed. Whereas under Pro*COBOL, you would code : EXEC SQL EXECUTE BEGIN mySchema.myProc( :param1,
Problem: NOANIM used in compile statement still results in ANIM shown in listing when using CONFIRM directive. Why would ANIM show in the list produced by the CONFIRM directive when NOANIM is used at compile time? Resolution: NOANIM is the default setting when working from a Net Express command prompt and using the COBOL compiler or CBLLINK. ANIM is the default setting when working within a Net Express project. In a Net Express, Release Build you can use a Cobol.dir file in the project directory for these compiler directives: show-dir setting"col3" confirm list() to obtain a listing file. In Project (menu), Properties (button) you must negate (with a "no" prefix) these compiler directives: WB3 WB CSI ANIM and NOANIM shows in the listing file! IMPORTANT: Using the XREF directive will force ANIM because the checker has to do processing ======= that it would only do when compiling for animati
Problem: Please send an example of conversion of 'YYYYMMDD' date format to integer format and then conversion to Julian date plus reverse conversion back to 'YYYYMMDD'. Resolution: This conversion begins with a date consisting of the year, the month and day (20040827) stored in a data item named "YYYYMMDDItem". The INTEGER-OF-DATE intrinsic function is used to convert this date into an integer value that is the number of days elapsed since December, 31, 1600, in the Gregorian calendar (147,432) with the result stored in a data item named "integerDate". Next, the DAY-OF-INTERGER intrinsic function is used to convert the "integerDate" item into a Julian date of the form YYYYDDD storing the result (2004240) in the data item named "julianDate". Reversing this conversion is accomplished by using the INTEGER-OF-DAY intrinsic function to convert the "julianDate" data item to an integer valu
Problem: Running an application from within a .bat file, and would like a way to check the cond code. Resolution: An example script file: @echo off rem - sample batch files using selection list :begin cls myapplication if errorlevel == 3200 goto 3200 if errorlevel == 1600 goto 1600 if errorlevel == 2 goto two if errorlevel == 1 goto one goto end :3200 echo you have selected 3200 goto end :1600 echo you have selected 1600 goto end :two echo you have selected two goto end :one echo you have selected one :end rem next line will end current window rem exit Old KB# 7035
Problem: Would like to use CBL2XML to generate the copybook for an XML document that has multiple record definitions at the element level, depending on the value in a contained attribute. Resolution: The CBL2XML tool has a restriction on this type of construct. It will only generate the record description for the first record type specified in the schema. It will ignore any multiple record types or redefinitions of elements. This is a restriction in CBL2XML only, and not in the XML support provided by Net Express. The XML syntax support does provide for this type of redefinition in two different ways. Both ways are documented, with example code, in the Net Express On-Line Help. The first method is to use variables as tag names and values so that you can read any type of XML layout, and receive the names of the tags that are found, along with the corresponding data. This allows you to read an XML document with
Problem: Crreating line sequential files with escape sequences, and they are not working as expected because Net Express inserts null values. Resolution: To eliminate nulls being placed in line sequential files: Either create a text file called extfh.cfg with the following entries [XFH-DEFAULT] INSERTNULL=OFF then set environment variable extfh=x:\\directoryname\\extfh.cfg or set environment variable cobsw=-N which turns off null insertion Old KB# 7054#netexpress#RMCOBOL#AcuCobol#COBOL#ServerExpress
Problem: How to to generate a copyfile for an XML document for which only a Document Type Definition (DTD) file is being used to describe the data elements in the document. Resolution: The CBL2XML tool cannot use a .DTD file in the production of a copybook. The Document Type Definition (DTD) file needs to be converted to a schema in order to be usable with CBL2XML. There are many 3rd party tools that can do this automatically, including a product called Stylus Studio. If you use Stylus Studio, and click on File>Document Wizards, you can select "DTD to XML Schema". Load your DTD and it will be converted to a corresponding XSD schema file. A DTD file does not allow for different data types and lengths to be specified for elements and attributes within a document, so the Schema that is generated will have all elements defined as a string type with an unbounded length. Add the following line to the beginning of the
Problem: sqlcode=-208 Invalid object name for Sql*server 7 when doing an insert into local temporary table Resolution: The solution will be to create a local temporary table (#temptable) using Execute Immediate statement, then you will be able to do the insert. It's is a Microsoft problem for Sql*server 7 with ODBC drivers. Old KB# 7069
Problem: Does an XML schema need to be present for a Net Express program to read an XML document? Resolution: The schema file does not need to be present in order for a Net Express program to read the XML document. The schema file must be present only in the generation of the COBOL XML-enabled copyfile when using the CBL2XML tool. CBL2XML creates the COBOL copybooks by using the data type and length information that are defined for the XML document within the schema file. In this way an element described as "type=xsd:integer" in the document will be read into a numeric COBOL field etc. CBL2XML does not have to be used to generate the copybooks. It is the most convenient and easiest method, but a programmer can code the entire XML record description by hand if they wish to. However, they still must know the names and description of the elements within the file, or there will be no mea
Problem: Can you retain breakpoints using CBL_DEBUGBREAK outside the Net Express project, especially in a IBM TX Series CICS environment? Resolution: In Net Express IDE the breakpoints are held in the project, so it's not possible to retain them when using CBL_DEBUGBREAK. Furthermore, there's no way of retaining breakpoints outside of Net Express projects, using CBL_DEBUGBREAK in an CICS environment. Old KB# 7003
Problem: We have programs which have one name for the .CBL filename and a different name for the Program-Id field. Can we compile and Animate them in Micro Focus? Resolution: There is a directive, Prog-Id-Int-Name, which allows one to use something like this: Files named A1.Cbl, A2.Cbl, A3.Cbl Program Id's are X1, X2, X3 The CALLing sequence is X1 CALLs X2 which then CALLs X3 By passing the Prog-Id-Int-Name directive, we create INT & IDY files named X1, X2, X3, but the Animator will use the .Cbl files for displaying the source. Old KB# 6985
Problem: A .Net project reports a RTE 173 cbl_xmlio not found when executing an OPEN on an XML file Resolution: At the moment, we've only a workaround: Add the directive: $set ILPINVOKE(cblxmls.dll) to those COBOL .Net programs, which need XML You will need: $set ILPINVOKE(cblxmlm.dll) for mulit-threaded applications Old KB# 6959
Problem: No, add COPYEXT"CPY,COB" directive to the Project | Properties | Project directives. After adding this directive use the Project | Update all dependency to update the project. Be sure that you have only one semi-colon as the last entry within the Project directives %FILENAME COBIDY(%TARGETDIR) WB3 WB CSI ANIM EDITOR(MF2) ENSUITE(3) COPYEXT"CPY,COB" Resolution: Old KB# 6979
Problem: This indicates that the Oracle client does not know what instance to connect to, or which TNS alias to use. Resolution: On Windows, using an Oracle connection without the instance name requires the LOCAL environment variable to be set to an instance defined to the system. The example below requires LOCAL to be set because the instance is not specified. EXEC SQL CONNECT :USERNAME IDENTIFIED BY :PASSWD END-EXEC. The following example defines the instance, and will therefore override the value set in LOCAL if it has been set. EXEC SQL CONNECT :USERID IDENTIFIED BY :PASSWD USING :INSTANCE END-EXEC. Old KB# 7005
Problem: Are there any demos showing how to create an ActiveX list box? Resolution: We would suggest you look at: 1) On our web site under the support demos section you can find: actxsamp.zip cbl2vbx.zip 2) In Net Express there are a number of demos under: \\Net Express\\Base\\DEMO\\OLEDEMOS 3) You may also want to look at Dialog System as this may provide the functionality your customer requires. Old KB# 6950
Problem: how do you put a quote in the middle of text that you want to print? Resolution: Use 3 quotes. For example: if you want to use the string "the "special" item" define it as "the """special""" item" Old KB# 6995
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.