Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How can you compile at a Windows command prompt. Resolution: The COBOL compiler can be run using the COBOL.exe command and any linking (to EXE/DLL) can be performed using CBLLINK.exe utility. The "Net Express Command Prompt" which is in the Net Express folder on the start menu has the environment already setup for compilation. If you want to perform compilation at normal Window Command prompt you need to run:- "c:\\Program Files\\Micro Focus\\Net Express n.n\\base\\bin\\CREATENV.BAT" (substituting your own path) before the compilation is carried out. Old KB# 3880
Problem: How can I call DSNTIAR from an Oracle (Pro*COBOL) application to retrieve the error message from a SQL operation? Resolution: To aid migration from Mainframe DB2, Oracle provide support for DSNTIAR, to retrieve error message text. With parameters defined thus : 01 ERROR-MESSAGE. 02 ERROR-LEN PIC S9(4) COMP VALUE 240. 02 ERROR-TEXT PIC X(240). 77 ERROR-TEXT-LEN PIC S9(9) COMP VALUE 240. call DSNTIAR with : CALL 'DSNTIAR' USING SQLCA ERROR-MESSAGE ERROR-TEXT-LEN and ERROR-TEXT will be populated with the
Problem: Running a Cobol application on a Windows 2000 machine fails with an error that says it was not able to find SHELL.DLL Resolution: Make sure to apply Service Pack 4 (SP4) on Windows 2000. Prior to SP4, SHELL.DLL was placed in c:\\winnt\\system32\\dllcache, and it is not in the PATH environment variable. This DLL on the other hand is in c:\\winnt\\system32 with SP4, which is also in the system path. Old KB# 3840
Problem: In the .Net DataGridView control how can you clear all elements in the Grid ? The datagrid view allows you to display a grid show many items of Information. In COBOL how can you clear out all items from the grid. Resolution: The "Items" property of the Grid Control contains a collection of the rows in the grid. You can use:- invoke dataGridView1::"Rows"::"Clear" to empty out the grid control. Old KB# 3893
Problem: Release 4.0: After rebuilding a file with duplicate keys the run time error 9/077 appeared when deleting the duplicate. Resolution: It is related to the large number of duplicate key values (20354) in alternate key 1 in that case. It is falling foul of some incorrect error checking in the filehandler whilst processing a delete operation (which in the end is causing the file to be corrupted). This code was corrected as the result of rpi no: 1053279 which is fixed in Micro Focus Studio 5. Workaround: In this case the problem can also be worked around by increasing the nodesize of the file to 4K using rebuild (ie create an extfh.cfg with NODESIZE=4096 and rebuild the file). This will increase the number of alternate keys that can be held in a node so that the total number of nodes needed to store the maximum number of alternate keys (65535) cannot trigger the incorrect error checking code. With the file containing the duplicates it does and the nodes
Problem: If you have code that uses the call to _codeset, as in previous versions of Netexpress (4.0 and earlier), but now in version 5.0 you try to link in the required cs module, you will get an error stating the cs object can't be found. Resolution: As of Netexpress 5.0, the cs OBJs are no longer required as they have been built into the codeset program. Old KB# 3908
Problem: Trouble sorting a very large file sequential. For example, In the xfh-default: [XFH-DEFAULT] FILEMAXSIZE=8 This file is non-fileshare and is defined as a line sequential. The sort always abends at the same record number no matter how much free space is available. Is it necessary to specify any sortwrk parms or does sortwrk take the xfh-default? Are there any limits to the number of input records or sizes when it comes to sort? Resolution: 1) gigs free doesn't mean its good free space - First check a defrag analysis and defrag if needed; 2) check where temp and tmp are pointing to and make sure this area is not Restricted to a certain size (e.g. its pointing to c: and all the free space is on d:); 3) Rule of thumb has always been that the temporary space required to sort a file is 2.5 times the size of the file. So if the file is 25 GB
Problem: In particular, I'm looking for documentation on how to use the Net Express Application Server process. We did find info on the run.exe program, but am having difficulty in trying to get displays to be redirected to an output file for future review. Is there any documentation available to help us with the Application Server Runtime environment? Resolution: This product provides all the support files necessary to support the execution of COBOL application programs. The way in which Applcation Server gets used is the execution of a COBOL application program. When you create your COBOL application program check the "Dynamic" checkbox and your program will look to the registry on whatever computer it is running to determine the location of the COBOL Run-time files necessary to support execution of the program. If you don't use the "Dynamic" checkbox you must set the PATH and COBDIR environment variables to point t
Problem: Traditionally, the use of multiple versions of the same COM Object on a single machine has proved difficult to maintain and implement. In addition, tighter security requirements have made the registering of a COM DLL more difficult. It may be a hardened server with a deduced permissions set that does not allow the registry to be updated. Resolution: Windows XP/Windows 2003, and above, introduced a solution to this issue called Side-by-Side assemblies. This allows you to use application manifest files to specify what COM components are available to the application. At runtime the operating system (OS) will use the information contained in the application manifest to locate the COM DLL for a specific "progid" (or GUID). (Note: A .ZIP archive file containing the full demo supporting the subject of this article is available for downloading at the bottom of this page.) What is the "manifest"
Problem: How do I receive parameters the way Mainframe parameters were processed? Resolution: There is a complete project available under the "Related" tab. =========================================================== M I C R O F O C U S N E T E X P R E S S =========================================================== PROJECT TUNABLE-PARMS ==
Problem: The easiest is to use a BITMAP as a background, having previously used the MS Api SetBkMode with the TRANSPARENT option... see MF KB 21852 http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=21852... Another way is to use the Microsoft API Rectangle as done in the demo attached to this KB Resolution: The easiest is to use a BITMAP as a background, having previously use the MS Api SetBkMode with the TRANSPARENT option... see MF KB 21852 http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=21852... Another way is to use the Microsoft API Rectangle as done in the demo attached to this KB http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fillshap_6kth.asp Rectangle The Rectangle function draws a rectangle. The rectangle is outlined by using the current pen and filled by using the current brush. BOOL Rectangle( HDC hdc, // handle to DC
Problem: This article discusses the Consolidated Tracing Facility (CTF), which is now part of the functionality offered in the latest versions of Net Express and Server Express. Resolution: Overview CTF provides reliable, fast, and configurable tracing capabilities. Eventually it will interleave trace events output from all the components involved in running applications. At present the runtime system (RTS) is the only enabled component: all components are expected to convert to use CTF as their tracing mechanism in future releases of Micro Focus products. CTF is therefore a 'work in progress'. CTF is enabled by using an environment variable to point to a 'side file' (configuration file) which contains one or more entries. CTF will then run a module, known as an 'emitter' (at present the only emitter is one that produces a plain text file) giving details of the application(s) being run. The e
Problem: Load error : file 'EXTSM' error code: 173, pc=0, call=1, seg=0 173 Called program file not found in drive/directory This error is due to the EXTSM object file not being linked to the executable. Resolution: To overcome this problem you need to link EXTSM.OBJ to the EXE. This can be done through the BUILD SETTINGS of the IDE in NetExpress or include it in CBLLINK on the command line. Specifying EXTSM.OBJ in this way, the executable should work correctly within and outside of the IDE. Attached is a small demo which might help the customer. Old KB# 390
Problem: Why does Studio 5 require the .NET framework to be installed on my machine for the setup to install Studio 5 (Net Express 5) successfully? Would my application require the .NET framework to run? Resolution: The .NET framework SDK 2.0 is mandatory when installing Studio 5 because it used by some of our components within the Micro Focus Net Express IDE. But that doesn't mean that the application generated with them requires .NET. For example, the IMTK (Interface Mapping Toolkit is used to convert a COBOL program to a Web Service) requires the .NET framework SDK 2.0 to run, but the Web Service generated with it doesn't require the .NET framework SDK 2.0 to run, it just requires Enterprise Server. Old KB# 3849
Problem: Calling a Visual Basic class program in .NET from COBOL gives a 173 error message that the dll cannot be found (Load error : file xxxxxx error code 173. pc=0, call=1, seg=0). Resolution: First of all, make sure that the reference to the DLL is correctly set up. In the REPOSITORY SECTION of the COBOL program, define a class as a reference to a class of the DLL. Make sure the reference is to a class and not a class method. In the WORKING-STORAGE SECTION, define an object reference to this class. To call/invoke a method in .NET from a COBOL program use 'invoke' rather than 'call' to interface with other .NET languages. Old KB# 3870
Problem: How can you convert data/string from EBCDIC to ASCII or vice versa? Resolution: Converting between EBCDIC and ASCII Generally, when you want to do a translation between ASCII and EBCDIC, you should use the callable interface to the GUI File Converter (DFConv). For more information about using DFCONV and the command line interface, see the chapter File Conversion Utilities. There is another function which enables fast translation between ASCII and EBCDIC strings within a Micro Focus COBOL program. This is called "_CODESET". Its usage is: call "_codeset" using function-code, length, string where: function-codePIC 9(2) COMP-X 0=convert EBCDIC to ASCII 1=convert ASCII to EBCDIC lengthPIC 9(9) COMP-X string PIC X(n) Note that "_codeset" cannot work from a program that is compiled with the reserved word directi
Problem: Project is on a shared network drive. When run, gets runtime error: System.TypeInitializationException was unhandled Resolution: Need to change the Permission Set for LocalIntranet_Zone code group: Open the .NET Framework Config Wizard: Control Panel > Admin Tools > Microsoft .NET Framework 2.0 Configuration On the Configuration Wizard, go to: My Computer > Runtime Security Policy > Machine > Code Groups > All_Code > LocalIntranet_Zone Right click on LocalIntranet_Zone and go to Properties On the Permission Set tab click the dropdown box and select FullTrust Click OK Old KB# 3854
Problem: Dialog System: The DISPLAYs in my GUI Dialog System COBOL program do not appear when I use an EXE build. Resolution: In Net Express, the default linking builds a graphically EXE, where DISPLAYs are suppressed as long as there is no open console / command prompt for this application. There are two possibilities to get a console for the DISPLAYs. Either: --------------------------------- Add the statement: ACCEPT dummy WITH TIMEOUT 0 in front of the first DISPLAY. Any ACCEPT, which expects input from a console, will induce the RTS to open one. And subsequent DISPLAYs will occur. "WITH TIMEOUT 0" does not wait for the input and returns immediately. The console only occurs if necessary. Please define "dummy" in the WORKING-STORAGE SECTION, e.g. 01 dummy PIC X. --------------------------------- Or: --------------------------------- You may change the default graphical link to a character mode lin
Problem: Release 4.0: Is there a possibility to integrate this WinCVS product in Net Express? Resolution: Yes, if the product supports the Microsoft's SCCS interface you should be able to integrate into Net Express any source control system you want. For detailed information how to integrate / to maintain this please see KB articles no. 18779 also 20096. Old KB# 3894
Problem: When running a COBOL application under a local installation of Net Express Application Server you might get a Semaphore error and the application fails. Resolution: When running a COBOL application under a local installation of Application Server and the Application Server license database is also local, make sure that the ASLMFNET environment variable isn't set. This environment variable isn't required when running against a local database, only when running against a remote license database. Old KB# 3890
Problem: Using the call X"A7" function 17 to hide the cursor does not work, a thin line persists on the screen. Resolution: The call-by-number call X"A7" function 17 cannot be used to set the cursor to invisible (hidden). It is possible to hide the cursor in a character-mode linked program (EXE build). The CBL_SET_CSR_POS can be used instead of call X"A7". See online help. Or the WinApis CreateFile and SetConsoleCursorInfo. The attached demo shows, how to do each of them. Attachments: Curs-off.zip Old KB# 3875
Problem: Following is an explanation on how to collect multiple parameters from command-line. Resolution: Click "Related" tab above for a complete example project. =========================================================== M I C R O F O C U S N E T E X P R E S S =========================================================== PROJECT COMMAND-LINE-ARGUMENTS =============
Problem: How can I calculate the length of a UNICODE string? Resolution: The following code fragment illustrates one method of calculating the length of a UNICODE string: working-storage section. 01 account-name-text pic n(20). 01 account-name-len pic 9(3). 01 w01-s1 pic 9(3). procedure division. initialize account-name-text.  
Problem: User wants to accept parameters from the command-line Resolution: Note: The complete example is attached and available under the "Related" tab. INTRODUCTION ============ This example illustrates how you can acquire parameters coded at the command prompt by using the "COMMAND-LINE" function-name. C:\\FOLDERNAME>CLPARMS.EXE MONTH-END<Enter> At the "C:\\FOLDERNAME>" prompt, the "CLPARMS>EXE" program name has been typed followed by the "MONTH-END" parameter. The "COMMAND-LINE" function-name can be used as the second operand of an accept statement to collect whatever has been typed following the program name at the command prompt. accept parameterValue from COMMAND-LINE The firs
Problem: Used the ODBC data source administrator (via the control panel) to add a user DSN, then clicked on the "test connect" button and the following error occurred: specified driver could not be loaded due to system error 1157 Resolution: The common causes for this type of error is 1) Don't have the necessary ODBC drivers installed 2) The appropriate DBMS client software is not installed. 3) System Path is not set correctly. Check the above causes and see if it helps resolve this problem. If the problem still exists then contact Micro Focus SupportLine. Check our website (http://www.microfocus.com) for SupportLine contact numbers (http://www.microfocus.com/AboutMicroFocus/contact/supportlinebycountry.asp) Old KB# 3815
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.