Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How do you get the record length when access a variable length Indexed file ? When accessing an Indexed file how can you find our the actual record length of the record that has just been read. The file may contain multiple record types of variable length. Resolution: To get the current record length you need to add a DEPENDING ON clause to an FD defintion:- FD TESTFILE RECORD IS VARYING IN SIZE FROM 40 TO 32000 DEPENDING ON WS-REC-LEN. If access a file using EXTFH calls directly then the record length is returned in fcd-current-rec-len on exit from a READ op call. Old KB# 1514#RMCOBOL#COBOL#netexpress#ServerExpress#AcuCobol
Problem: Compiling PROGRAM1.CBL with PROGRAM1.CPY as a copybook fails with "COBCH0056S COPY is recursive" [PROGRAM1.CBL] ... COPY PROGRAM1. ... Resolution: COPYEXT(CBL,CPY) is a default compiler directive that causes the compiler to pick up a copybook with CBL extension first. In a case where the copybook has the same name as the program, the compiler will pick up the program itself. To avoid this, here are two options: 1. set COPYEXT(CPY) to pick up copybooks with CPY extension first, or 2. rename the copybooks that have the same names as programs Old KB# 1405
Problem: Is it possible to colorize the ListViewItems with alternating colors? Resolution: To do this you have to derive your own list view class from the standard list view and use this class in the class control paragraph of your list view control program. You find a sample "owndrawlistview" as attachment. The "owndrawlistview" defines a method "wmGadgetNotify" which handles a redraw of the list view items in the desired style. ------------------------------------ To use the "owmdrawlistview" in your application, the class declaration in the control program has to be changed from ListView is class "listview" to ListView is class "owndrawlistview" and owndrawlistview class has to be added to the application -----------------------------------
Problem: When compiling DB2 applications with the DB2 compiler directive, you receive Compile error: SQL ECM or dependent module not found When compiling OpenESQL applications with the SQL compiler directive, you receive Compile error: ODBC ECM or dependent module not found Resolution: These errors can occur when : 1. Compiling DB2 applications, the required DB2 client support is not installed. 2. Compiling on UNIX, the DB2 ECM/OpenESQL support is not available on your platform. Refer to the on-disk readme under $COBDIR/docs for details. Old KB# 1429
Problem: The following error occurs when starting Form Designer or opening a HTML form in Net Express: "Form Designer requires Microsoft Internet Explorer 4.01 or greater..." This error may occur even if IE 4.01 or greater is installed. Resolution: This error occurs when Microsoft Internet Explorer (IE) is not the default web browser. Form Designer in Net Express requires IE to be the default web browser, as it is using IE's controls. IE can be made the default by going to the IE's options (Tools | Internet Options), clicking on the Programs tab, and click on the "Make default" button. Old KB# 1515
Problem: RTS166 Erorr when using an Iterator on a Dictionary Object When using the DO method on a Dictionary collection it results in a RTS 166 Recursive Call Error. Resolution: This is due to the callback method being used with an alternate ENTRY point in the program. When the iterator calls the entry point it detects a recursive call and terminates with an RTS 166 error. To use Iterators with an entry point you must have a "local-storage section" in the program. It does not need any data. It just enables the program to be called recursively. Old KB# 1434
Problem: The following example is taken from the Net Express help and shows how to use user defined functions in COBOL. This syntax is part of the ISO2002 standard but what additional compiler directives do I need to compile and run the program? FUNCTION-ID. factorial. DATA DIVISION. LINKAGE SECTION. 01 parm1 BINARY-LONG.
Problem: The time returned from an ACCEPT statment is only accurate to the hundredth of a second, is there a way to retrieve the time to milliseconds. Resolution: There is a demo out on the supportline website that uses the win api GetSystemTime which returns time to milliseconds. The sample is called gst.zip and can be downloaded from http://supportline.microfocus.com/examplesandutilities/nesamp.asp#Win32API There is another win api function that can be used called GetSystemTimeAsFileTime which returns the time in 100 nanosecond increments. This function returns the time in a FILETIME structure which can be declared in COBOL as: 01 FILETIME. 05 lowOrderDateTime pic x(4) comp-5. 05 highOrderDateTime pic x(4) comp-5. 01 redefines FILETIME.  
Problem: using the eza socket feature. Trying to run an initapi, but receives a return code of -1, and receives the error number 0. Resolution: The console showed that he EZASOKET was stopped becuase of bad data and needed to be restarted. 0918 11381705 5820 EZATEST CASSP0002I Server manager informed of process termination, pinfo = S,0000006484 11:38:16 070918 11381705 6680 EZATEST CASOP0000I 01 of 02 From (,,CSKL) EZY1298E 09/18/07 11:38:17 CLOSE CALL FAILURE TRANSACTION= CSKL 11:38:17 070918 11381705 6680 EZATEST CASOP0000I 02 of 02 From (,,CSKL) TASKID= 0015 ERRNO= 00
Problem: Customer is using Net Express 3.1 and cannot find any documentation for the CBL_ library routines. Resolution: Go to the SupportLine web site, http://supportline.microfocus.com. Then log on, under the Self-Service section go to the Patches & Fixes or Product Update section. On that page find the Net Express v3.1 Service Pack 1 section. The documentation update will be found on that page. Old KB# 1510
Problem: When using remote desktop and all that can be seen is the desktop on the task manager applications. Resolution: CNTL ALT DEL will not get you the task manager for the remote system. CNTL ALT END will give you the task manager of the remote testop connection. CNTL ALT INS will give you the task manager of a VMWare machine. Old KB# 1425
Problem: After installing the WrapPack 4 for Net Express 5.0: NXP3250040063.msp Starting Dialog System from the Net Express 5.0 IDE or as DSWIN.exe in a command prompt results in a message: Cannot initialise DSRUN, error code 00003, 00057, 00018 Resolution: Please install the attached HotFix which corrects this. Attachments: NXP325004006300015-HOTFIX-1439.msp Old KB# 1495
Problem: You may have a requirement to store data and retrieve data in EBCDIC format on Windows using Net Express. Resolution: By default data is stored in ASCII format in Net Express but it can be stored and processed in EBCDIC. However there is a difference in the way signed numeric data is stored and displayed between ASCII and EBCDIC. Subsequently, this data may not be displayed as expected in reports, especially signed decimal fields. ASCII will store and display the value 24 as that - 24, where EBDIC will store it in EBCDIC format and display it as 2D. Negative 24 would be displayed as 2t in ASCII and 2M in EBCDIC. To change this behavior, set the CHARSET"EBCDIC" compiler directive. Attached is a sample program to illustrate how this works. Create a project for this and run the program. Comment out or uncomment CHARSET"EBCDIC" to change the behaviour. Also, have a look at the actual data file written out (eg via Wordpad
Problem: compiling from a Net Express command prompt using the COBOL command to compile a program The compilation hangs after displaying the line '* Checking complete with no errors - starting code generation' Resolution: In this scenario; The dir file has COBIDY($COBIDY), Specifying $COBIDY with the COBIDY environment variabe should not be done. Just specifying COBIDY is the correct method to get the same behaviour. The problem is, that COBIDY environment variable is set to the directive parameter COBIDY=$COBIDY and this causes an infinite loop when trying to resolve the COBIDY environment variable later. Old KB# 1446
Problem: Trying to modify a screenset and a 114 error occurrs. Resolution: You may be getting the 114 error because the a corrupted screenset: Open the screenset by 'exporting' the screenset to a text file and then importing the file as a new screenset. This can be done from a Net Express Command Prompt. To export, type "dswin /e screensetname.gs screensetname.imp" To import, start Dialog System and select Import | Screenset from the File menu. Then save the screenset. Old KB# 1449
Problem: Receiving an SQLCODE of -1131 (Process terminated abnomally) after recompiling DB2 Stored Procedures using Net Express 5.0 with WS03 applied. The same Stored Procedures ran correctly when compiled under Net Express 4.0. Moving the Stored Procedure .DLLs to a server machine to run after compiling them. Resolution: This problem can occur when the product release levels differ between the development and deployment systems. Ensure that both systems are at the same product and WrapPack level. Old KB# 1413
Problem: Under .Net you can use COBOL rununits to isolate COBOL working storage between concurrently running sessions such as under ASP.Net and other multi threaded environments. Under rununits you can also use COBOL .Net classes and use static data. Static data can be delared as:- class-id. Class1 as "CLASSTEST.Class1". environment division. configuration section. repository. static. data division. working-storage section. 01 WS-STATIC-DATA PIC X(100). When this class is added to a rununit is static data isolated to the rununit ? Resolution: No it
Problem: Release 5.0 .NET: Trying to install Visual Studio 2005 Standard Edition as part of the Net Express 5.0.NET delivery gets back: error1311 _2_RTL_x86_enu_Visual_Database_Tools_Core.cab - File not found Resolution: This .cab file can be found among others on Disc 2 of the Microsoft Visual Studio 2005 Standard Edition delivery. Old KB# 1480
Problem: Compiling with Cobsql returns CSQL-F-013 against COBPUB.CBL Compiling DB2 application cannot locate sql.cbl Compiling Sybase application cannot locate cobpub.cbl Compiling Oracle application cannot locate sqlca.cob This article also relates to Server Express on UNIX platforms. Resolution: When using third party (RDBMS) COBOL precompilers, you need to ensure that the precompiler option for specifying include directories, and/or the COBCPY environment variable setting, are set correctly for locating copy files supplied by the RDBMS vendor. For example, with DB2 applications, the copy files are located under $DB2DIR/include/cobol_mf (UNIX) or �2DIR%\\include\\cobol_mf (Windows), so the COBCPY environment variable needs to include that directory.. Old KB# 1473
Problem: When setting MFCSCFG to a path that contains spaces, mfclient does not seem to find the configuration file. Resolution: Long directory name is not supported even if it is quoted. Use the short name instead, e.g. "C:\\Program Files" --> "C:\\Progra~1" You may want to look at a demo (longname.zip), which shows how to return a short filename (or directory name) from a long file name under COBOL using the WIN 32 APIs. Demos can be found at the Example & Utilities page from the Micro Focus SupportLine site (http://supportline.microfocus.com) Old KB# 1417
Problem: There are many differences between the Object-Oriented language extensions that are provided in the .NET checker and the unmanaged COBOL checker. Resolution: The unmanaged COBOL compiler actually supports two methods of writing Object-Oriented COBOL. The first method uses syntax that was developed by Micro Focus before the ISO2002 standard defined its own syntax. These extensions are known as the Micro Focus alternative syntax and makes heavy use of the Net Express class libraries. The later syntax is known as the ISO2002 syntax and it uses a repository section to hold all of the class and method information. Old KB# 1511
Problem: Release 5.0: After installing Net Express 5.0 and trying to run an application compiled within the IDE as well it seems this F5 key does not work as expected, because CTRL F12 binds the run functionality now. Also, the tooltip for the "Run"ner button shows CTRL F12. What to do getting back this F5 keystroke to "Run" an application? Resolution: To resolve this issue take a look here: Net Express 5.0 IDE-> Options -> Customize IDE... -> Keyboard Configuration -> Load Scheme Binding "Run" to F5 is related to this MS.KEY file covering Microsoft's scheme, and picked up from the Net Express installation here: ..\\Net Express 5.0\\Base\\bin\\MS.KEY Old KB# 1498
Problem: How can you interact with a FTP Server from COBOL on .Net ? Resolution: The .Net framework V2 introduced some new classes that allow developers to easily use FTP programmatically. The FTP classes are located in the System.Net namespace. There are 2 main classes involved. You need to create an instance of FtpWebRequest containing the details of the FTP request you need to perform. You then need to use the FtpWebResponse class to receive the file you are attempting to receive. If you are accessing an FTP server that requires logon then you can specify login details using the System.Net.NetworkCredentials. An instance of this is returned from the FtpWebRequest "Credentials" property. Attached to this article is an example showing how to use these FTP classes from COBOL. You will require Net Express V5 and Visual Studio 2005 in order to this example. The demo is attached. Attachments: FTPSample.zip Old KB# 14
Problem: Can you share a Database Connection between .Net Languages (VB and C#) and COBOL. In the scenario C# would create a connection and pass that to COBOL. COBOL would then use the connection and issue its Embedded SQL on the same connection. Is this possible ? Resolution: Yes using ADO.Net you can pass a connection object from C# to the COBOL. The COBOL then can use EXEC ADO BIND to specify that the C# connection is to be used when executing embedded SQL. Attached to this article is some example code showing how to do this. Attachments: DNSharedConnection.zip Old KB# 1505
Problem: A dll was created in Netexpress 4.0 for .Net to access our Isam files. This dll is called from a Web based application.Experiencing performance issues when accessing the Isam files. There can be up to 100 users accessing the files at the same time. Also are there tools to monitor file access performance? Resolution: A setting change in the System icon will help with file I/O perfromanance. Goto the Control Panel Open up System icon. Click on the Advance tab In the Performance section, click on Settings In the Performance Options window, click on Advanced tab In the Memory Usage seciton, change setting from Programs to System cache This will help with file I/O performance. Tools for monitoring file access performance. There is a Microsoft website , SysInternals, that has utilities for file monitoring that could help with file I/O performance. Here is the url: http://www.microsoft.com/
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.