Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
This article provides an external C subroutine that you can use to set the mouse cursor. Problem: The mouse “wait” cursor is useful for indicating to the user that a process is busy. However, there is no built-in method to change the mouse cursor to the “wait” icon. Resolution: The attached zip archive contains a Dynamic-link library (rmcursor.dll) that implements two C subroutines that will allow you to invoke the mouse “wait” cursor and return the mouse back to the original, arrow cursor. Below is the syntax for invoking the two subroutines. To set the mouse cursor to “wait”: CALL "RM_SetCursor_Wait" To set the mouse cursor to “arrow”: CALL "RM_SetCursor_Arrow" Also included in the zip archive is a sample program (testrmcursor) that demonstrates the use of the mouse cursor subroutines. Old KB# 14608
This article explains how to activate the Database Connector component in Server Enterprise Edition 6.0 Problem: Having installed the runtime product Server Enterprise Edition 6.0 it will be necessary to activate the various components of the product using the various license keys and authorization codes supplied with the product. Database Connector is activated via two codes: a 16 digit Product Code and a 12 digit Product Key. How is this done? Resolution: In order to activate this component go to the Bin directory of the Server Enterprise Edition installation and identify the file activator. Double click on this file and you will be prompted to populate two fields; one for the Product Code and one for the Product Key. Old KB# 14593
The F4-key does not generate an exception with a Combo Box control. Problem: Pressing <F4> while a combo box is active causes it to drop its drop-down list, and the COBOL program is not notified of an exception. Resolution: If the runtime configuration variable WIN_F4_DROPS_COMBOBOX is set to its default value of "1" (on, true, yes), then combo boxes use the standard Windows handling for the <F4> key. When this variable is set to "0" (off, false, no), pressing <F4> with a combo box active causes the COBOL program to get the exception, but the combo box does not drop its drop-down list. It is not possible to get both behaviors at the same time. Incident Number: 2191737 Old KB# 14526
This article explains EL00003 error when trying to use ODBC and an SQL Server database. Problem: Installation is completed and configured, however when trying to use the product the following error occurs: EL00003 EnterpriseLink Server: Cannot connect to the EnterpriseLink repository There is no problem connecting to the database directly using the ODBC driver but inside Enterprise Link the error occurs. Resolution: The ODBC driver that was installed came from EasySoft. This version of the software was not compatible with Enterprise Link. EasySoft provided an updated module and the problem was resolved. Incident Number: 2288909 Old KB# 14577#Rumba#EnterpriseLink
This article explains how to specify a cataloged filename in extfh.cfg. Problem: How do you specify a cataloged filename in extfh.cfg? Resolution: Rather than map the physical filename, which may change from run to run, you can specify the unmapped filename in extfh.cfg using the internal keyword. To map SYSOUT for example: [internal:SYSOUT] INSERTNULL=OFF Old KB# 14579
GetOSInfo demo has been expanded to include Windows Vista, Windows 7, Windows 2008 and Windows 2008 R2 operating systems. Problem: The existing GetOSInfo demonstration illustrates older Windows versions such as 95, 98, NT, XP, 2000 and 2003. Is there a GetOSInfo demo available that illustrates the new Windows versions, for example Vista, 2008, 2008 R2 and Windows 7 operating systems? Resolution: The attached GetOSInfo.cbl demonstration file includes Vista, Windows 7, Windows 2008 and Windows 2008 R2 operating systems. Differences are marked with ‘mfsupp’ in that new source. This demonstration file was compiled under Net Express 5.1 WS3 and successfully tested against these operating systems. s. GetOSInfo.cbl attached GetOSInfo demo Vista, Windows 7, Windows 2008 Old KB# 14562
This article explains how to release a license from a client computer and return it to the Central License Server for Net Express 6.0 Problem: The license from a client machine needs to be added back to the pool of available licenses in the Central License Server. How is this done? Resolution: The license does not need to be revoked, as in previous versions of Net Express. When using the Central License Server, the license that is currently being used is released and returned back to the Central License Server once the product is closed. The license is only in use for as long as the product remains open. You can verify this by opening the License Management System and viewing the list of authorized licenses under the Licenses tab. The License Management System is found by going to Start > Micro Focus Studio Enterprise Edition 6.0 > Configuration > License Management System. The authorized license that was released will not be visible in the list. If you do no
This article explains how to avoid having ENTRY-FIELD controls drawn incorrectly in a screen section. Problem: Starting with version 7.2.2 it is possible for ENTRY-FIELDS to be incorrectly displayed without an upper boarder. This behavior is caused by the combination of three events: The upgrade to runtime 7.2.2 from a previous version. A vertical size (LINES property) of the ENTRY-FIELD that is very thin (for example, less than 0,75 pixel or less than 1,10 cells). The ENTRY-FIELD is right justified using RIGHT property or using JUSTIFY_NUM_FIELDS environment variable set to TRUE. Resolution: There are several solutions to avoiding this behavior. One solution is to modify the code by resizing all the involved ENTRY-FIELDs. The amount of work that would be required in some cases may make this a non-viable solution. Another approach depends on whether or not the code can be recompiled. If recompiling is an option then use the -C71 com
This article explains how to enable the Transfer option within the Server Express Information Manager Utility infomgr. Problem: If the Transfer option in infomgr is not set up, how do you enable this within Server Express? Resolution: Infomgr is the Server Express Information Manager Utility and is a screen interface to the in product demo collection. Unless you have enabled the Transfer option, when you attempt to compile a demo, a warning is displayed as follows: The data directory has no write permission or is pointing to $COBDIR/demo. To maintain files in their original state, you should set-up the 'Transfer' option to copy the file(s) to a directory of your choice. If the 'Transfer' option is already set-up, the relevant file(s) will be transferred to the designated directory and compiled there on leaving this screen. If the 'Transfer' option is not available, you need to add the 'TRANSDIR' entry to the [mf-infomgr] section of th
This article explains how to fix compiler error CS1503 received when a C# program is calling a COBOL program. Problem: A C# program is calling a .NET COBOL program passing three parameters as its arguments. You receive error CS1503 in the C# program: C:\\Users\\ConsoleApplication1\\Program.cs(25,56): error CS1503: Argument '3': cannot convert from 'int' to 'MicroFocus.COBOL.Program.Reference' The C# program includes the following code: string unit = "102"; string msgtext = ""; int i = 0, r = 0; try { r = cblprog.PROG1(ref unit, ref msgtext, i); } catch(Exception ex) { Console.WriteLine(ex.Message); } The COBOL program includes the following code: Linkage section.01 unit-no usage string.01 return-msg-text usage string.01 test-int pic s9(9) comp-5.Procedure division using unit-no return-msg-text tes
This article provides an example of the use of the FUNCTION-ID paragraph with the RDFPATH and REPOSITORY directives. Problem: The FUNCTION-ID paragraph can be used in the IDENTIFICATION DIVISION to name an external function. When a program that uses this function is compiled, the following error message appears: 1304-S Method not found in repository Resolution: The RDFPATH should be used to compile the function program (mydouble.cbl in the example below) if the repository is generated somewhere different to the source folder. It should be used with the program that uses it (mymain.cbl) if the repository has to be searched somewhere different from the source folder or any of the directories in the $COBCPY environment variable (if defined). If both are used, the function and the main program are compiled with the same value in the RDFPATH directive, the 1304-S error message should not occur. The following example runs fine: cob mydouble.cbl -C RDFPATH=. cob c
This article explains why there is no Application Server license available at COBDIR when running an application with Java on an AIX platform. Problem: We have installed Server Express successfully and COBOL programs are running without any porblems. Java is installed correctly a Java program will run without any problems. However, when trying to do a combination of the two it throws up an error that there is no license available at the $COBDIR location even though it has been proofed that Java does run and COBOL runs as well. Why is this happening? Resolution: Check the user profile and especially 32-bit/64-bit paths as this has to be correct according to the type of license you have for your AIX machine. If you have a 64-bit license and a 64-bit AIX machine but somehow your user profile has a 32-bit path in there it will show the error that there is no license available at the $COBDIR location. Old KB# 14591
The RM/COBOL binding for PDFlib, included in the distribution of RM/COBOL, may be used to create highly complex PDF documents through a CALL interface. Problem: Modern applications are often required to produce PDF documents, for example as replacements for traditional printed reports or as a standardized mechanism to distribute documents via email. Simple solutions, such as printer drivers or external conversion tools, often lack the ability to control fonts or take advantage of intra-document linking and other advanced features of Portable Document Format (PDF), resulting in PDF documents that fail to meet user expectations for modern ‘look and feel.’ Many solutions also lack the platform portability required by RM/COBOL applications. Resolution: RM/COBOL includes a binding for the PDFlib API in the standard RM/COBOL distribution. PDFlib is a product of PDFlib GmbH; more information can be found on the PDFlib GmbH web site (see Related Lin
This article explains how to backup and rebuild files to resolve an RTS 114 error in mFFH. Problem: After upgrading from OCDS to Server Express an RTS 114 error in mFFH occurs randomly even though no code has changed and everything has been recompiled with Server Express. Resolution: Indexed files created by applications compiled with OCDS can occasionally cause problems when using the same applications that have been recompiled with Server Express. This is due to differences in the file handlers of OCDS and Server Express. The solution is to backup the files and then rebuild them with Server Express. Rebuild command: rebuild -d -e infile, outfile This rebuild command takes the input file, infile, and creates a new output file, outfile, from the data in infile. After running the rebuild, replace infile and its index with outfile: rm infile* mv outfile infile mv outfile.idx infile.idx If the problem persists after rebuilding the files please contact Micro
This article describes how you can write constructors with different signatures in COBOL .NET classes. Problem: You need to define different constructors in a COBOL .NET class that have different signatures. Resolution: The following code gives an example of a COBOL .NET class that has different constructors: class-id. Class1 as "ClassLibrary1Cobol.Class1". environment division. configuration section. repository. static. working-storage section. end static. object. working-storage section. method-id. NEW. procedure division. display "ClassLibraryCOBOL.Class1 Constructor()" goback. end method NEW. method-id. NEW. procedure division using aStr as String. display "ClassLibraryCOBOL.Class1 Constructor(String)" goback. end method NEW. method-id. NEW. proced
This article explains how you can write a COBOL .NET class that inherits from a C# .NET class. Problem: You need to create a COBOL .NET class that inherits from a C# .NET class. Resolution: You create a COBOL .NET class that inherits from a C# .NET class in the same way as you do it for a VB .NET class. The .zip file attached to this article includes a MS Visual Studio 2008 solution, CsharpAndCOBOLinherit.sln, that demonstrates how you can do that. The solution consists of the following 3 projects: ConsoleApplicationCsharp - a C# Console Application project ClassLibrarycSharp - a C# Class Library project ClassLibrary1Cobol - a COBOL Class Library project The C# Console Application, ConsoleApplicationCsharp, invokes the COBOL Class Library, ClassLibrary1Cobol, which inherits from the C# Class Library, ClassLibrarycSharp. Open the COBOL program, Class1.cbl, in the code editor and see that it defines the COBOL class, Class1. Class1: inherits from a C# class sets in its constructor
This article explains an archive library error when running a script on AIX. Problem: A script is employed to build an RTS executable using the cob –x command. The script runs successfully on HP/UX but fails on AIX. On AIX, an error appears saying archive library CLAIMCHK cannot be found. The same cob -x command is used in each case. The archive library is specified on the cob –x using the following syntax: -l:CLAIMCHK.a Resolution: The “-l” option is accepted by the cob command, but cob in turn passes this option to the system linker "ld". The “-l” option is actually a feature of the system linker. For information about the “-l” option, consult the HP/UX and AIX Operating System documentation, and in particular the man pages for "ld”. On HP/UX, the linker "ld" accepts the syntax: -l:library That is, “-l” followed by a colon (:) followed by a library name. The "ld" ma
This article explains how to generate XML header information when running in CGI mode. Problem: A COBOL program that runs in background mode must write to SYSOUT so that it will be shown in a web browser. The problem however is that the output must be in XML format instead of HTML. The error indicates that the content type needs to be XML. How can this be done this using AcuCOBOL? This is what has been suggested for php: header ("Content-type:text/xml") But this is not something that can be done in the XML file itself, but must be set as part of the header. How can this be accomplished with the AcuCOBOL-GT Runtime? Resolution: Set this variable in the runtime configuration file or environment: CGI_CONTENT_TYPE=text/xml. This will direct the runtime to provide the specified value for the Content-type header that the runtime automatically generates. The runtime can also be prevented from supplying _any_ HTTP headers automatically. To do this, s
Setting the 'NO-TAB' property on a graphical control can be done using 'MODIFY' and this works properly. However, it is not clear if there is a way to reverse the 'NO-TAB' setting without exiting the screen. Problem: A screen has several entry fields and some fields need to be skipped based on information contained in other fields. The 'NO-TAB' property can be set on the desired fields using 'MODIFY' and this works properly. It is not clear if there is a way to reverse the 'NO-TAB' setting without exiting the screen. There is not an 'ON/OFF' or 'TRUE/FALSE' setting for the 'NO-TAB' property. Resolution: The only way to remove the NO-TAB style from a control is to destroy the control and redisplay it without specifying the NO-TAB style. The same is true for the SECURE style available on an entry-field. A different option is to avoid the NO-TAB style and used the ENABLED property f
Attempting to add a record to a Postgres database table using AcuSQL encounters errors. Problem: Attempting to add a record to a Postgres database table using AcuSQL encounters errors: SQLCODE = -1, SQLSTATE = 42000, SQLERRMC = Attempt to execute nonexistent, unprepared or invalid statement SQLIST. Resolution: With the more recent ODBC drivers for UNIX and Linux the ReadOnly entry in the odbc.ini file needs to be set to NO. Once this is done any of the operations that modify data in the table (INSERT, UPDATE, DELETE) will work without error. Incident Number: 2220456 Old KB# 14527
This article explains how to configure the date-entry control to display dates prior to 1930. Problem: The date-entry control is set to the SHORT-DATE format. When the user enters a date prior to 1930 the year changes. For example the user enters 1929 and the control displays 2029. Resolution: When using the date-entry control’s SHORT-DATE format for displaying the date, the CENTURY-DATE style must also be applied. Old KB# 14543
The ACUCOBOL-GT runtime can manage different character sets other than the common Western European. Problem: Is it possible to use different character sets other than Western European in a COBOL graphical environment? Resolution: Yes, the ACUCOBOL-GT runtime enables you to change the locale of an application at runtime. When changing the character set, it is possible to accept and write into a Vision file characters that belong to different languages, such as Russian (Cyrillic), Greek, Turkish, Arabic and Hebrew. The attached program shows how to do this. Incident Number: 2351489 Attachments http://community.microfocus.com/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-01-22/0755.International.zip Old KB# 14588
This article explains how to create an XML file which has include files. Problem: Can an XML file have include files? Is it possible to create an include instruction using COBOL XML-I-O? Resolution: Yes, this is possible. The include instruction for XML files look like: The DOCTYPE declares a file which then is included with the newly defined entity name testing: <!DOCTYPE wrapper [<!ENTITY testing SYSTEM 'testing.xml'>]> The include is done as: &testing; <wrapper> &testing;</wrapper> The include instruction can be written as PLAIN-TEXT: write frame-tag KEY PLAIN-TEXT"<!DOCTYPE wrapper [<!ENTITY testing SYSTEM 'testing.xml'>]>" For more information, see the demo attached to this article. Incident Number: 2285017 Old KB# 14518
This article explains why a dialog box presents in the background rather than foreground. Problem: PC_PRINTER_OPEN will display a dialog box allowing the user to choose a printer. In some circumstances the dialog box is displayed behind another window. Why is this, and can it be forced to the foreground? Resolution: The PC_PRINTER_OPEN accepts a handle (HWND) that is made the parent of the dialog box. The box can be forced to the front by using the GetForegroundWindow API call to retrieve HWND of the current window and passing that to the PC_PRINTER_OPEN routine. Incident Number: 2353637 Old KB# 14573
This article explains how to add a new service to Enterprise Server from the local command line using and configuring mfdepinst. Problem: If you need to deploy a service to a number of servers, you might want to be able to do from the command line. You can use imtkmake to deploy your application, and this is well documented. imtkmake will pack all your application into a .car file and send it to the remote server, where mfdepinst will: copy the application files (*.int , ...) by unpacking the .car file copy the .idt file to a directory add a Package add a service assign Package and Listener to it do this on the right Enterprise Server do this on the right machine But how can you configure mfdepinst to assign another than the default path of the IDT file and to the service's Package and the right Listener to your Service? Resolution: When you use mfdepinst from the command line, there must always be a .mfdeploy file in the parent directory to the .ca
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.