Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This demo shows how you can communicate to a Java Server program using TCP/IP. Resolution: BUILD W/RELEASE: Net Express 4.0 INTRODUCTION ========== This demo shows how you can communicate to a Java Server program using TCPIP. The client COBOL module uses the JAVA/COBOL support to call a Java module that does the comms to the server java program. SOURCE FILES: ========== Program Files Description --------------------- --------------------------------------------------------- TCPServer.java Java Server program UseJavaSockets.cbl COBOL Client program that calls java. SocketClient.java Java client module that performs the comms with the server. REQUIREMENTS: ========== T
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: 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: When a control is refreshed it can sometimes "flicker" this can be seen if the control repaint itself. This type of effect is dependant on what the control is doing and by no means impacts any controls. It tends to impact controls that paint colours and graphics on the screen. Resolution: To minimise flicker to switch off WM_ERASEBKGND and also to implement double buffering. Both the techniques are covered in the attached demo and article. Attachments: flicker.zip Old KB# 4382
Problem: Release: 5.0 .NET / Visual Studio 2005 How to change the Height and Width of a Form at runtime? In a .Net WinForms application there is a possibility to override the defined form size in the Form_loading event that is triggered when a Form is loaded. Resolution: An example is attached that shows how to do this. The project is Visual Studio 2005/Net Express 5 based. In the code there is the need to create an instance of System.Drawing.Size class and pass this to the Form using code such as:- repository. interface S-ComponentModel-IContainer as "System.ComponentModel.IContainer" class System-Windows-Forms-Form as "System.Windows.Forms.Form" class System-ComponentModel-Container as &q
Problem: Release 4.0: Web service error 605, "Incorrect number of parameters supplied" when calling COBOL Web Service from Tibco General Interface tool. Resolution: The Tibco General Interface tool may create a SOAP request with a tag <SOAP-ENV:Body> which should actually be <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> in order to properly identify the SOAP request as rpc/encoded. Net Express 4.0 Enterprise Server uses the encodingStyle attribute to differentiate between rpc/encoded and document/literal SOAP requests, but with the missing attribute, it thinks this is doc/literal which is not supported for Net Express 4.0 Web Services under Enterprise Server, and issues the 605 error. You can test this by changing the SOAP request coming out of the Tibco tool so that this attribute exists as stated above. Net Express 5.0 Web Services can be rpc/encoded or document/literal and
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: How to delete an entry from the registry in .NET COBOL? What classes to be used to access and delete information in the Windows registry from a COBOL .NET application? Resolution: There are classes for manipulation of Registry information in the Microsoft.Win32 namespace. Some example code that uses these classes to insert and remove information in the Registry is: $set sourceformat"variable" program-id. RegDemo as "RegDemo.RegDemo". environment division. configuration section. repository. class cRegistry as "Microsoft.Win32.Registry" class cRegistryValueType as "Microsof
Problem: This demo demonstrate how to use the FAULTFINDER production debugging utility. FaultFinder is an aid to debugging production applications. Resolution: BUILD W/RELEASE: Net Express v3.1 with fixpacks as of 05/2002 SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- faultfind.cbl Resource Files: ---------------- ----------------------------------------------------------- faultfind.cfg Configuration file used to setup FAULTFINDER REQUIREMENTS: ========== Simply do a Rebuild All in the project. OPERATION: ======== 1) From a Command Prompt go to the RELEASE of the project and set the COBCONFIG_ environment variable to; SET COBCONFIG_=FAULTFIND.CFG 2) Run the sample program
Problem: Release: 5.0 Error: Runtime Error! Program: ...am Files\\Micro Focus\\Net Express 5.0\\Base\\Bin\\MFNETX.exe abnormal program termination Resolution: Registry entries that are being "marked" as invalid by the Norton One Button Checkup utility are the ones that are made when the Micro Focus OCX files are registered as part of the installation process. These are the files that are located in C:\\Program Files\\Common Files\\Micro Focus. So the likely short-term solution would be to manually register the OCX files again. For example; Open a command prompt Go to C:\\Program Files\\Common Files\\Micro Focus Run this command REGSRV32 valueedit.ocx And so on for every ocx file in that directory. Also, there is a choice NOT to repair these supposed errors. So after re-registering the OCX files should abstain from getting &qu
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: This technical bulletin is meant as reference material in helping you provide us the necessary information required before contacting the Micro Focus SupportLine group. Resolution: See attachement. Attachments: HowtosubmitaNetExpressSupportProblem.zip Old KB# 4363
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: 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: Utility, written in C, which allows you to test your printer (independent of COBOL). You will need to modify the C code, so a C compiler is required to use it. Resolution: INTRODUCTION ========== Example of how to do a printer driver check using a non-cobol program. REQUIREMENTS ========== C Compiler OPERATION: ======== Edit the C source, printercheck.c Use the example by modifying the line below to your printer name: char name[] = "PrinterName"; Example: printer name is: \\\\prodsup2\\hp340_5s. This would be coded as: char name[] = "\\\\\\\\prodsup2\\\\hp340_5s";. Attachments: printercheck.zip Old KB# 4366
Problem: Release 5.0 .NET: The following statement compiles well even the STRING definition has no length specified. This form is very useful but it is not reflected in the documentation. EXEC ADO DECLARE MYTABLE DATATABLE ( COL1 INT16 NOT NULL, COL2 STRING NOT NULL, COL3 INT16, CONSTRAINT PK_MYTABLE PRIMARY KEY(COL1)) END-EXEC. What are the impacts on using this form? Resolution:
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: 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: This zip files contains the reviewed demos that are provided with the Cobol and .NET - Using Micro Focus Net Express with .NET from Will Price. These revised demos are made to work with Net Express v4.0 and Net Express with .NET including the installation of WrapPack ALL05N40. Resolution: ========================================================== Keywords: Example, sample, demo, demonstration, .NET, cobolanddotnetprojects.zip demo.ex demo.ne Attachments: cobolanddotnetprojects.zip Old KB# 4355
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: This problem applies to Net Express 4.0. Resolution: Using XML PARSE and encountering xml-code 200, there is the need to apply All Websync WrapPack v4.0.007 (all07n40.exe) or higher. XML PARSE was returning the wrong xml-code for miscellaneous XML document parsing errors. It should have been returning xml-code 201. Old KB# 4392
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: Using the ASP.NET Website Admin Tool and the Login Control Resolution: ASP.NET 2.0 provides a website admin tool that allows you to view and manage your websites configuration. The attached .zip file contains a WORD document (ASP.NET_Website_Config.doc), which has step by step instructions for using the Website Admin Tool to create and manage users, roles, and access permissions. For more information on this tool take a look at the following link: http://msdn2.microsoft.com/en-us/library/ms228053.aspx Also included in the .zip file is a demo website, Login, which uses the Login control that is new to ASP.NET 2.0. The demo also uses the HttpContext class to get the name of the user for the current HTTP request. For more information on this class take a look at the following link: http://msdn2.microsoft.com/en-us/library/system.web.httpcontext.aspx Attachments: Website_Config_and_Login.zip
Problem: CreateProcess Windows API does not start a Process. The CreateProcess was being used to start an EXE. However this was returning the value 0. A zero from the API denotes failure to start the process. How can you find out why the process could not be started ? Resolution: The CreateProcess API will return 0 when it does not start a process. However if you get an error (zero) retrurned you can call the GetLastError API to retrieve more infomation. Code such as: 01 ws-retval DWORD. call winapi "GetLastError" retrurning ws-retval will allow you retieve the reason for the error. In the case if the customer problem a 2 was returned from GetLastError. A return code of 2 is:- "The system cannot find the file specified." This was caused because the EXE that had to be run was not on the PATH. Windows will search down PATH for EXE file. Ensurin
Problem: There may be times when you need to coordinate work between multiple instances of a process that are sharing a resource. One process will use the resource while another waits for access to that same resource. To do this, you can use the CreateMutex and WaitForSingleObject Win32 API functions. Resolution: We can use the CreateMutex Win32 API function to protect a shared resource from simultaneous access by multiple processes. Each process must wait for ownership of the mutex before it can execute the code that accesses the shared resource. See the comments in the source files of the attached demo for details. Additional details of these functions can be found at http://msdn.microsoft.com/library/ Attachments: Mutex.zip Old KB# 4289
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.