Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: How to get a machine's MAC address and IP address in a .NET managed COBOL Application? Resolution: The MAC address of a network card is a unique number that is burned into each card produced. It will always be unique and will not be duplicated on any other network card. V2 of the .NET Framework introduced some new classes in the System.Net.NetworkInformation namespace that allows to get details information on the machines network configuration. An example how to use these classes is attached. The code to get the IP and MAC address is: set IPProps to cIPGlobalProperties::"GetIPGlobalProperties"() set label1::"Text" to string::"Concat"("Machine Name = ",IPProps::"HostName","
Problem: Apartment threaded COM DLLs built with Interface Mapper not linking with multi-threaded runtime. This is an issue in Net Express 4.0 which is resolved in Net Express 5.0. Resolution: Building an apartment threaded COM DLL using the Interface Mapping Toolkit, the DLL will not be linked to use the multi-threaded COBOL runtime. This is a problem if the client program using a COM DLL is not COBOL, in which case the single-threaded runtime may get loaded. It can also be a problem if the COM DLL code calls any other COBOL programs that are linked to use the multi-threaded runtime. To resolve this, there is the need to edit the deploy.mfscript file located in the NetExpress\\base\\bin directory. Scroll to the bottom of this file where to see <package name="createdll" extension="dll">. Below that, seeing <preoption>-Re</preoption> which can be changed to <preoption>-Rm</preoption>. Save the file and
Problem: Trying to run a batch file from within a Net Express project. In this example, the batch file contains calls to mfsort. From the command line this all works fine but this does not work from within the IDE. Resolution: Not able to run a bat file directly from a project but there is a possibility to add it as a tool. For example: 1. Click on the Options menu/Customize IDE/Tools 2. Click on "New Tool" and type in a name for the tool, e.g. MFSORT 3. In the "command" field type in the path and name of the bat file, e.g. C:\\tools\\mfsort.bat 4. Click OK to save and then select "Tools" from the IDE menu. 5. Find MFSORT and click on it and the bat file should run. Old KB# 4372
Problem: When compiling a program using Cobsql and the Oracle COBOL precompiler, Pro*COBOL, and the length of the current working directory is over 256 characters, the following error may be returned : * Micro Focus COBSQL Integrated Preprocessor * Net Express Version X.Y * URN AAAPA/ZZ0/00041 * CSQL-I-018: Invoking ORACLE Precompiler/Translator The system cannot find the path specified. * CSQL-F-021: Precompiler did not complete -- Terminating Resolution: The messages contained in that compiler output usually occur due to the length of the path to the current working directory, which causes the command line passed to Pro*COBOL to be too long. The command line should be less than 256 characters. Please make sure to compile (or pre-compile) programs from a shorter directory structure. Old KB# 4371
Problem: The following error occurs on each compile/rebuild: Error opening trace configuration file 'c:\\logs\\ctfesjcl.cfg' How to make it to stop looking for that cfg file? Resolution: The trace configuration file is searched when the MFTRACE_CONFIG environment variable is set. Make sure the file and location exists or remove the environment variable. Old KB# 4377
Problem: Makes use of the WebSync Library Manager AddPack. It has most of the functionality of the old function key version of the library manager, but with a Windows interface (Dialog System). Resolution: BUILD W/RELEASE: Tested with Net Express 3.0 and 3.1 INTRODUCTION ========== This application is limited to working with library entries that are no longer than 35 characters in length. Use the "Load" choice to view library entries in the listbox of the application. Use the "List" choice to create a text file of the contents of a library. A backup copy of the library will be created on load of a libray file if the "create library backup" option is checked in the program settings (options menu). SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- libman.cbl
Problem: Release: 4.0 How to write XML with repeating elements? Resolution: This article shows how to create an XML file/document that has a repeating element, one that has the maxOccurs="unbounded" attribute. The following is based on the excerpt below from an XML schema file that describes Weather Forecasts. It has 2 main elements, WeatherForecastHeader and WeatherForecast which each have some child elements. In this article you'll also see the word node mentioned to refer to an element. The WeatherForecastHeader occurs only once, but the element named "WeatherForecast" can repeat any number of times as suggested by the attribute maxOccurs="unbounded". <xs:element name="WeatherForecasts"> <xs:complexType> <xs:sequence> <xs:element name="WeatherForecastHeader" maxOccurs="
Problem: Example of Net Express working with MQSeries Resolution: 1). IBM MQSeries client or server Developers Toolkit must be installed on the machine that will build the application. This creates a "tools" directory below the directory that you installed IBM MQSeries, with a sub directory called "lib". The "lib" directory will contain the link file needed for execution on a server machine; mqmcb32.lib or for a client machine; mqiccb32.lib. 2). For simplicity I have added the directives in the beginning of the program as $SET statements. The LITLINK directive is used to resolve the literal at like time as public symbols. 3). The linking of an EXE will require the correct link library for IBM MQSeries installed on the machine that will run the program. IBM MQSeries Client machine requires "mqiccb32.lib" added to the Advance Category of the Build Settings L
Problem: Form Designer fails to start in Net Express 3.1, 4.0, and 5.0, and displays the following error message: ----- Form Designer requires Microsoft Internet Explorer 4.01 or greater to be installed on this system. See Installation Notes for more details. Form Designer cannot continue. ----- The following error message occurs after clicking the OK button: ----- Mfnetx.exe - COBOL Text Window Execution error: file 'formdctl' error code: 240, pc=0, call=1, seg=0 240 Object reference not valid ----- Resolution: The November 2006 update of Microsoft suggested to upgrade Microsoft Internet Explorer (IE) to v7.0. This issue has been fixed in WrapPack 3 (WS3) for Net Express 5.0, and there is no fix for this for Net Express 3.1 and 4.0. The alternative for Net Express 3.1 and 4.0 is to uninstall IE7 and install IE6 instead. Old KB# 4373
Problem: Assuming that code such as:- 01 ws-data pic x(20) value spaces. .... MOVE "HELLO WORLD" TO WS-DATA The value at initialization will be something like "Y?a¤Y?a¤Y?a¤Y?a¤" and after the move statement ws-data will contain something like "Hello WorldY?a¤Y?a¤", seems to have included incorrect values. Resolution: This issue only occurs when the code is executed on a Virtual PC 2004 or Virtual Server 2005 virtual machine image. Microsoft have been made aware of this problem and it will be fixed in Virtual PC 2007 and Virtual Server 2007. The problem is caused by Virtual PC not correctly handling some MMX Intel Chip instructions that get generated by the .Net Common Language Runtime JIT Compiler. Please note this only affects Net Express Version 5 COBOL .Net based application. Net Express unmanaged application an
Problem: This demo shows how to write a VB.NET program to interact with and pass parameters to an unmanaged (procedural) Cobol program. It is different from the way a VB program calls a Cobol program. To find out what is new and different in VB .NET, here is a link to an interesting article: http://www.ondotnet.com/pub/a/dotnet/excerpt/vbnetnut_appa/index.html Resolution: BUILD W/RELEASE: NetExpress v4.0 & Microsoft VB .NET 2003 INTRODUCTION ========== The issues that will be addressed in the demo are the way to pass an integer, a string, and a structure. First, the integer now takes 4 bytes in VB .NET (2 bytes in VB), so it has to be defined as pic x(4) comp-5 in Cobol. Secondly, there is no fixed-length string in VB. NET. In VB, it was possible to define it as follows: MyPicX3 string * 3 One way to emulate the above in VB .NET would be to define a string and pad it with spaces to reserve the size to be
Problem: Coding a DECLARATIVE section within a COBOL program. Resolution: A useful feature of the COBOL language is the DECLARATIVE section. This section can be used to handle I/O errors when they occur rather than checking the status code after each I/O statement. The following source sample illustrates how to code a DECLARATIVE. select testfile assign "testfile.dat" organization line sequential. fd testfile. 01 tf-record pic x(80). procedure division. declaratives.  
Problem: A graphical C Interface calling COBOL entry points with different formats Integer, Float, Double, Short, String.. Resolution: BUILD W/RELEASE: NetExpress v3.1 (tested with fixpacks as of 08/2001) ============ Microsoft Visual C v6.0 SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- Cobdll.APP Net Express project file to create the COBOL DLL Cobdll.CBL COBOL source code of the COBOL DLL mfguic.C C source code Mfguic.DSP C project file Mfguic.DSW C project workspace \\DEBUG\\MFGUIC.EXE C executable Copy Files: --------------
Problem: C and COBOL, 32bit, mixed language application interface examples Resolution: C calling COBOL ------------------- The COBOL program must be completed first to provide an import library needed to complete the C program. Use the CASE compiler directive. This will preserve the mixed case function names. Specify call-convention 74. This is a Windows 95/NT Standard call. It corresponds to APIENTRY. A call-convention specified in the procedure division header applies equally to each entry statement in the procedure division. C integer items are 32bits, pic xxxx usage comp-5. C character strings are null terminated, z'STRING' or 'STRING' & x'00'. Numeric values, integers and longs, are passed/received by value. Character strings and records (structures) are passed/received by reference. Compile and link the COBOL program from the command line as follows: cbllink -v -k -l -d -FS C2CBLDLL.CBL The -v switch i
Problem: Demonstrates the use of the .NET Platform Invoke functionality in order to use the COBOL CALL statement to call entry points and functions within unmanaged Windows dynamic Link Libraries created with Net Express 4.0, Microsoft Visual C/C 6.0 and also to call Windows system API functions. This program also demonstrates the use of the new .NET COBOL structured exception handling syntax to catch run-time exceptions and also shows how to create and use a user-defined exception class. Resolution: BUILD W/RELEASE: Net Express 4.0 with .NET add-on installed. The 'CallUnmanagedDll.zip' file actually contains three different projects which can all be extracted into a single folder on your hard disk. You can create a folder such as 'C:\\CallUnmanagedDll' into which you can extract the entire contents of the zip file, including the subfolder structures '.\\bin\\debug' and '.obj\\debug'. The main source program withi
Problem: This demo shows how you can use ActiveX Data Objects (ADO) from a Net Express application. For more information on the Methods/Properties and events being used here please see the Microsoft Platform SDK documentation:- http://msdn.microsoft.com/library Resolution: BUILD W/RELEASE: Net Express V3.1 and MDAC 2.5. In order to use this demo you need to have the Microsoft Data Access componants (MDAC) installed. This is available for download at http://www.microsoft.com/data/ This demo has been written and tested using Net Express V3.1 SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- ADOData Main ADO Sample Code A DOEvents ADO COM Event
Problem: Is it possible to create Adobe PDF files from COBOL? Resolution: COBOL does not have any specific support for creating PDF files. However, using the PC_PRINT functions under Windows there is a possibility to utilise a PDF print driver. There are a number available including the one from Adobe. When installed, these simply offer PDF as one of the "Printers". The COBOL program can select this and generate a PDF file from the printed output. One such driver can be located at: http://www.pdfcreator.de.vu/ Micro Focus is not recommending the above and has not tested the driver with its products. We have no association with the creator of the driver and no warranty is expressed or implied. Old KB# 4369
Problem: This is a "Mixed Language" 'C' and COBOL project. It was created using NetExpress version 3.1 and Microsoft Visual Studio version 4. It has been tested with Microsoft Visual Studio C/C version 6. The project illustrates how you can incorporate editing, compiling and building 'C' source programs together with COBOL source programs within a common project Resolution: SOURCE FILES: ========== Program Files Description --------------------- --------------------------------------------------------- CNCBLFH.C The initial program of this example. This program displays a couple of messages to the console &
Problem: Release:4.0 Redirecting output from the Generate Client using WSDL feature This method was tested with Net Express 4.0 with All Websync WrapPack v4.0.008. Resolution: The Generate Client using WSDL option from the Service menu of the Net Express IDE will create a Web Service client program, proxy program, and copyfile, but it will place them in the project directory. To want to place these files in different locations, it may be better to use the imtkmake command line utility to do the job. The idea here is to create a batch file with the commands necessary to generate the files and move them to the locations where to have them to be. It can add this batch file as a Tool to the IDE (Integrated Development Environment). As an example, the project directory is C:\\MyProject and there is a CBL subdirectory for source code, a CPY subdirectory for copyfiles, and a WSDL subdirectory for any .wsdl files, to place the appropriate files in those directorie
Problem: This demo demonstrate how to use the PROFILER utility. Resolution: BUILD W/RELEASE: Net Express v3.1 with fixpacks as of 05/2002 SOURCE FILES: ========== Using the Net Express supplied BEVERAGE HTML demo. REQUIREMENTS: ========== OPERATION: ======== To use the PROFILER utility you need to add the PROFILE compile directive. In this case the directive was added to the Project/Properties directive box. Step 1: Rebuild and run the sample. Step 2: After the completion of the program a file with the extension IPF will be found under the DEBUG directory. To generate the PROFILER report start a Net Express Command Prompt and run the supplied BAT file called PROFILERSAMPLE.BAT. After the completion of Step 2 a new file will be generated under the DEBUG directory with a PRF extension, in this case BEV_H.PRF. This is the report file generated by the PROFILER utility. NOTE: ==== For more details
Problem: Release: Net Express 5.0 Consuming from a jsp and a Servlet, deployed on TOMCAT 5.0.28, a Java Bean generated by MF Interface Mapping Toolkit (IMTK) which, thru J2SE, invokes a Service deployed on Micro Focus Enterprise Server Resolution: ============================================ The step of Micro Focus Knowledge Base article 23173 was about consuming a bean generated by Micro Focus Interface Mapping Toolkit by a sample JAVA client launched under a JVM ( ie: java client ), this Bean generated by MF Interface Mapping invoking thru J2SE a Service deployed on Micro Focus Enterprise Server. KB 23173 Sample JAVA J2SE sample which invokes a service deployed on MF Enterprise Server http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=23173 ============================================ The present STEP is about consuming the Bean above generated by
Problem: This project is intended to demonstate how Delphi can be used to call Net Express COBOL Modules. There is an Inprise DELPHI project PROJECT1 which has the Delphi source code included. Please note that it not possible to debug both the Delphi and COBOL components within the same process. Resolution: Attachments: delphi.zip Old KB# 4342
Problem: This demo shows how to generate and animate a dump file using the CBLCORE utility See also KB article 23217 for details of doing this using the core_on_error runtime tunable. Resolution: BUILD W/RELEASE: Net Express v4.0 including ALL03N40 WrapPack. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- CBLCORE.CBL Test program that will cause a runtime 114 error Resource Files: ---------------- ----------------------------------------------------------- DOIT.BAT Bat file OPERATION: ======== From a NetExpress Command Prompt execute the included BAT file, doit.bat. This bat file compile for animation and link the test program then it will execute the CBLC
Problem: This demo shows how to generate and animate a dump file using the core_on_error runtime tunable. See also KB article 23215 for details of doing this using the CBLCORE utility. Resolution: BUILD W/RELEASE: Express v4.0 including ALL03N40 WrapPack. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- CBLCORE.CBL Test program that will cause a runtime 114 error Resource Files: --------------------------- ----------------------------------------------------------- COREONERROR.CFG Runtime tunable file DOIT.BAT Bat file OPERATION: ======== From a Net Express Command Prompt execute the included BAT file, doit.bat. This bat file compile for animation and link the test program then it will set the COBCONFIG_ environment  
Problem: Release 5.0 .NET: Kann Net Express 5.0 .NET mit der deutschen Version von VS2005 installiert werden? Resolution: Ja, das funktioniert. Bitte beachten Sie: Dieser Hinweis gilt nicht für die Visual Studio 2005 Express Edition. Old KB# 4370
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.