Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: Attempting to read in an XML document, move i's elements to a new output XML file with the same layout, and write all the records to the new file. The document file contains one root element called <letteroutput> and this is speciified at the 01 level of the record description. Within this one root element there can be any number of child elements called <dunning_letter> which itself contains other child elements and attributes. Reading through the input file using READ NEXT KEY DUNNING-LETTER, and then was moving the elements of each record to the output record, followed by a WRITE LETTER-OUTPUT, and ending up with the <letteroutput> tag for each id (key). move c-type to o-type move c-id &n
Problem: When attempting to generate COBOL calling C#, the regasm command gets error "cannot bind to server <DLL name>" Resolution: The following steps will allow Cobol to call a .net dll. 1. Create a new VS.NET class library and add a simple method that returns a string. 2. Strongly name the assembly Use the sn.exe utility to create a key for the assembly (sn.exe -k TestKey.snk) 3. Add TestKey.snk to the VS.NET project and modify the AssemblyKeyFile attribute in AssemblyInfo.cs to have the filepath to TestKey.snk i.e. (last three lines in the AssemblyInfo.cs) [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile(@"C:\\Net Express\\Base\\DEMO\\omdmap\\TestKey.snk")] &nb
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: Is it possible to access multiple databases within a single OpenESQL application? Resolution: Yes. This is easily accomplished using named connections and the SET CONNECTION statement. At the beginning of your program you must connect to each database you wish to access. Each CONNECT statement specifies the AS clause which associates a user-defined name to the database connection. When access to a specific database is required the SET CONNECTION statement is issued specifying the name associated with the desired database connection. All subsequent SQL will access this database connection until another SET CONNECTION statement is issued. Below is a simple program that demonstrates accessing an SQL Server database and a DB2 database. The program opens a cursor on the DB2 database, fetches a row and, based on the value for discount-stor-id, retrieves a row from the DB2 database. Data Division. 01 dsqlcode pic s9(4) comp-5. EXEC SQL INCL
Problem: Net Express 4.0: Trying to open project files .app you get back error message: 'Project file does not contain a version string' and a 'Save' does not run correctly before. Resolution: Probably, you have lost local 'user admin rights' in Windows, after setting this back to 'user admin rights' you should be able to open all .app files in a right manner. Old KB# 7010
Problem: DB2 application returned SQLCODE -1403 on connect statement Resolution: sqlcode =-1403 The username and or/ password supplied is incorrect for DB2 ECM interface if you use the host variables for userid and password in the connect statement and these host variables are longer then actual name and password.To resolve use null termination (Example: Move 'userid' & x'00' to db-userid) to both user nme and password. This should no longer occur with Net Express 3.1 and later. Old KB# 7064
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: 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: SQL Server Table not showing up in OpenESQL assistant, though it appears within the SQL Server query analyzer. Resolution: Ensure that the ODBC data source name is configured to use the correct database. Old KB# 7065
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: 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: My questions is : when it says "removed from memory", what does it means ? " A .dll file is automatically removed from memory when a COBOL program within it is cancelled" Resolution: This depends on the setting in the IDE for the Project Properties>Application>Program Loading tab for the "Cache Programs" option. If this is checked then a CANCEL for a program contained within a .DLL will not release the physical memory for the .DLL. If a program in the .DLL is called again then the same .DLL will be used but the program will be in it's initial state. If the Cache Programs option is not on then doing a CANCEL progname for any program within the .DLL will physically remove it from memory. Old KB# 7031
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: Where is find on field option in Net Express Data File Editor Resolution: Steps for finding a value assoicated with a specific field in a datafile: 1. open the datafile - select file > open 2. open the associated structure (str) - select file > data tools > load record layout 3. from the record layout (structure) click on the field name containing the value to be searched 4. select search > data tools > data file find and replace, a find dialog box is displayed 5. in the dialog box - check hex option 6. after checking hex, Use field option will be available for checking - check Use field note: This will automatically check Within Offsets option displaying the proper value for Left and Right based on field position in record and field length. Left and Right can be changed to isolate a particular range within the specified field if nece
Problem: Microsoft have implemented security on MAPI based applications so counter virus threats on desktop applications. MS Oulook when used with MAPI based applications now prompt when an external application attempts to send email. An application may not want this level of security. Using SMTP as a medium for send email may work better for the application. Resolution: There are 2 demoes attached. One is a .Net solutoin that uses .Net classes to send an email. Also there is a Win32 based Net Express demo that shows how to use CDO for Windows2000 ( available with Windows2000/XP/2003). Attachments: cdo.zip Old KB# 7018
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: 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: The same CGI (or any CGI's) runs with previous versions of IIS, but when it is executed on IIS 6.0 of Windows 2003, IIS returns error 404. Resolution: This error is expected, as the default behavior in IIS 6.0 is to prevent any CGI's and ISAPI's applications being executed. Users will have to register each CGI or each ISAPI in IIS to allow it to be executed. To register a CGI or an ISAPI: 1. Start IIS Manager from Administrative Tools 2. Expand (local computer) 3. Click on "Web Service Extensions" 4. Follow the instructions on the right hand pane on how to add a new web service extension Old KB# 7029
Problem: Use PANELS2 functions or Class library reference's methods. In the code pasted below, the Entry field's handle is set in the data EFhandle of the data-block through the use of the Dialog system function MOVE-OBJECT-HANDLE The MOVE-OBJECT-HANDLE function lets you save the handle of an object in a numeric data item in the Data Block. This ensures the same objects are being referenced by both the Panels V2 and the Dialog System parts of your application. As an example: MOVE-OBJECT-HANDLE RENAME-PB PB-HAND MOVE-OBJECT-HANDLE RENAME-WIN WIND-HAND Resolution: class-control. EntryField is class "txtentry". DATA DIVISION. WORKING-STORAGE SECTION. 78 dialog-system &
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: What are the maximum file limits when using FILEMAXSIZE=8. Resolution: The large file support is as follows: 1) By default, shared files can be up to 1GB, unless you use LOCKTYPE=2. In the latter case, the file size is limited by whether duplicate key compression is used: 4GB if it is not and 2GB if it is. 2) If you want to go beyond this then you can use IDXFORMAT(8) which allows 256TB for the default 48bit pointer form. 3) Some OSs (e.g. 95) will not allow files greater than 2GB and such cases you can use STRIPING which has a maximum of 512GB (256 x 2GB). Please take note of issues with FAT format and mixing environments when using large files on Windows. Old KB# 7063#ServerExpress#AcuCobol#RMCOBOL#COBOL#netexpress
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: After installing Net Express .NET enhancement you can not start the .NET IDE also the NetX4.0 IDE because there is a hint that the file dte.olb fails. Resolution: You should try to re-register this Microsoft file via regsvr32 from command-line, probably it was unregistered during the installation procedure. This file can be found in ..\\common files\\Microsoft Shared\\MSEnv. Old KB# 7015
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.