Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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 sample demonstrates how to use the TestCover compiler directive and support tools. Resolution: BUILD W/RELEASE: Net Express v4.0 with December 2003 Websync. This demo uses the Net Express DEMO\\LOCKING demo to demonstrate the TestCover utility. For instructions on how to use/run LOCKING demo please the the README file in your Net Express\\BASE\\DEMO\\LOCKING folder. SOURCE FILES: ========= Resource Files: Description ---------------- ----------------------------------------------------------- .\\TCF\\LOCKING.TCF Test Coverage configuration file RunTC.bat BAT command file that will generate the
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 example demonstrates how to create Windows 32-bit .DLLs from a COBOL program which can be called by a Microsoft Visual Basic program. It also demonstrates how and when to use static and dynamic call-conventions and how to link .DLLs to the Net Express file handler MFFH.OBJ. Resolution: BUILD W/RELEASE: 3.1 INTRODUCTION ========== This example demonstrates how to create Windows 32-bit .DLLs from a COBOL program which can be called by a Microsoft Visual Basic program. It also demonstrates how and when to use static and dynamic call-conventions and how to link .DLLs to the Net Express file handler MFFH.OBJ. The project actually consists of a Visual Basic main program called DEMO1.EXE and a number of Net Express generated .DLLs. DEMO1.EXE displays a single form which interacts with the user. The form contains a number of buttons each of which when pressed will load a COBOL.DLL and call an entry
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: 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: 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: 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: 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: 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: 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: Trying to convert in batch a record sequential EBCDIC file to a record sequential ASCII file via >run dfconv xyz.pro gets back immediatly: Execution Error 114: "Attempt to access item beyond bounds of memory (Signal 11)". Net Express doc files do not explain why this happens, so the first meaning is something goes wrong around the size of this file, but no errors occur converting another large 2GB file. Is there an additional hint available to get rid off this problem? Resolution: Yes, to check both the Convert Profile (.pro) also the Record Layout (.str) to ensure that they are related to the data file correctly. In that case the Convert Profile .pro did not fit the data file because the record length used was too long. Old KB# 4381
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 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: 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: 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: How to automate a build of a Visual Studio 2005 project from the command prompt or in a batch file ? Resolution: Visual Studio 2005 has a number of command prompt options. These can be used to automate builds of a Visual Studio Solution. For example:- devenv mycobolsolution.sln /build release or devenv mycobolsolution.sln /build debug to build the project for the relevant release level. Running devenv /? gets a list of all the available options. The above method will work on Visual Studio 2005 but looking at KB 22920 that gives details on how to use MSBUILD. Old KB# 4399
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
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: 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: 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: A table in XDB has a column with the same name as a reserved word (ex: delete) Using a select statement in your COBOL program like: SELECT delete FROM mftest will get a compiler error: COBES0100S Incorrect SQL statement syntax near DELETE Resolution: In the SELECT statement to qualify the column with the table name should resolve this issue: SELECT mftest.delete FROM mftest Esp. using SQLSERVER to enclose the column names in square brackets: SELECT [delete] FROM mftest Old KB# 4379
Problem: PC_PRINTER routines and RAW printing for sending data to electronic mailboxes Resolution: Some multi-function printer/copier/scanners have the ability to store reports in electronic mailboxes. The PC_PRINTER_OPEN routine can be used to display a dialog box that may have options to send to mailboxes, but any embedded PCL (Printer Control Language) code in the print data will not work. Using PCL code/printer escape codes, the RAW print method should be used instead. This method is demonstrated in the printraw demo available at http://supportline.microfocus.com/examplesandutilities/nesamp.asp under the Printing category. Advanced functions such as sending to electronic mailboxes are actually implemented by using PJL (Printer Job Language) instead of PCL, embedding both in the print data is possible. For more information to consult the printer/copier/scanner's documentation for PJL codes because this is a machine-specific environment. O
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.  
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.