Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Created On: 20 July 2012 Problem: Customer had 130 licences with only 90 currently being used. They got intermittent connection refused error messages and it looks as if it's directly related to the number of users connected. Resolution: In this case the Acurcl service was started using the System account and it was only allowing 100 iterations of wrun32.exe to be launched. By changing the Acurcl service to use a local user account instead of the system account, the 100 limit did not apply. Incident #2549090 Old KB# 36128#COBOL#UsersConnected
Created On: 20 July 2012 Problem: Can I display a graphical Message Box in a Visual COBOL console application or some other non-Forms based project type?An error message appears about class not being found. Resolution: You can use the MessageBox class in a console application but you will have to add the proper assembly to the project. In the Visual COBOL Help search for MessageBox. The Help will list a number of items because there are a couple different MessageBox classes depending on the technology you are using such as Windows Forms or WPF. Assuming you are using Windows Forms, click on the entry for MessageBox Class in System.Windows.Forms. The docs will tell you that the assembly name where this class resides is called System.Windows.Forms. In Solution Explorer, right click on References under the project name in which you wish to display the message and then select Add Reference.From the .NET tab scroll to find System.Windows.Forms for the .NET Framework versi
Created On: 18 July 2012 Problem: Customer has RM/COBOL application and data files that they are converting to Visual COBOL.They used the Sample conversion program RMMFDataMigration to convert an indexed file from RM format to Visual COBOL format. When attempting to open the file in a Visual COBOL program it returned a file status value of "39" which means that a fixed file attribute conflict had occurred.This means that the description of the file in the program did not match the physical attributes specified in the file itself. What could be the problem? Resolution: You should run the Visual COBOL Rebuild.exe command against the file to see what the physical attributes are for the file. You can then modify the COBOL source to match the physical attributes.From a Visual COBOL command prompt run:rebuild filename.dat /nWhere filename.dat should be replaced by the actual name of your file.Check that the key position and lengths match up.Record length is als
Created On: 19 July 2012 Problem: How can I create a new Excel spreadsheet, populate it with data, prompt the user for a filename to save it under and then save it using that filename, all automated from within a Net Express or Visual COBOL native program? Resolution: This can be done by using the COM Automation client support for native COBOL within both Net Express and Visual COBOL programs. The following is a modified version of the EXCELdemo that is supplied with Net Express.It uses the getSaveAsFilename method to prompt the user for a filename and then uses the SaveAs method to actually save the file.This demo also shows how to use the named parameter support in COM method calls in order to pass parameters by name rather than by order. *------------------------------------------------------------------------- * &
Created On: 13 July 2012 Problem: Created an application using Visual COBOL R3 that used the EXEC ADO GET CURSOR statement to retrieve a dataset object from a SQL SELECT CURSOR in order to bind the object to a DataGridView Control.This worked fine in Visual COBOL R3.When runnimng the same application in Visual COBOL 2.0 an error now occurs on the EXEC SQL GET CURSOR statement.The sqlcode is 19501 and the error is "Invalid Cursor State"The following demo was used.The demo uses 32-bit ADO connection mapped to the Northwind database.It has a form with a datagridView control on it which is bound to a table within an ADO.NET dataset object.The dataset object is returned using: EXEC SQL DECLARE drcursor scroll CURSOR FOR SELECT A.CustomerID ,A.CompanyName
Created On: 12 June 2012 Problem: When in AcuBench’s Screen Designer, a screen has an entry field named, as a sample, SCREEN-EF-FIELD1 that is defined in the properties to be displayed at line 5 and position 20. If by chance the control was setup with a line variable called SCREEN-EF-FIELD1-LINE but this variable is not referenced in the source program the generate sets this line variable to some other value than '5' as expected so the field ends up displaying at a different line number. Resolution: Delete the line variable from the control properties in the Screen Designer so that the control displays in the correct location. Users don't want to define line or column variables in the control properties if they don't plan to use them in the program. Incident #2573925 Old KB# 36010
Created On: 08 June 2012 Problem: Customer has installed Server 5.1 on a network server and is attempting to run the application from a workstation that is setup to use the network Server 5.1 install.They have created a batch file that sets environment variables and then starts application.When they run it it they get a Semaphore error displayed and a message that most likely ASLMFNET is set incorrectly.The batch file looks like:SET ASLMFNET=\\\\compname\\mfaslmf SET COBDIR=\\\\compname\\serverbinSET PATH=\\\\compname\\serverbin;%PATH%where \\\\compname\\mfaslmf is a share pointing to C:\\mfaslmf folder on server and \\\\compname\\serverbin is a share pointing to C:\\Program Files\\Micro Focus\\Server 5.1\\bin folder on server.It appears to be correct, what could the problem be? Resolution: When opening up a command prompt on the workstation and setting the environment variables manually, the application ran successfully which pointed to something being wrong with the
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: 26 June 2012 Problem: Does Micro Focus certify ACUCOBOL-GT Extend for use with Windows Small Business Server 2011? http://en.wikipedia.org/wiki/Windows_Small_Business_Server Resolution: Micro Focus doesn’t support officially Windows Small Business Server (of any version).Some issues have been solved in the past changing the security settings on the SBS platform itself, to match the Standard or Enterprise editions of Windows. In case of more relevant issues, Micro Focus asks users to reproduce the problem to a standard Windows Server version.If the issue is reproducible on a standard installation, it may be furthermore analized by the MF Technical Staff. If the issue is NOT reproducible on a standard installation, it can be referenced to the limitations within Windows SBS itself and Micro Focus cannot do anything to work around this situation. The only possible solution is to upgrade user's server to a standard Windows edition. Incident #2580195 Old KB# 36
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: 08 June 2012 Problem: A customer is using Net Express 5.1 and the Interface Mapping Toolkit (IMTK) Client Generation Tool to create a Web Service client program in COBOL from a 3rd party WSDL file. The Web Service uses SSL so the Net Express 5.1 Security Addpack has been installed and configured. When the customer runs the Web Service client it returns a 0008 Communications Error which normally means that the SSL is not setup correctly on the workstation. How can the customer test his computer to ensure that SSL security is setup correctly outside of running the Net Express client program? Resolution: There is a program called openssl.exe which is installed as part of the Net Express Security Addpack that resides in the C:\\Program Files\\Micro Focus\\DemoCA folder. This is an open source implementation of an application that can be used to test if security is working correctly on your workstation.From a net express 32-bit command prompt make
Created On: 03 July 2012 Problem: Customer has a fairly complex COBOL routine to perform business logic that they want to call from Java. The COBOL routine uses parameter blocks which are defined as COBOL group item records. They have successfully created Micro Focus COBOL "Custom Record Interface" objects for these parameter blocks and have successfully called and passed this info into and out of the COBOL routine from Java. Thus far, each "custom record" has only had to describe COBOL elementary group items. However, to complete the set of interfaces, they need to be able to handle COBOL record definitions that include an array (OCCURS). The "custom record" documentation and other "calling COBOL from Java" documentation does not give examples or suggestions on how to handle these more complex COBOL record structures. Does anyone have any examples or know of any more detailed documentation? Resolution: The customrecord i
Created On: 03 July 2012 Problem: How can I print the contents of an image file like a .BMP or .GIF to the default printer at a specified location on the page using Visual COBOL and the .NET Framework? Resolution: The following example will do exactly that. There are two sets of code that can be used to either print an image residing in a file on disk or an image that resides in a resource file that is part of the project.The entire solution is attached. When unzipping the file please do so to your C:\\ drive retaining the folder structure that is in the .zip file. $set ilusing"System.Drawing.Printing"$set ilusing"printimagevc.Properties" class-id printimagevc.Form1 is partial inherits type System.Windows.Forms.Form.working-storage section.method-id NEW.procedure division. invoke self::InitializeComponent goback.end method. method-id button1_Click final private.01 pd type PrintDocument.procedure divis
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: 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: 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: 31 May 2012 Problem: The Net Express 5.1 documentation includes a section on how to use Web Services with the Microsoft SOAP Toolkit. This is found under Help > Contents > Programminmg > Web Services > Chapter 3: COBOL Web Services using the Microsoft SOAP Toolkit.The example in the documentation is no longer valid. Can you please give me a new example of how to use the SOAP Toolkit? Resolution: Microsoft's Soap Toolkit has not been supported by Microsoft since 2005. Microsoft now recommends that you use Visual Studio .NET to create Web Services or to create Web Service clients. The creation of COBOL web service clients in .NET is fully supported in Net Express .NET running under Visual Studio or in Visual COBOL. The Microsoft Toolkit 3.0 still seems to work OK but the sample in the NX 5.1 docs is now invalid as the Toolkit registry name has changed as well as the example web service no longer exists. The following is an updated ve
Created On: 05 July 2012 Problem: How can I retrieve the individual columns of data that are selected in a ListView control in a Visual COBOL Windows Forms application? Resolution: The following is an example which populates a 3 column listview with data and then sets the 2nd row to be the selected row and then when a button is clicked it will extract the columns from the first selected row into appropriate data items which in this simple case are strings.class-id testlistview.Form1 is partial inherits type System.Windows.Forms.Form.working-storage section.method-id NEW.01 row type ListViewItem.procedure division. invoke self::InitializeComponent set row to new ListViewItem("R1Column1 Data") invoke row::SubItems::Add("R1Column2 Data") invoke row::SubItems::Add("R1Column3 Data") invoke listView1::Items::Add(row) set row to new
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: 31 May 2012 Problem: I have many TextBox controls on my Windows Form and I would like the focus to automatically jump to the next control when the TextBox control is filled with text. How do I do this? Resolution: There is an example attached to this article that demonstrates one method of accomplishing an autotab functionaility for TextBox controls on a Windows Form.Example Description: TESTAUTOTABThis example program demonstrates one method of implementing an autotab function to move between controls when a TextBox field is filled to iots maximum length. There are 4 TextBox controls on the form and each has its maxlength property set to 3. Everytime a character is entered into one of the TextBox controls a TextChange event is triggered. Each of the TextBox controls has the method check_TextChanged set as its event handler. The eve
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: 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: 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: 04 May 2012 Problem: When creating a new project in Net Express and trying to animate a program only a command text box is displayed and the animator never displays the actual source code. What could be wrong? Resolution: The problem can be caused by having the incorrect local working directory specified under Animate > Settings.If you create a new Net Express project by copying an existing projects .APP file into a new location you might run into this issue as the local working directory may be set to the location of the previous projects file.If you are using a template project then you should specify a directory like .\\ which means current directory instead of hard coding the name of the folder.Look under Animate > Settings an make sure that the local working directory is set to the correct project folder. Incident #2572077 Old KB# 35932
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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.