Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Release 4.0 With SP2 for Server Express the treatment of VALUE clauses in the FILE SECTION has changed. Before it was used during program start up to initialize the data items with the desired values (line in WORKING-STORAGE), now it is ignored. Because this behaviour is documented, it cannot considered to be a bug. Questions: Is it possible to get the old behaviour back (maybe by a compiler option)? Or what else solution can you provide to make our old programs run as before? Example: 000100 IDENTIFICATION DIVISION. 000200 PROGRAM-ID. A. 000300 ENVIRONMENT DIVISION. 000400 INPUT-OUTPUT SECTION. 000500 FILE-CONTROL. 000600 SELECT FQS001 ASSIGN TO XX 000700 ORGANIZATION IS LINE SEQUENTIAL. 000800 DATA DIVISION. 000900 FILE SECTION. 001000 FD FQS001. 001100 01 RQS001 PIC X(80)&nb
Problem: This particular may be encountered when running programs after having migrated from OCDS 4.1.30 to OCDS 4.1.40 or 4.2 or to any version of Server Express. Resolution: The error "libfhutil.so.2.0: open failed" is normally due to the fact that this library file, used in the old file handling utility (fhutils) was dropped in OCDS 4.1.40 and support for it was removed in all successive versions of the product and all versions of Server Express. It was replaced by the Rebuild utility which carries out the same functions (and more) with better performances and the ability to handle larger files. Having being replace with the Rebuild utility, it will therefore be necessary to recompile / relink all the object and executable files. Further information pertaining to the old file handling utility and the necessary steps to migrate to the new Rebuild utility can be found In the online manuals "Programmer's Guide to File Handling" and "Migrati
Problem: Deploying an application created with Net Express and running on Application Server for Net Express may sometimes result in a Dynamically Bound RTS Error. NOTE: View the Adobe Acrobat .PDF form of this document via the attachment link at the bottom of this document for the complete document, which includes graphic screen shots of the error message being referred to. Resolution: There are three possible situations that can cause this error to occur: " The first, and most likely, cause of this error is a difference between the Fix Pack levels between the Net Express and Application Server for Net Express packages. The correction for this situation is to insure that both are on similar Fix Pack levels. " The second cause for this error message could be that both products have the correct Fix Pack levels, but there's a problem with the environment settings. i.e.: the Path is set to point to an older or newer version of a CBL
Problem: This Demo reads in the binary data of a .jpg and then writes it to a database 8KB at a time. The .jpg is stored in the database as an Image field. It then reads this Image field 8KB at a time into a memory buffer and then writes it to a file on disk and then opens the file. Resolution: INTRODUCTION ========== This Demo reads in the binary data of a .jpg and then writes it to a database 8KB at a time. The .jpg is stored in the database as an Image field. It then reads this Image field 8KB at a time into a memory buffer and then writes it to a file on disk and then opens the file. SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------------------- BlobDemo.cbl Copy Files: -------------------- -------------------------
Problem: In a .NET Cobol program which creates and prints a Word document, how do I set the ActivePrinter property from within the Cobol program to select the printer I require? Resolution: You can use the OLE Object, e.g. a Word document, to set the printer settings. Have a look at the attached demo for how to get the name of the default printer using the ActivePrinter property. The commented out lines in the code will change the printer name. Attachments: test1_1403.zip Old KB# 4056
Problem: The example project MSMQLE works fine in NET Express but transfering it to a Visual Studio project it does not compile. Are there any instructions for doing this or is there a .NET example of using MSMQ available? Resolution: The MSMQOLE demo will not compile in Visual Studio as it consists of calls to unmanaged code -- the win32 APIs and the MSMQ objects, for instance. In .NET, you would add a reference to the managed System.Messaging .NET object. Please see the attached demo, which simply sends a message to a Private queue called 'MSMQTest'. If you change the 'QueuePathName' in the MSMQTEST.CBL source file in the MSMQOLE demo to have this 'MSMQTest' private queue receiving the messages, you can run the demo as a receiver and the message from the .NET sample will be displayed in the output window of the MSMQOLE demo. Otherwise it will be there in the Queue messages for the 'MSMQTest' pr
Problem: You might want to hide or make invisible a control (e.g. input field) in a HTML form based on some values or events. Resolution: The best way to do this is to use JavaScript, a programming language that is common on Web pages. You can have JavaScript to determine when to hide a field. Although you can do many things with JavaScript, it would require you to know about HTML codes as well. The following JavaScript makes input2 invisible when the onclick_func function is executed and the value of input1 is "fano": function onclick_func() { if (document.form1.input1.value == "fano") document.form1.input2.style.display = 'none' } There are so many references of JavaScript on the Internet, and you will be able to find ways to enhance interaction with your web pages. Old KB# 4053
Problem: According to the documentation, a fileshare server can be run as a background task using the following command line: fs >server-1.log 2>&1 & However after running this command, the following is displayed on the command line: [1] Stopped fs >server-1.log 2>&1 and an rts32 process is left running while can only be terminated with a kill -9 Resolution: Problem here seems to be that the fileshare password file needs to be available when starting the server as a background task. This is normally configured in the fs.cfg file, however this file does not seem to get automatically picked-up when starting the server as a background task. The following command lines will correctly start the server in background mode: 1. fs < fs.cfg >server-1.log 2>&1 & 2. fs -s
Problem: Cob command - quotes and spaces Resolution: cob is a command run under Unix, just as grep and sed are. Unix command lines are processed by the shell. The shell expands all wildcards, environment variables, and does all word and field splitting before cob sees the command line. In addition, cob tries to follow general Unix convention on command lines where possible. Before proceeding further, we will define a cob flag such as -C and -N as an option flag, and the string that follows an option flag as an option parameter. As noted in the Server Express documentation an option parameter must either be a string containing no spaces, or an arbitrary string enclosed in quotes. Unless environment variable expansion is required, single quotes are preferred. These quotes are removed by the shell but the option parameter is passed to cob as a unit, so cob knows the entire string consists of checker/ncg options. Some examples may help. &nb
Problem: If a calling program calls a program without passing all parameters defined in Linkage section (of called program), then the runtime system may fail with runtime error 114. This will happen when the called program references any LINKAGE SECTION field that has not received a parameter. For example, the following is code in the calling program: CALL "SUBPROG" USING WS-AREA  
Problem: This example demonstrates how an output file can be redirected to the Win32 Print Spooler using the printer_redirection tunable. Resolution: INTRODUCTION ========== This example demonstrates how an output file can be redirected to the Win32 Print Spooler using the printer_redirection tunable. SOURCE FILES: ========= Program Files Description ---------------------- ----------------------------------------------------------- PRTTUNE.CBL Resource Files: ---------------------- ----------------------------------------------------------- COBCONFIG.CFG REQUIREMENTS: ========== A default printer must be defined and available OPERATION: ======== Simply rebuild and run the Project NOTE: ==== To see how the printer_redirection is set you can look at the file called cobconfig.cfg. The cobconfig.cfg i
Problem: Installing Application Server with .net 4.0, getting internal error 2908 when trying to apply SRN90N40.exe Net Express with .net fixpack. Resolution: install .net sdk framework 1.1, then apply the SRN90N40.exe Old KB# 4104
Problem: Is this working correctly WS-UNSIGNED PIC 9(15) COMP-5 VALUE ZERO. WS-SIGNED PIC S9(15) COMP-5 VALUE ZERO. WS-BYTES PIC X(20) VALUE '-1380985813' MOVE FUNCTION NUMVAL(WS-BYTES) TO WS-UNSIGNED MOVE FUNCTION NUMVAL(WS-BYTES) TO WS-SIGNED After the above operation was performed: WS-UNSIGNED = 2057592656942123 WS-SIGNED = -0000001380985813 Can this be explained? Resolution: The explanation has to do with the definition of the compiler directive comp-5. COMP-5 compiler directive by default is set to COMP-5"2" COMP-5(2) says that negative numbers are stored in an unsigned COMP-5 item in 2's complement form. This is exactly what is happening. If you want the sign preserved then you need to store the value in a signed data item.
Problem: This set of samples is meant as an introduction for the PC_PRINTER library calls Resolution: INTRODUCTION ============ This set of samples is meant as an introduction for the PC_PRINTER library calls. This demo contains 4 separate samples; PCPrinterIntro - This sample is an introduction to the following PC_Printer calls; PC_PRINTER_OPEN PC_PRINTER_INFO PC_PRINTER_SET_FONT PC_PRINTER_CONTROL PC_PRINTER_WRITE PC_PRINTER_LOAD_BMP PC_PRINTER_WRITE_BMP  
Problem: Error occurs when creating an executable linked with Oracle 9.x compile using Server Express 4.0 on HP/UX 11.11 platform Precompiling xxx005u.pco cob -C IBMCOMP -C NESTCALL -t -x -o xxx005u xxx005u.cob -L/oracle/product/920/lib/ /oracle/product/920/precomp/lib/cobsqlintf.o -lclntsh 'cat /oracle/product/920/lib/ldflags' 'cat/oracle/product/920/lib/sysliblist' -lm -lpthread -lpthread* Ignored - NESTCALL cob64: invalid symbol __iob in sidefile /opt/microfocus/cobol/lib/cobisym *** Error exit code 1 Stop. RXCPR/AAD:9i.T4.40.04 PTI=SP2 Resolution: The error is the result of mismatched definition of environment variables for Server Express 4.0 COBDIR=/opt/microfocus/cobol - the default for Server Express 4.0 PATH set to include the bin directory of an earlier version of Server Express d
Problem: This example program demonstrates the use of the Net Express call-by-name library routine PC_PRINTER_WRITE. It will read the line sequential file PRNTRECS.DAT and output the records one at a time to the default system printer. This program also demonstrates the use of variable length line sequential files defined with the RECORD IS VARYING IN SIZE clause. Resolution: INTRODUCTION =========== This example program demonstrates the use of the Net Express call-by-name library routine PC_PRINTER_WRITE. It will read the line sequential file PRNTRECS.DAT and output the records one at a time to the default system printer. This program also demonstrates the use of variable length line sequential files defined with the RECORD IS VARYING IN SIZE clause. SOURCE FILES: ========== Program Files Description -------------------- -----------------------------------
Problem: Memory management is enabled by default since WrapPack all05n40.exe and might highlight memory problems in existing applications causing them to fail with the new run-time error 252. Resolution: memory_strategy Sets a memory management strategy. Syntax: >>-----set memory_strategy=---strategy-specification------>< Parameters: strategy-specification A numeric value representing one or more of the following flags (see Comments for information about valid combinations): Value Meaning 0x00000001 Check bytes strategy: prepend and append check bytes to each memory allocation 0x00000002 Check freed memory strategy: monitor for subsequent corruption the last n memory blocks freed, where n is the current value set using the memory_free_check_size run-time tunable 0x00000004 Reuse strategy: allow freed memory being monitored for corruption to be used to satisfy allocation requests 0x40000000 Compatibility strategy: maintain
Problem: Example of how to use the PC_PRINT_FILE Net Express call-by-name routine Resolution: INTRODUCTION ========== This example program demonstrates the use of the Net Express call-by-name library routine PC_PRINT_FILE. This routine will print a file allowing the user to optionally select a printer and font that will be used for printing the document. PC_PRINT_FILE uses the same parameters as PC_PRINTER_OPEN so we use the same copybook definitions. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- PRNTFILE.CBL Source program that makes a call to PC_PRINT_FILE. It will display a printer &nbs
Problem: It is sometimes desirable to have a program run at the privilege level of a user other than that of the user who starts the program. A classic example is an operator who is responsible for running backups. The operator should not be allowed root privileges, but the backup program itself must have global read access in order to do its job. There is a combination of flags for the chmod command which will cause an executable file to run as another user (see "man chmod"). However, doing this to a Cobol program causes a failure to load runtime system components (.so files) and the program terminates very shortly after the startup attempt. Resolution: Due to security concerns and operating system limitations, this is not recommended and is unsupported for Cobol programs. Old KB# 4110
Problem: If you receive the following error when trying to run an executable on a machine running Application Server for Net Express 4.0: Dynamically Bound RTS Runtime DLL 'CBLRTSS', version 4.0, entry point CBL_CTF_TRACER_GET not recorded in registry, not found or incompatible with requirements of dynamically bound COBOL program. Dynamic binding of RTS requires: Any Runtime DLL, at least Version 4.0 Resolution: One likely cause of this error is the version of Application Server you are running. This Knowledge Base article was raised from an Incident where the Websync WrapPack all07n40.exe had been applied to Net Express 4.0 on the development machine. The executable was rebuilt on that machine and ported to the machine running Application Server for Net Express. However, the equivalent Application Server Service Pack, aps09a40.exe, had not been applied to the Application Server environment. Also, we noted during testing that in one instanc
Problem: This program demonstrates the use of the Net Express library routine PC_PRINTER_INFO to get the current configuration information for a specified open printer. It will return a native device context handle, and other information that can be used to enhance the printing of a document by calling native WINAPI graphics functions directly. Resolution: INTRODUCTION ========== This program demonstrates the use of the Net Express library routine PC_PRINTER_INFO to get the current configuration information for a specified open printer. It will return a native device context handle, and other information that can be used to enhance the printing of a document by calling native WINAPI graphics functions directly. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- PRNTINFO.CBL
Problem: Using the Print feature (File > Print) for some Dialog System screensets fail with error 114. Resolution: The problem is caused by a control that is somehow positioned off the window. To determine the problem, an export file must be produced from the screenset. Below is an example: From the export file Object {NoName} Type TEXT Parent WIN1 Start (2080,65472) Display "PROC" Stylename {Default-Font} End Object #{NoName} This object is attached to WIN1 but the position places it off the window. When print runs, it tries to place this in the screenset image, but because it is off the window, it tries to place it in a location outside the image causing the 114.
Problem: This program demonstrates how to use the Windows 32-bit API function EnumPrinters to obtain a list of available printers and their associated parameters. This demo works on Windows 95, 98 NT, 2000 and XP Resolution: INTRODUCTION ========== This program demonstrates how to use the Windows 32-bit API function EnumPrinters to obtain a list of available printers and their associated parameters. SOURCE FILES: ============= Program Files Description ------------------------- ----------------------------------------------------------- ENUMPRNT.CBL Main program for this demo EnumprintLocal.CBL Program that calls the WINAPI function EnumPrinters to list &nbs
Problem: PuTTy is Freeware terminal emulation software for SSH and Telnet. Using it on Linux, with sde, lines are drawn with lqkxmj characters Resolution: Micro Focus do not recommend settings for third-party terminal emulators. However, we (Support) will take a look at specific customer issues on an informal basis to see if we can help. PuTTy announces itself as an xterm emulator although it seems limited in it's configurables and doesn't draw as well as other emulators using this terminal type in the COBOL environment. The FAQ on PuTTy's web site recommends trying vt220 to resolve some issues. export TERM=vt220 export TERMINFO$COBDIR/terminfo This works well although I haven't found how to return ansi colors. If you're happy with monochrome, I would recommend you try this setting; if not, use PowerTerm which is part of the NetExpress UNIX add-on. Use this in ansi emulatio
Problem: Customer wanted to know if there is any Server Express command-line tool to convert EBCDIC files to ASCII. Resolution: Server Express does not have a command-line utility to convert ASCII and EBCDIC. This is of course often an issue for customers with existing applications on mainframes. In this case it's often true that they can convert files using the file transfer software on a mainframe, or alternatively they purchase Mainframe Express which does let you do this at the command line. It is of course possible to convert between EBCDIC and ASCII using the CHARSET compiler directive. Old KB# 4076
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.