Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Created On: 23 November 2012 Problem: How do you get the DB2 JDBC JNDI database connection with Visual COBOL for Eclipse? Resolution: 1. Introduction This document covers working with OpenESQL applications under the Visual COBOL eclipse product lines, including some background on how things fit together, and an example of building and executing a sample program. 2. Software requirements The document assumes that you already Have a copy of Visual COBOL for Eclipse installed and licensed appropriately. Have a copy of DB2 installed like db2 10.1 express version. Have a copy of simple JNDI class library .jar file like simple-jndi-0.11.4.1.jar 3. DB2 COBOL example In Eclipse Create JVM project create cobol program TestDate Cut and paste the below program into the new program. $set sql(dbman=jdbc) program-id. TestDate as "TestDate". &nb
Created On: 12 December 2012 Problem: Having Internet Explorer 8 installed, the Web Browser control returns a value related to IE 7. This may cause some issue to customer's application which will run a test on the browser installed on end-users' machines. Resolution: This problem is caused by some changes that MS introduced during the IE 8 Beta1. The following link explains the problem and the solution. http://blogs.msdn.com/b/ie/archive/2009/03/10/more-ie8-extensibility-improvements.aspx In short, you need to add a registry key naming the executable (wrun32.exe or acuthin.exe, or if you have renamed the runtime, whatever name you gave it). Incident #2599414 Old KB# 36675
Created On: 15 November 2012 Problem: Converting an RM fixed length indexed file using RM to MF Data Conversion sample produces an MF variable length IDXFORMAT(8). Resolution: The RM to MF Data Conversion sample is a "sample" program, and it should not be considered as an official Micro Focus conversion utility. The purpose of this sample program is to convert an RM indexed file into an MF variable length IDXFORMAT(8) file. If you wish to modify the sample to convert into an MF fixed length IDXFORMAT(8) file, you will need to change lines 541 and 542 of MigrationForm.xaml.cbl:set tmpStr to String::Concat(IntermedFile, ", """, outFile, """ /o:seq,ind /r:v", MinSizeStr, "-", MaxSizeStr, " /t:mf8 /k:", KeyStr::Trim()) to the following:set tmpStr to String::Concat(IntermedFile, ", """, outFile, """ /o:seq,ind /r:f",&
Created On: 16 November 2012 Problem: Customer is using a C# Windows Forms project in his application and they need to be able to call some native COBOL .dlls from C#.What is the easiest method to do this in Visual COBOL? Resolution: The easiest method is probably to create a wrapper program using managed COBOL that C# can call directly.The managed COBOL wrapper program would then format the parameters passed to it according to what is expected by the native COBOL program.There is a demo program attached to this article that shows one method that this can be done.Here is the description from the demo: TestWrapper Demo This example program demonstrates how C# can call a native COBOL program by using a managed COBOL wrapper program. The managed COBOL wrapper program is compiled with the ilsmartlinkage directive which causes the c
Created On: 29th November 2012 Problem: In Visual COBOL for Eclipse, when compiling a remote project which includes DB2 directives it fails with an error: [cobol] [cobol] Compiling (64-bit) Program1.cob... [cobol] [cobol] Load error : file 'cobsqlecm64.so' [cobol] error code: 198, pc=0, call=1, seg=0 [cobol] 198 Load failure (No such file or directory) [cobol] [cobol] cob64: error(s) in compilation: Resolution: Before starting the RSE server process via the script $COBDIR/remotedev/startrdodaemon the environment must be correctly configured so that the DB2 libraries can be found. The environment can be configured using the db2profile script provided with DB2 in the sqllib directory located in the home directory of the DB2 instance user. For example, you could create a script to
Created On: 14 December 2012 Problem: Customer is using a C# front end that calls a managed code COBOL class which in turn calls a native COBOL .dll. The C# program is creating a new instance of a RunUnit (MicroFocus.COBOL.RuntimeServices.RunUnit) and then calling the managed COBOL program by adding it to the RunUnit. Is it OK for the managed COBOL to call the native COBOL .dll when it is part of a RunUnit? Resolution: Yes, you can call native COBOL .dlls from managed COBOL when they are part of a RunUnit instance. The native runtime has a “one rununit” per process model, so in effect the native code will be shared between all the managed RunUnits. The native and managed RunUnit have no interaction with each other, so a CANCEL in managed code has no effect on the native RunUnit. The same goes for open files, they will not be shared between the two RunUnits. This in itself might not be a problem if the program is stateless or serialized… ie: local-storage based
Created On: 20 November 2012 Problem: Using the compiler directive XMLGEN(WS) instructs the compiler to create the XML model files. However the IDE creates the XML model file(s) in the project root directory, but the runtime is expecting to find them in the output folder so an error 39 is generated, for example:Error: 39[01] model (symbol table) file that defines model data-name not found[39]ModdelFileDataName parameter: "Address-Struct" Resolution: The XMLGEN directive can specify a path for the directory/folder of where to put the model template file. This path can be relative or absolute. If the ws option is desired, specify it in a separate XMLGEN(ws) directive that follows the XMLGEN(path) directive, where path indicates your desired directory/folder, because setting the path nullifies the XMLGEN(ws) option. For example, cobol testxmlgen01 XMLGEN(c:\\windows\\temp) XMLGEN(ws); will
Created On: 28 November 2012 Problem: Having build several Visual COBOL executables a customer would like to deploy them onto peoples desktops. Rather than have a standard 'Windows' icon on the desktop to represent their application they would like to have their own images displayed as the icon. How do they build the executable so that these 'images' can be seen as the desktop icon rather than the 'Windows' icon? Resolution: Basically just open up project properties to Application tab and select the icon that you want to use for the application: Old KB# 36641#Enterprise#VisualCOBOL#COBOL#EnterpriseDeveloper
Created On: 28 November 2012 Problem: Customer was converting a Net Express native application to a Visual COBOL managed code application and noticed that there was an extreme performance hit when executing a COMPUTE statement that included fractional exponentiation.Program looked like: 01 ws. 05 WS-TEST-VALUE PIC S9(9)V9(4) COMP-3. 05 WS-TEST-INTEREST PIC S9V9(6) COMP-3. 05 WS-NO-DAYS PIC S9(05) COMP-3. 05 WS-DAYS-BET-ANIV PIC S9(05) COMP-3. MOVE 44406.25 TO WS-TEST-VALUE. MOVE 0.015 TO WS-TEST-INTEREST. MOVE 365 TO WS-NO-DAYS. MOVE 365 TO WS-DAYS-BET-ANIV. COMPUTE WS-TEST-VALUE ROUNDED = WS-TEST-VALUE * ((1 WS-TEST-INTEREST) ** (WS-NO-DAYS / WS-DAYS-BET-ANIV)). The Compute statement above was taking about 20 seconds to execute.How can this performance be increased? Resolution: The problem is that in managed code COMP-3 data types do not map directly to a manage
Created On: 28 November 2012 Problem: Customer developed a Windows Presentation Foundation (WPF) application in Visual COBOL.When they now run the application under the debugger, when it executes the InitializeComponent method for a particular window it takes about 30 seconds before it returns back to the debugger.What is causing this extreme slow down? Resolution: After examination of the .xaml code for the form it was found to contain a button that used an image file that was referenced using a UNC name.The UNC name that was referenced was not a valid location on the customers computer and so that when the form was being loaded it could not find the location and the network search for the image file was causing the slow down.When the customer changed the UNC to reference an existing location the performance returned to normal. Old KB# 36642#VisualCOBOL#Enterprise#COBOL#EnterpriseDeveloper
Created On: 16 November 2012 Problem: Customer is using Net Express 5.1 and has the following question.Net Express has the instrinsic functions upper-case and lower-case. Is there a Function or Module that converts string fields into upper AND lowercase? For example: I would like to convert "JOHN DAVID SMITH" into "John David Smith". Resolution: There is no COBOL intrinsic function to do this mixed case conversion but here is a simple demo to show you how you can write one in COBOL. This example is also attached to this article as a zip file.The mixedcase function will capitalize all words in a string passed to it.Calling program: *----------------------------------------------------------------* * Test Case *  
Created On: 11 December 2012 Problem: Customer has a .NET Windows Form application written in Visual COBOL. The form has several textbox controls on it and it uses auto validation by setting their CausesValidation property to true.This works fine when a user leaves the field except when they click on a button that causes a FormClose event to fire, such as invoke self::Close or clicking on the Windows Close "X" box.The problem is that the Validating event occurs before the FormClosing event so the validation code will be executed when it really should be bypassed so that error messages are not displayed etc.How can this be programmed so that the validation code is bypassed if the form is closed? Resolution: There is a sample program attached that demonstrates how this can be done by checking the current stack for the form to see if the WmClose message is present before executing the validation logic.If WmClose is found then the logic will be bypassed and the
Created On: 30 April 2012 Problem: Failed to authorize the Authorization Code over the web. Even when using the Manual Authorization option, it says the license is installed but nothing was displayed on the 'Licenses' tab of the 'Micro Focus Licensing System Administration' window. Resolution: The license files, lservrc.stn and lservrc.net, are located in:C:\\ProgramData\\Micro Focus - for Windows Vista or Windows Server 2008 or Windows 7 C:\\Documents and Settings\\All Users\\Application Data\\Micro Focus - for Windows XP Follow these instructions:1. Create a copy of the lservrc.net and lservrc.stn files.2. If you see the word "STANDALONE" in the license strings, then open the lservrc.stn file using notepad or wordpad. If you see the word "NETWORK" in the license strings, then open the lservrc.net file.3. If the license fil
Created On: 30 November 2012 Problem: In the Net Express/Server Express documentation in the section under COBOL/Java Interoperability section for compatible data types here: it shows that the compatible COBOL data type for the Pointer class is PIC X(99).Does this mean that the maximum size of a string that can be passed to COBOL is 99 bytes? Resolution: The documentation example is not correct.PIC X(99) is shown as an example of what the data type could look like and not what it must look like.The documentation should really show the data type for the Pointer class as: PIC X(n) where n = 1 -> maximum length of string passed. Old KB# 36645#ServerExpress#netexpress#EnterpriseDeveloper#VisualCOBOL#COBOL#StudioEnterpriseEdition#Enterprise
Created On: 19 November 2012 Problem: When installing Visual Cobol 2.1 Products it will install the License manager using lmsetup64.msi , this will automatically create Firewall rules to allow for communication to licening servers. Is there a parameter to prevent firewall rules from being set during license manager installation? Resolution: You can use the following parameter when installing the license manager: > lmsetupx64.msi ENABLEFIREWALL.B770BEF9_6C75_468D_A6D3_B6B7856579C8=”FALSE”This will not create any Firewall rules when installing the license manager. NA Old KB# 36619#COBOL
Created On: 04 December 2012 Problem: Customer is converting a native code Net Express application that uses Oracle's Pro*COBOL precompiler to access Oracle databases, to use Visual COBOL .NET managed code using the Oracle Data Provider ODP.NET driver.OpenESQL supports dates that are in ISO format YYYY-MM-DD but the application is using the Oracle format of MM-DD-YYYY.How can they continue to use the Oracle formats so that they do not have to change their source code? Resolution: Starting with Visual COBOL 2.1 Hotfix 2, there is a new SQL directive called DATE=EXTERNAL.When this directive is set and the program is using the Oracle Data Provider for .NET (ODP.NET) then the date format used will be that set by the NLS_DATE_FORMAT and NLS_TIMESTAMP_FORMAT settings of Oracle or the NLS_DATE_FORMAT and NLS_TIMESTAMP_FORMAT environment variables if they are set.This only works with the ODP.NET and does not work with the Microsoft Oracle ADO driver.Here is an example program
Created On: 12 December 2012 Problem: It is possible to have multiple physical files that are, logically, the same file? In this scenario, it is useful to be able to combine the records from the different physical files into one Relativity table. Resolution: *The Relativity Designer Help file discusses this topic in detail. However, the following is a simple guide to setting it up. This guide assumes that you have created a new catalog and have imported the FDs of all the files you wish to use. **All files MUST have the same structure and data definition. If you wish to 'merge' data from files that have dissimilar structures, then create a table per file and merge the data in your ODBC enabled application using SQL JOIN. 1. Open each FD, right click, and select Add File Label. Ensure the name is unique for each FD. It helps to give the File Label the same name as the FD. 2. Create a table and drag all the fields (including the File Label field) from the first FD. 3. Clic
Created On: 21 November 2012 Problem: Opening an HTML file in Net Express fails with the following error after applying Net Express 5.1 WrapPack 7: Object Code error: file 'proplist'error code: 153, pc=0, call=1, seg=0153 Subscript out of range (in .\\PROPLIST.cbl, line 2366)The exact same error appears when creating ActiveX controls in a Dialog System screenset. Resolution: The problem has been addressed in RPI 1085782, and the fix will be included in Net Express 5.1 WrapPack 8, which will be released sometime in February 2013.The workaround is then to remove WrapPack 7 and remain with WrapPack 6. Incident #2602584 Old KB# 36623
Created On: 16 November 2012 Problem: With Visual COBOL for Visual Studio there is a sample solution called RMMFMigration. This solution assists in the conversion of RM/COBOL data files to the Micro Focus Visual COBOL data file format. Converting RM/COBOL data files to Micro Focus Visual COBOL Format is a two step process. The data file is first converted to an intermediate variable length sequential file by a conversion routine (ixconvert.cob) and is then passed to a Visual COBOL application (rebuild.exe) to convert the intermediate file into a Micro Focus Visual COBOL index file. However this isn't an Eclipse version of this solution. Resolution: The RMMFMigration project is really just a front end that then calls ixconvert that does the real work. Ixconvert is an RM/COBOL object and can be run using ‘runcobol’. It will produce a Micro Focus binary sequential file and will return several pieces of information to the caller including the key expres
Created On: 14 December 2012 Problem: Customer has an application that uses many indexed files that are opened for input so that the application can read records in each of the files.This processes OK when only a single instance of the application is running but when multiple instances of the application are running, the performance gets quite a bit worse and file locks begin to be returned to the applications.No application is updating the files. How can we improve the performance and get rid of the locking issues that are occurring when multiple instances of the application are running? Resolution: Try opening the files using the following statement: OPEN INPUT SHARING WITH READ ONLY filenameThis tells the file handler to only allow other applications to open the file for read-only so that it does not have to include all of the overhead checking to see if the files have been updated by another application since the last read took place.This can dra
Created On: 12 December 2012 Problem: It may be necessary to gather use count information for your RM/COBOL Runtime or Compiler. However, this information is not reported by the Runtime or Compiler products. Resolution: The RM/COBOL Use Count Utility(rmucutil) is used to check how many use count licenses are in use on the network. The RM/COBOL Use Count Utility(rmucutil) can be found in the RM/COBOL installation directory. Below is the usage information for the RM/COBOL Use Count Utility(rmucutil): rmucutil RegistrationNumber [COMPILER|RUNTIME] DETAILS *The Registration Number for your product can be found by running either of the following commands: "runcobol" or "rmcobol" In addition, the environment variable RM_UC_LOG_PATH can be set to a directory, so RM/COBOL will create a RMUSECNT.LOG file, which will contain similar diagnostic messages. For example, for Windows systems, setting RM_UC_LOG_PATH=C:\\TMP will cause RM/COBOL to create a
Created On: 27 November 2012 Problem: If you have enabled a trace in Fileshare what will you see in the trace if an application has issued a rollback of a transaction? Resolution: The Fileshare trace will log the file operations that are performed on a file. The file handler op code for a rollback is DD and it is a standard file operation you the full code you see is FA DD.An example log showing a rollback would look like:-07385680 FS163-I Input- FSADMIN FA8E C:\\MYFILES\\AFILE.DAT07385680 FS173-I Output- FSADMIN 2/307385680 FS163-I Input- FSADMIN FAF3 C:\\MYFILES\\AFILE.DAT07385682 FS173-I Output- FSADMIN 0/007391544 FS163-I Input- FSADMIN FADD07391546 FS173-I Output- FSADMIN 0/007391719 FS171-I Input- Logoff FSADMIN07391723 FS173-I Output- 00001 0/0You can see in the trace above that the FADD (Rollback) has been issued. Incident #2600954 Old KB# 36636#COBOL
Created On: 18 December 2012 Problem: It sometimes happens that in unit testing a message remains in the IMS MSQ queue. Is there a way other than deleting IMSMESGQ.DAT to delete single messages from MSG queue? Resolution: A new command has been added to the IMS functions that will allow you to delete the FIRST or ALL msgs queued for an IMS Transaction.Enter /DEQUEUE TRAN trxname FIRST or ALL where trxname is the name of the IMS transaction in the IMS Control panel in ESMAC.This command was added in Studio 6.0 SP2 WS2 and is available in Enterprise Developer v 2.1. Old KB# 36686#COBOL
Created On: 04 December 2012 Problem: Customer has developed a .NET Windows Forms application using Visual COBOL and now they wish to deploy it on a network server so that all workstations that are mapped to the server can run the application without installing the COBOL Server product locally on each workstation.Can this be done? Resolution: Yes, a .NET managed code application can be setup to run from a network server as long as the workstations that are accessing the server have the required permissions.If you also are using native code components in your application then you will need to setup the licensing as shown in KB article here:Here are the instructions for extracting the managed code assemblies from the COBOLServer21.exe installer so that they can be deployed on a network and shared by workstations. The following are instructions for installing the COBOL Server 2.1 managed code assemblies to use on a network. This assumes that you already have the COBOL Server
Created On: 10 December 2012 Problem: When compiling a COBOL program, AcuBench 9.1.2.1 crashes. Resolution: This is due to a correction made in 9.1.2 that removed memory leaks. There is a new ECN-WB915 that will be included in version 9.2.0, but there is already a patch available for AcuBench 9.1.2.1, which is patch 1357, that could be requested to SupportLine. Incident #2603766 Old KB# 36670
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.