Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Created On: 31 May 2012 Problem: Is it possible to explicitly cause the focus to move to a desired TextBox on a Windows Form depending on a condition that is met in the program? Resolution: Yes, this can be done by using the Focus method of the Control class. There is an example program attached to this article. The description of this program is as follows: TESTFOCUSThis example program demonstrates how to explicitly set focus to a specific control on a form depending on some contition in the program by using the Focus method of the control class. This form has on it three TextBox controls and a radiobutton group. The focus will be set to one of the three TextBox controls depending on which radio button is selected. The CheckChanged event is fired on a radio button whenever that state of the button is c
Created On: 14 June 2012 Problem: When running a large Visual COBOL managed code application, a .NET exception of type Stack Overflow occurs. What is the cause of this exception and how can I diagnose a solution to it? Resolution: Stack Overflow Exceptions in COBOL for .NET Overview A stack overflow exception is thrown when an application consumes too much stack space. In .NET, an exception of type System.StackOverflowException will be thrown when this occurs. Typically, this is caused by too many nested method calls or unchecked recursion. Usually a coding change can circumvent the issue. It’s worth understanding how this issue can occur, what impact COBOL compiled for .NET may have, and how to diagnose and resolve the problem. Defining the Stack Size The initial allocation of the sta
Created On: 09 July 2012 Problem: The AcuBench manual contains no documentation on the command line option to generate only. Where is this? Resolution: The command line option to generate only was added in AcuBench version 9.0.0, however the manual has not been updated. Beginning in version 9.0.0 the syntax for generating a workspace using the command-line interface is as follows: [acupath]\\acubench90.exe /generate [projectdir]\\[workspace.pjt] For example, if you have AcuBench installed in the default directory, and you would like to generate a workspace called "Project1", use the following command: c:\\Program Files\\Micro Focus\\Acucbl9xx\\acubench\\acubench90.exe /generate C:\\path to project\\project1.pjt (on 64-bit Windows it is "Program Files (x86)") AcuBench regenerates the code but does not build the programs. This is the same behavior that you get when you execute a Regenerate Workspace command from the AcuBench Build menu. To Regen
Created On: 03 July 2012 Problem: A ListView control has been defined in a Windows Forms application under Visual COBOL.The ListView has multiple columns defined.When using the Add method of the Items property the first column can be populated with data as follows: invoke listView1::Items::Add(myString) How can each individual column be populated with a data field separately? Resolution: There are several ways to do this, including binding to a list or other object but the following is a real simple method. You need to create a ListViewItem and then add the subitems to it. The first item is the first column and each subitem is the next column etc. method-id button1_Click final private.01 row type ListViewItem.procedure division using by value sender as object e as type System.EventArgs. set row to new ListViewItem("Column1 Data") invoke row::SubItems::Add("Column2 Data")  
Created On: 12 June 2012 Problem: [ISQL]ERROR: Could not SQLConnect, when using unixODBC on a Linux 64bit server with AcuXDBC. Resolution: To connect acuXDBC with unixODBC on a 64bit machine, you need to install unixODBC version 2.2.12 or later, at this point the version available in www.unixodbc.org is 2.3.1, install this version. Set the following variable in your environment to compile the isql executable as 64bit object: setenv CFLAGS -m64 or export CFLAGS=-m64 depending upon your shell Follow the instructions in the AcuXDBC User's Guide; Chapter 5:Installing AcuXDBC > 5.2 Installing AcuXDBC/AcuXDBC Server > 5.2.2 UNIX/Linux Installations, but you need to execute the following commands “asroot”, this is because a regular user doesn’t have permissions over the /usr/local/etc directory and the unixODBC process accesses this directory: Type "configure" and wait while features on your system are being checked. Type "make" and wait for the pack
Created On: 09 July 2012 Problem: Issuing an AcuBench command line to rebuild a workspace does not work. There are no errors reported but there is no log file created and nothing happens to the project files. They are not modified in any way. The command line is: c:\\Program Files\\Micro Focus\\Acucbl8xx\\acubench\\acubench90.exe /build C:\\My Projects\\project1\\project1.pjt Resolution: The problem is that AcuBench cannot handle spaces in the project path. The resolution is to remove the spaces in the path; rename “My Projects” folder to “MyProjects”. Or you can map a drive to the spacey part of the path and use that mapped drive in the AcuBench command. In the above example we can map Z: to C:\\My Projects, and then we use Z:\\project1\\project1.pjt in the AcuBench command line. N/A Old KB# 36068
Created On: 03 July 2012 Problem: Application is using its own error handler routine which is set using CBL_ERROR_PROC library function. Within this procedure a call to CBL_FFND_REPORT is made in order to create a fault finder report under certain conditions. One of these conditions is when a RTS 173 error occurs (or some other specific RTS error).How can the error procedure find out which RTS error number it is currently processing so that it knows whether or not to call fault finder? Resolution: When the error procedure is called a RTS error message is passed to it as a parameter. You could parse this parameter to look for the exact RTS error that occurred: Parameter Passed to the Error Procedure When an installed error procedure is called, the characters containing the relevant RTS error message is passed as a parameter. You should define this parameter in the Linkage Section as PIC X(325), and include it in the USING phrase of the
Created On: 25 May 2012 Problem: When using the XML GENERATE statement in my COBOL program datanames are all being converted to upper-case when they appear in the XML as tags.Is there a way to get it to retain the case that is specified for the datanames in the program?Example:01 Customer. 05 CustName pic x(20) value "Mike". 05 CustCompany pic x(20) value "Micro Focus".01 xml-doc pic x(100). XML GENERATE xml-doc from Customer results in:MikeMicro Focus Resolution: You can retain the mixed case used in the datanames by using the compiler directive:$set preservecaseExample:01 Customer.05 CustName pic x(20) value "Mike".05 CustCompany pic x(20) value "Micro Focus".01 xml-doc pic x(100).XML GENERATE xml-do
Created On: 18 May 2012 Problem: I know that I can export Visual COBOL ADO connections into an XML file using the ADO Connection Editor. Is there a way to automate the import process on the production computers so that we don't have to start ADO Connection Editor on each one in order to import the connection information? Resolution: There is a tool to automate the import of ADO connections onto production computers in Visual COBOL 2.0 and COBOL Server 2.0 called mfimportconn.MFIMPORTCONN: Enables you to import connection settings previously exported from the ADO.NET Connection Editor. Important: You must run this command from a 32-bit or a 64-bit Visual COBOL command prompt, available from Start > All Programs > Micro Focus Visual COBOL. Syntax{MFImportConn32_v2 | MFImportConn32_v4 | MFImportConn64_v2 | MFImportConn64_v4} path:\\exportedXMLfile {System | User} {32BIT | 64BIT} Important: Use the executable that fits the type of connection
Created On: 15 May 2012 Problem: When converting an application from a Net Express native Windows project to a Visual COBOL managed .NET project the run-time tunable settings stored in the file COBCONFIG.CFG which is pointed to by the COBCONFIG environment variable are not being picked up when the application is run. Why is this? Resolution: Although the COBCONFIG environment variable/COBCONFIG.CFG file is still used in Visual COBOL native projects it is not used by Visual COBOL managed code .NET projects.To set tunables in a managed code .NET project you need to do so by using an app.config file in your project.To add an application configuration file, the project needs to be one that will output a main program (.EXE).Right click on the project name in Solution Explorer and select Add-->New-->Application Configuration file.Then double-click on the app.config file in your project to open it in the XML editor.Tunables are set as follows: Old KB# 359
Created On: 31 May 2012 Problem: Is it possible to pass a Java String array to COBOL in a manner so that the COBOL program can receive this as a COBOL table in the linkage section as if it were being called by another COBOL program? Resolution: Yes, it is possible to pass a Java String array to a COBOL subprogram through it's linkage section using the COBOL type Pointer defined in it's Java support classes.An example Net Express 5.1 project is attached to this article. The following is the description of this project: PASSARRAY This example program shows how a simple Java string array can be passed between Java and COBOL using the COBOL support
Created On: 23 May 2012 Problem: Creating an installation package with the tool OnWeb Web-to-Host pro MSI packager and the installation on a client machine via the file .msi is successful, but an error occurs when launching the file .html:Error message : 1900 An error occurred when downloading one of several componants Pro Client on your computer. This error can be linked to a certain number of issue, including an electricity failure or the end of you network activity. The installation has been canceled and the session won’t be run. In order to get technical assistance and solve this issue please contact your system administrator. Resolution: Error 1900 is a generic error message so here it means there is somehow a mismatch between the html file created and the components selected in the msi packager to install on the client machine.You will need to select the components in the msi packager that are actually used in the html file.For example, there will be a problem (and t
Created On: 18 May 2012 Problem: How do I write to a printer on Windows when my text includes embedded Printer Control Codes (PCL) and ESC sequences?I have tried using the run-time tunable printer_redirection=TRUE to redirect output to the Windows Print Spooler but when I use these ESC sequences they are being stripped out and I am not getting the formatting that I expect.How can I write to a Windows printer that is not attached to LPT1 and have the printer recognize my PCL codes? Resolution: There is a new run-time tunable introduced in Visual COBOL 2.0 that provides for this capability in managed code .NET programs.It is called printer_raw_redirection and it can be used in conjunction with printer_redirection to allow you to write directly to a Windows printer and still use your embedded PCL codes.See the attached example program called testprintraw.Here is the description of this example: TESTPRINTRAW This sample program demonstrates the capability of printi
Created On: 29 May 2012 Problem: I have a native code COBOL application that sends data records to a specific printer under Windows. These data records have Printer Control Language escape codes embedded in them.I know that there is new functionality in Visual COBOL 2.0 to allow for managed code .NET programs to send a file to a printer in RAW format but how do I do this in a native code program? Resolution: The native code program can call a managed code program by using COM Interop functionality of .NET. Attached is a Visual Studio Solution that demonstrates how this can be done.The description of this example is as follows:VCPRINTRAWThis example program demonstrates how a file containing Printer Control codes (PCL) can be sent to a printer as RAW data so that the esc sequences will not be stripped out by the Windows print driver. Starting in Visual COBOL 2.0, two methods of accomplishing this task have been added for managed code .NET programs
Created On: 18 May 2012 Problem: When debugging a program in Net Express is there a functionality which allows you to stop running the debugger when the contents of a data item is changed? Resolution: Yes, this is called a Break on Data Change and is available for data items displayed in the Watch List. There is a STOP icon at the right of the Watch List control that enables/disables Break on Data Change. If you "Examine" a data item it is diplayed in an Examine List dialog box and you can "Add to List" to add it to the Watch List and from there you can toggle the Break on Data Change for the data item. Incident #2573041 Old KB# 35954
Created On: 17 May 2012 Problem: Application was originally developed as native code using Oracle's Pro*COBOL and Net Express using the COBSQL directive.The following statement was used to change the format of DATE columns so that they would be returned in MM-DD-YYYY format.EXEC SQL ALTER SESSION SET NLS_DATE_FORMAT = 'MM-DD-YYYY' END-EXEC.This worked correctly under Net Express and Pro*COBOL. After converting the application to Visual COBOL managed .NET code using the OpenESQL preprocessor the date columns are no longer being returned in the format specified in the set NLS_DATE_FORMAT statement.They are instead being returned as YYYY-MM-DD format. Resolution: This is a compatibility issue with DATE formats between Pro*COBOL and OpenESQL.In OpenESQL columns defined as DATE will always be returned in YYYY-MM-DD format regardless of the setting of NLS_DATE_FORMAT.To get around this you must use the TO_CHAR function on the DATE column so that the data will be retu
Created On: 31 May 2012 Problem: There are several different operation codes available with the EXTFH file handler for doing random reads on an indexed file. 8E READ (random) WITH NO LOCK R I DA READ (random) WITH LOCK R I DB READ (random) WITH KEPT LOCK R I F6 READ (random) R IWhat is the difference between F6 READ (random) and 8E READ (random ) WITH NO LOCK? Resolution: The difference comes down to the lock mode that is set on for the file.FhOp-Read-Random-No-Lock value x'8E' will always read a record without obtaining a lock for it, regardless of the lock mode used.FhOp-Read-Random value x'F6' will either lock a record when read or not lock a record when read depending on the lock mode used in the open.If lock mode automatic is set, then FhOp-Read-Random will lock the record.If lock mode manual is set, then FhOp-Read-Random will not lock the record.fcd-lock-mode pic x comp-x Lock mode flags for shareable files: Bit 7 - Lock on multiple records Bit 6 - WRITELOCK di
Created On: 23 May 2012 Problem: In Rumba there are quite a lot of different file extensions for example: *.csf, *.cbr, *.mnc. What do these file extensions represent? Resolution: This list may not include all possible file extensions available but it will have covered most of them:RDPS (Desktop Profiles) RSDA (AS/400 display Session Profiles) RSDM (Mainframe display Session Profiles) RSDU (UNIX/VAX display Session Profiles) RSDH (HP display Session Profiles) RSPA (AS/400 printer Session Profiles) RSPM (Mainframe printer Session Profiles) MAP (keyboard map files) RMC (macro files) MNC (menu configuration files) HSP (hotspot files) SNC (synchronization files)CSF (Scripting language files)CBR (Customised toolbar files) Old KB# 35966#Rumba
Created On: 05 February 2012 Problem: Our COBOL source files use the extension ".cl2".When I bring these files into Visual COBOL Eclipse and edit them they do not appear with the same editor colorization or background parsing as when I use the a standard extension like .cbl.Is there a way to modify Eclipse so that it recognizes my extension as being a COBOL source program? Resolution: Here are the instructions for adding a new extension as a COBOL content type in Eclipse so that your files are recognised as COBOL programs throughout the IDE: (in this example we are adding .cl2) 1. Navigate to Window->Preferences2. Navigate to General->Content Types3. Open up Text and then Micro Focus COBOL Project Types4. Click on COBOL Source File5. You should now see the default list of file extensions we recognize for the COBOL source content type6. Click the Add... button7. Enter the extension you desire (in this case, *.cl2)8.&n
Created On: 09 May 2012 Problem: A customer is still running Net Express 4.0 to support some older versions of their software. We mistakenly applied WebSync 4.0.008 and this is causing some problems because we need to be at the 4.0.004 level instead. Is there a way for us to go back to websync 4.0.004 without doing a complete uninstall/revoke and reinstall of Net Express 4.0? Resolution: In Net Express 4.0 you can uninstall the WebSync and leave the base product release still installed by going to Control Panel > Add Remove programs and then click on the Change/Remove button. Select All WebSync WrapPack in the list of components and click uninstall. It will then be back at the base release and you can install any other WebSync level that you like. Incident #2572964 Old KB# 35941
Created On: 18 May 2012 Problem: An ADO database connection was defined using the Visual COBOL ADO Connection Editor on the development machine. We moved the application to a production machine on which COBOL Server 2.0 is installed. When the customer runs the application on this production computer they get an error in the CONNECT statement.Are these ADO connection settings automatically exported along with the .EXE? Do we have to define those connections on each client machine? Resolution: The connections created by the ADO Connection Editor for managed code are not automatically brought over with you application but they can be exported on the development computer and then imported on the COBOL Server machine. Open up the ADO Connection Editor on the development computer and click the Export tab. Here you can select the connections that you wish to export to an xml file. Bring this file to your Server computer and start ADO Connecti
Created On: 29 May 2012 Problem: In Visual COBOL for Visual Studio I have a WPF Form on which I am specifying binding between several TextBox controls and properties specified in a COBOL class. When the form is initially loaded the binding works correctly and the value of the specified binding properties are correctly displayed in the appropriate TextBox controls.But when the values of the properties in the binding object are updated, the form itself is not being updated automatically as it still shows the previous values when displayed. How can I bind to a COBOL object and have the updated properties automatically reflected when the form is displayed? Resolution: In order for a bound control to automatically pick up changes to the values of it's bound properties you must implement the INotifyPropertyChanges interface within your object.An example program is attached to this article.Here is the description of this example program: WPFBINDTEXTThis examp
Created On: 15 May 2012 Problem: How can I retrieve a list of dataset names from the catalog, using asterisk wildcards? Resolution: The utility program MVSGETCT can be used to scan the Enterprise Server catalog, using the Start and Get Next function codes. Although there is no direct support within MVSGETCT for a browse function, or the use of wildcards, these features can be emulated by writing an interface layer between applications and MVSGETCT. The attached zip file contains an example of how dataset names can be retrieved using trailing asterisk or double asterisk notation to specify the pattern matching criteria. A single trailing asterisk retrieves all names that match the dataset prefix (the part of the name before the asterisk), but do not have any extra nodes in their name. Double trailing asterisks retrieves all names that match the dataset prefix, regardless of any extra nodes that may be present in their name. For example:- MFSLV.TEST* -> M
Created On: 31 May 2012 Problem: When attempting to compile a COBOL program within Server Express, the following error is returned:Micro Focus LMF - 010: Unable to contact license manager Resolution: There are several reasons why this error may be returned. Perhaps the License Manager is not running. In which case, do the following:- Log in as root. - Go to the directory in which License Management Facility is installed (by default it is /usr/lib/mflmf or /opt/lib/mflmf depending on the operating system). - Enter the command: ./lmfgetpv- If the License Manager is not running you will need to manually start the process using the command: sh mflmmanWhen you start up the License Manager, the file /tmp/LMF-common is created. If this file does not have the correct read/write permissions, then the LMF 010 error will not be resolved. So you must ensure that this pipe file has sufficient permissions.If the error still persists, kill the
Created On: 29 May 2012 Problem: I have an application that is calling the Micro Focus File Handler directly by coding calls to EXTFH. I wish to read a record in an indexed file as if the following COBOL statement was being executed:READ test-file IGNORE LOCKSo that it will return the record to the program even if the record is currently locked by another process.There does not seem to be an opcode documented that will do a READ IGNORE LOCK operation although the phrase is available within COBOL syntax. How do I accomplish this? Resolution: The IGNORE LOCK functionality is turned on using a bit setting in the FCD description for the file. To turn this on set the appropriate bit on and then use a READ RANDOM operation code, for example FAF6.Look at the fcd-config-flags - bit 0.fcd-config-flags pic x comp-x• Bit 7 - WRITETHRU • Bit 6 - Use relative byte address • Bit 5 - Update current record pointer • Bit 4 - For FCD2 use fcd-reladdr-big for relative byte addre
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.