Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Net Express 5.0 with .NET (base release): System.MissingMethodException on MicroFocus.COBOL.Program.Edited.loadCheck64bitNumericEdited message when running a Net Express 5.0 .NET application Resolution: Net Express 5.0 with .NET (base release): Where there is a combination of a MOVE from an edited data item to a non-edited data item and the CHECKNUM directive. Removing the CHECKNUM directive is a work-around, but installing Net Express 5.0 WrapPack #2 (or higher) will resolve the problem. Old KB# 1235
Problem: Is there a possibility to interface COBOL vs Open Source databases, e.g. MySQL or PostgreSQL? Resolution: Yes, via an ODBC interface provided by Net Express Windows product also provided by Server Express Unix / Linux product (to find in doc files under:OpenESQL) and including a precompiler there is a possibility to interface Open Source databases, e.g. MySQL / PostgreSQL, using ODBC drivers delivered by this Open Source community: a) MySQL: http://www.mysql.org/downloads/connector/odbc/ b) PostgreSQL: http://pgfoundry.org/projects/psqlodbc Old KB# 1240
Problem: When accessing Micro Focus files it is always good practice to check the file status returned after each I/O operation. Resolution: It is possible to create a general COBOL copybook that can be reused in all programs. The following is an example of just such a copybook: 01 (tag)-fstat. 03 (tag)-fs-values. 05 (tag)-fs-key1 pic x(1). 05 (tag)-fs-key2 pic x(1). 05 (tag)-fs-key2-bin redefines &nb
Problem: When compiled to GNT the application just terminated with no error being output. However when it was built to INT it worked successfully. The last event from a COBOL runtime Consolidated Trace output was an exit program event. Resolution: The top level program in this case was C and it used cobcall to invoke the COBOL. Errors such as this are usually down to the application exceeding stack size. Recursion and local storage all contribute to the stack usage. To increase the stack size by using the /STACK option of the Microsoft Linker. Using another linker then please see the documentation supplied with your linker. Old KB# 1231
Problem: On occasions there is an issue whereby the majority of the COBOL WinForms Toolbox Icons are the same. Unloading the project and reloading it, rebooting the PC does not help. Resolution: Drop to a Visual Studio command prompt and run the command DEVENV /ResetSettings The result will be that the Toolbox Icons are reset to their correct settings. Old KB# 1224
Problem: Isam files at client's site were getting corrupted. Some of the files used are large, 1Gb Resolution: The resolution to the problem was to turn the opportunistic looking setting on the Novell server to OFF. Suggestions: 1) Ensure that the Novell Opportunistic Locking setting is turned OFF 2) Add READSEMA=OFF to your current EXTFH.CFG 3) No regular maintenance is done on the ISAM files. Made the strong suggestion that they reorg the files on a regular basis. Old KB# 1221#RMCOBOL#ServerExpress#COBOL#AcuCobol#netexpress
Problem: The sample printer exit (SAMPPRNX) shipped with Net Express is incomplete and does not compile. Resolution: Attached to this article is a full and updated set of files for SAMPPRNX. Copy the attached files to your <install-dir>\\Examples\\Net Express IDE\\SAMPPRNX directory, and rebuild the project. Please note: when deploying the exit to an enterprise server, you should place the executable files in a location on the COBPATH. Attachments: cascbprn.cpy Old KB# 1222
Problem: A COBOL program built as an .exe in Net Express and Interface type as Graphical, displays characters in the 'COBOL Text Window' -- a MF implemented win32 console -- when run. Try to change the font size and you can only choose up to a maximum value of 20. Resolution: The value 20 is the font size limit of the COBOL Text Window. Old KB# 1211
Problem: Is there a way to display application errors in a dialog box? Resolution: Net Express 4.0 and later The attached demo illustrates a way of displaying errors from your applications within a Windows dialog box. The demo takes the form of a sub-program that can be called and passed information on the error. The demo supports the following error types: 1) Dialog System 2) General 3) Intrinsic function 4) Panels2 5) File I/O The code is easy to follow and can be extended without too much effort. Attachments: DISPERROR.ZIP Old KB# 1242
Problem: Is there an easy way to count the number of records in an indexed file? Resolution: Use rebuild with the "/n" option to read the header of the indexed file and return information on the file which will include the numbert of records. e.g. rebuild /f file.datOld KB# 1233#AcuCobol#ServerExpress#RMCOBOL#COBOL#netexpress
Problem: Compiling a program with mulitple entry points gave the error: 002-R Attempted to redefine symbol when the program was compiled. Resolution: This was caused by the following scenario:- aaaaa.cbl had a program-id of bbbbb aaaaa.cbl also had a an ENTRY POINT called aaaaa. The problem here was generated because the compiler was attempting to create duplicate entry point called aaaaa. Here the program id did not match the source name. The solution was to rename the source file to bbbbb.cbl. The program then compiled cleanly to obj code. Old KB# 1247
Problem: A file is defined as line sequential, but records may contain some fields of computational numbers. Most of the fields are text char, and some are none displayable hex values. While writing such a record, the filehandler will precede such a hex code by a zero byte. During READ, binary zeros are removed, and the remainder of the record is shifted. If a record contains x"09" as part of a comp number, this byte will be expanded as a tab. Resolution: In order to read and write a record unchanged, two extfh parameters are required. INSERTNULL=OFF EXPANDTAB=OFF Using these options, text lines can be handled like data records.WARNING - Using INSERTNULL=OFF when binary data is present may cause records to be split in to two records if binary data is added which is the same as a line termination character Old KB# 1213#RMCOBOL#ServerExpress#COBOL#netexpress#AcuCobol
Problem: What is the simplest way to set the default ADIS (DISPLAY) colours so that all DISPLAY statements would use the specified colour. Resolution: The simplest way to do this is is simply to clear the screen as follows: display spaces with foreground-colour 3 This sets the default Text colour to CYAN. The online documentation details the number that correspond to colours. Old KB# 1249
Problem: In the NetExpress 5.0 documentation, if the link to "Extended File Status Codes" is followed from the master index, the message for the "nnn" field cannot possibly be correct. For example "161" is shown as "Illegal Intermediate Code". Resolution: The links in the version 5.0 documentation for extended file status actually go to the run-time system error numbers, which are not applicable. The example above, 161, should be "file header not found". The workaround is to use the Error Messages reference manual from an older version of NetExpress. The NetExpress 3.1 documentation is correct and is available at the SupportLine web site, http://support.microfocus.com under "Documentation". Corrected documentation is tentatively scheduled for release in July 2007. Old KB# 1209
Problem: Net Express 5.0. Is it possible to turn the newline x"0A" character off when writing an XML stream to :cgi:. Resolution: The Net Express 5.0 documentation includes the following: New syntax for select statement is: SELECT xmlfile ASSIGN TO [[NOT] LINE ADVANCING] FILE Of course if "NOT LINE ADVANCING" is specified then no line-feeds would be included in the output. How to write a newline character at the end of the XML stream? This can be achieved as follows: ... select xml-file assign to not line advancing file-name organization is xml document-type is "CompanyTrans.xsd"
Problem: Attempting to install Net Express 4.0 onto a machine that previously had Application server installed. However, the Application Server product was not listed in the 'Add/Remove Programs' in the Control Panel, to enable it to be removed. Error: Setup has detected an installation of Application Server for Net Express 4.0. Net Express 4.0 cannot be installed while Application Server for Net Express 4.0 is present. Resolution: Fully check that no Application Server or Net Express product is installed: - check 'Add/Remove programs' via the Control Panel - check via Windows Explorer for the following folders C:\\Program Files\\Micro Focus\\Net Express OR C:\\Program Files\\Micro Focus\\Application Server OR C:\\mfaslmf - In the Windows Explorer and click on the C
Problem: Release 5.0: Can't create ASP .NET Web App after installing Visual Studio 2005 Service Pack 1. Resolution: Installed Net Express 5.0 with .NET support and have then installed Visual Studio Service Pack 1, and unable to create a new web site/service via the COBOL language. It seems that the Visual Studio 2005 Service Pack 1 installation appears to remove some registry entries which register COBOL with the web project system. Other than the uninstall/reinstall approach (via Windows Add/Remove Programs/Change/Modify option), there is a way to get these entries back by running the following command from the Micro Focus\\Net Express 5.0\\packages directory: regsvr32 cblprj.dll Old KB# 1237
Problem: Missing service interface file message when running imtkmake -generate command. Resolution: Using the Net Express 5.0 Interface Mapping Toolkit GUI to create a mapping for a Web Service and then run the imtkmake.exe command line utility with the -generate option to create a .car file deployment package, the message "Missing service interface file" can be shown. This may happen running the command from a location where the interface file does not reside. This particular file goes by the name of the web service with a .xml extension. For instance, if the command is: imtkmake -generate service=MyWebService type=webservice then the service interface file name would be MyWebService.xml. Having used the Interface Mapper GUI to map the interface from a project, this file can be found in the REPOS subdirectory. Old KB# 1227
Problem: A web services client generated from a WSDL gives an error 1500, which indicates an internal server error. How can this service be debugged to determine if it is a problem with the generated client or the server? Resolution: The attached document describes how to debug a web service client generated from a WSDL using the trace utility available as part of the Microsoft SOAP toolkit and can be used to debug a service on Windows or Unix. Attachments: Debugging a Web Service.doc Old KB# 1207
Problem: Release 5.0: Showing and hiding Windows when mixing graphical and character Screens. When you are doing a phased conversion of a character based application to a GUI it is often useful to hide the character screen window so that the user cannot click in the character window when control is on a graphical window. If the user does this then the character portion of the application will not response as control is currently in the character screen. Resolution: If the application EXE is built as a "graphical" application or started using the RUNW trigger EXE (int or gnt code) then any character screen are run in the COBOL Text Window. When the COBOL Text Window is used for character screens there is a runtime call PC_WIN_HANDLE that allows you to get the HWND windows handle. This allows you to manipulate the Window using standard Win32 api calls. The ShowWindow api with the SW_HIDE flag can be used to hide the Text window when required and
Problem: How to deploy a Net Express 5.0 Web Service? Deploying a COBOL .NET Web Service and may get an error after deploying the .asmx and the code behind cbl file. This is due to the COBOL compiler not being included in the Server 5.0 runtime install. Just copying the contents of the project to the deployment server server is not enough as it attempts to compile the CBL file. Resolution: To get a COBOL.NET Web Service working on a deployment machine there is a need to perform the following steps:- - Load the Project in Visual Studio - Highlight the COBOL project and use "Build" / "Publish Web Site" from menu - Uncheck the "allow precompiled website to be updateable" option A compiled version of the Web Service will then be built into the same location as the project. This can be copied to the deployment machine and configure IIS for use it as required. There is also the need to setup some permissions in order for the
Problem: Is there a way to clear a record buffer for a file after every WRITE operation? Resolution: FDCLEAR specifies that a record buffer for a file should be cleared after every write operation. FDLCEAR Parameters 1 - Specifies that the record buffer for a file should be cleared after every write operation. The buffer is cleared to the value specified by the DEFAULTBYTE directive. 2 - As for 1, but the record buffer is also cleared after the initial OPEN statement. The FDCLEAR directive is effective while the SELECT clauses are being processed. Use $SET statements before and after each SELECT clause to apply this feature to selected files. Alternatively, use it once before processing any SELECT statements to apply it to all files in a program. The FDCLEAR directive is ignored for files subject to a SAME RECORD AREA clause in the I-O-Control paragraph. Specifying FDCLEAR with no parameter has the same effect as specifying FDCLEAR "1"
Problem: File and Filename Routines: CBL_CHANGE_DIR, CBL_CHECK_FILE_EXIST, CBL_COPY_FILE, CBL_CREATE_DIR, CBL_DELETE_DIR, CBL_DELETE_FILE, CBL_DIR_SCAN_BEGIN, CBL_DIR_SCAN_END, CBL_DIR_SCAN_READ, CBL_GET_CURRENT_DIR, CBL_JOIN_FILENAME, CBL_RENAME_FILE, CBL_SPLIT_FILENAME, PC_FIND_DRIVES, PC_PRINT_FILE PC_PRINTER_CLOSE, PC_PRINTER_CONTROL, PC_LOAD_BMP, PC_PRINTER_OPEN, PC_PRINTER_WRITE, PC_PRINTER_WRITE_BMP, PC_READ_DRIVE, PC_SET_DRIVE Example: 01 infile-name pic x(20) value '%TMP%/infile'. 01 outfile-name pic x(20) value '%TMP%/outfile'. call 'CBL_COPY_FILE' using infile-name outfile-name. Will fail unless a file with the literal name "%TMP%/infile" exists. Likewise for the outfile name. The CBL_ routines use system API calls, not the command shell, to do their work. Only the command shell "knows"
Problem: Working with Net Express 5.0 WrapPack 2, having linked an OpenESQL application to executable in 64-bit mode on x86-64 platforms, executing the application returns an RTS114 error. This does not occur in 32-bit mode on x86-64, under 32-bit environments, nor on 64-bit Itanium platforms. This does not occur when working with the GA release of Net Express 5.0 either. Resolution: This issue is resolved in the latest WebSync for Net Express. To workaround this issue with WrapPack 2 installed, there is a must explicitly to link the application with ODBCRW64.LIB. To specify this module if linking from a Net Express command prompt, using cbllink. If building your application from within the Net Express IDE, specifying this module by : From the Project menu item, select Build Settings. Click on the name of your executable, for example myapp.exe. Click the Link tab. From the Category pulldown, select Advanced. Enter odbcrw64.lib into the t
Problem: Determining the EXE to start the program is easy. - The windows explorer can be used to start it. - If an icon on the desktop is uses, its properties give the path - If the command prompt is used, the EXE is in the actual directory, or ... Here the difficulties - or better say for this paragraph "possibilities" - begin: Examining the environment variable PATH will give the answer. If there are two, the first one is used. In the normal world of programs the EXE will not be the only file used by the application. The EXE may - need a COBOL runtime system -- which may need a _COBCONFIG.cfg configuration file - use self programmed DLLs, COBOL INTs and GNTs - start other EXEs, e.g. by CBL_EXEC_PROGRAM - uses DialogSystem screen sets --- which may need an *.ICN file - open user files -- which may need an EXTFH.cfg configuration file ... The strategies to find the files are manifold. Environment variables like PATH, COBDIR, and others, re
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.