Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: It is generally considered good practice in COBOL to use explicit scope termination statements such as END-IF and END-EVALUATE. Resolution: Using the IMPLICTSCOPE directive to accomplish this. The program:- $set NOIMPLICITSCOPE WARNING(3) working-storage section. 01 ws-data pic x(10). procedure division. start-section section. evaluate true when ws-data = "hhh" continue
Problem: Using UNC path from the CMD did not work Resolution: Microsoft's command line is not able to handle UNC pathes, i.e. \\\\server\\resource\\program when called from a program. The message occurs "\\\\server\\resource\\project\\program CMD.EXE starts with this path. UNC-Pathes are not supported. Using the Standard Windows Path." Solution is to map the remote drive by using 'net use'. Old KB# 4341
Problem: Having more than one program to build into a .NET executable from the command line. For example: Considering about having 3 programs - proga.cbl, progb.cbl, and progc.cbl to be able to rebuild them from the Net Express command line so that proga.cbl will become the main.exe and progb.cbl and progc.cbl become components of the proga.exe. Resolution: To achieve this by making use of ILSOURCE - to use the following command line from a Net Express command prompt as a template: cobol proga.cbl ILSOURCE (progb.cbl) ILSOURCE (progc.cbl) ILGEN After running this command there will be a proga.exe, and opening a Visual Studio command prompt and to change directory to the location of the proga.exe and running the command ILDASM proga.exe will show the components and programs that make up the proga.exe. Old KB# 4402
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: MFSupportInfo - Utility program to gather up workstation and products information. Resolution: Attachments: MFSupportInfo.zip Old KB# 4365
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: 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: 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: 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 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: When generating a client in the Interface Mapping toolkit an error was displayed about a missing assembly MicroFocus.COBOL.CodeDom. The error occured in Net Express V5. Resolution: Checking the Global Assembly Cache (c:\\windows\\assemblies) the file was indeed missing. The issue was resolved by opening Add/Remove programs and highlighting Net Express. You can then click on the Support link and REPAIR the install. Old KB# 4378
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: 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: When trying to remote debug for UNIX from Net Express4.0, at first there is a message "Connecting to the remote machine means that you can view and edit breakpoints" but it appears that actually edit breakpoints cannot be edited. Why is that? Resolution: Problem is that there is the need to have the .idy files locally available to Net Express. If there is no idy at Net Express project, the remote animator can run, but won't give back the option to edit breakpoints. Old KB# 4387
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: 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: How to code a COPY REPLACING statement? Resolution: This is a useful and widely exploited feature within COBOL. However, the syntax can often cause problems and it is hoped the following will give some much needed clarification. The attached demo illustrates one particular use for COPY REPLACING -- the reuse of a file status copybook. If we look at the FSTAT-WS.CPY we see: 01 (tag)-fstat. 03 (tag)-fs-values. 05 (tag)-fs-key1 pic x(1). 05 (tag)-fs-key2 pic x(1). &nbs
Problem: This is the easiest and quickest way to animate a DB2 stored procedure with UDB 8.1 with latest fixes or a later version of UDB. This assumes that the Net Express development environment is installed on the UDB server machine. Resolution: The procedure for animating a COBOL Stored proedure is as follows:- 1. put a call to CBL_DEBUGBREAK within in your stored procedure program 2. compile the stored procedure and create it as a dll 3. link the stored procedure with db2api.lib 4. make sure the stored procedure dll is linked as shared , dynamic and includes the system files 5. copy dll to IBM's sqllib\\function subdirectory 6. run the stored procedure from IBM's development center and enter necessary parameters 7. when the dialog box appears that indicates the RTS has encountered a call to CBL_DEBUGBREAK , do you want to debug - answer yes 8. the stored procedure should pop up in animator, ready for animating Note: R
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: Can a 64-bit program call a 32-bit program or vice versa? Resolution: It is not possible for 64-bit to call 32-bit or vice versa. The documentations also state: -------------------------------------------------------------------------------- The Compiler directive P64 enables you to create a program that can be run on Micro Focus Server in 64-bit mode. If you do not use the P64 directive when you compile your program, the program can only be run on Micro Focus Server in 32-bit mode. Therefore, if you have developed an application on a 32-bit development system, you must recompile it with the P64 directive set, if you want to migrate it using Micro Focus Server in 64-bit mode. -------------------------------------------------------------------------------- And -------------------------------------------------------------------------------- You cannot port executable code between 32-bit and 64-bit development systems. -----------------------
Problem: Example of how the Java Native Interface can be used to call a Net Express COBOL DLL. Resolution: BUILD W/RELEASE: Net Express v3.1 SP1 or later =========== Net Express v4.0 Sun JDK v1.3.xx INTRODUCTION ========== Example of how the Java Native Interface can be used to call a Net Express COBOL DLL. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- HelloWorldImp.cbl Copy Files: ---------------- ------------------------------------------------
Problem: When trying to use Interface Toolkit Mapping for generating an EJB on Weblogic the following error appeared: Error 500--Internal Server Error java.rmi.RemoteException: EJB Exception: ; nested exception is: java.lang.NoClassDefFoundError: com/microfocus/cobol/connector/cci/CobolInteractionSpec at weblogic.ejb20.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:102) at weblogic.ejb20.internal.BaseEJBHome.handleSystemException(BaseEJBHome.java:296) at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:284) at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:168) at com.mypackage.MapS19D.MapS19DEJB_1ainp9_EOImpl.S190(MapS19DEJB_1ainp9_EOImpl.java:56) at com.mypackage.MapS19D.MapS19DServlet.performTask(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(Unknown Source) at com.mypackage.MapS19D.MapS19DServlet.doPost(Ljavax.servlet.http.HttpServletR
Problem: This demo illustrates how to access multiple databases from a single cobol program. The databases are DB2 and Sql*Server. The concept is to use named connections and the SET CONNECTION statement. At the beginning of your program a connection to each database is established. Each CONNECT statement specifies the AS clause which associates a user-defined name to the database connection. When access to a specific database is required the SET CONNECTION statement is issued specifying the name associated with the desired database. All subsequent SQL will access this database until another SET CONNECTION statement is issued. Resolution: BUILD W/RELEASE: Net Express 3.1 The program will prompt you to enter your db2 datasource name, your db2 userid and password, your sql server datasource name and your sql server userid and password. The format for the userid and password is userid.password. If no password is required than merel
Problem: 105 memory allocation error when invoking internal method of COM class that is passed a pointer Resolution: Be carefull when hand-coding (when not using the method wizard) any methods in a COM class. The reason is invoking the method using the INVOKE SELF syntax from within the COM class itself, the runtime will invoke it as a COM method (as opposed to a non-COM Ojbect COBOL method) and will coerce parameters to COM types. This could especially be a problem passing a pointer as a parameter and the COM runtime coerces it to something else. In this case it is possible to end up getting a 105 (memory allocation) error. It is recommended to use the method wizard when adding COM methods to a class. The wizard will guide in creating parameters with proper types. If there is a need to hand-code any methods that accept non-COM types, then to create a separate Object COBOL class (one that does not inherit from olebase) and to add the methods there. Then, to inst
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.