Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: You may find that even though you didn't set the configuration option LOG=ON in your extfh.cfg (or the file specified in your EXTFH environment variable, see knoledge base article 22486) Resolution: The file handler configuration option LOG specifies whether any unusual file-related situations, such as corrupted files, or automatic file recovery, are noted in a log file for later examination. The configuration option LOGFILE specifies the name for the log file, by default the name is XFHLOG. In the latest versions of the product LOG=ON by default. But the documentation hadn't been updated accordingly (Server Express 4.0 rpi 1058489) but this should be fixed in Server Express 5.0. To display the file contents, you should use the cobfhprint tool which should create a file called XFHLOG.TXT containing information from the XFHLOG file. cobfhprint XFHLOGfilename Currently there are two defects associated wit
Problem: Trying to anim Pro*COBOL programs results in a blank screen. Animating pure COBOL program works fine. CTF and truss traces show a 115 error in dispatch.gnt and then the process appears to hang. Resolution: The problem can be resolved by applying an IBM patch to AIX for APAR IY80008. Apparently the issue shows up when the bos.rte.libpthread package is version 5.3.0.30. If you use 5.3.0.0 debugging works correctly. The issue does not show up on our AIX 5.1 or AIX 5.2 machines, which use an older still version of libpthread. You can find a little more information on the problem via this link: http://www-1.ibm.com/support/docview.wss?uid=isg1IY80008 There's another link at the top of this page to go to a download page to get the fix. Old KB# 4116
Problem: Opening a line sequential file in EXTEND mode will put an exclusive lock on that file by default. In this case, you can't open that file with a Windows utility such as Notepad to view it until the file has been closed. Resolution: To get around this, you can code the "sharing with all other" phrase in the select statement: select logfile assign to "logfile.txt" organization is line sequential sharing with all other. Old KB# 4047#ServerExpress#AcuCobol#RMCOBOL#netexpress#COBOL
Problem: The following error message is returned when compiling: /opt/lib/cobol/bin/rts64_t: /sbin/loader: Fatal Error: Cannot map library libcobrts64_t.so.2 Resolution: Make sure the environment variable LD_LIBRARY_PATH (or LIBPATH on AIX & SHLIB_PATH on HP-UX) is set correctly by pointing to the correct product and location. It should be set to the $COBDIR/lib directory. To check what the environment variables are set to, run the 'env' command or the 'mfsupport' command, which will generate a 'mfpoll' file in the same directory you run the command. Old KB# 4086
Problem: Error message: Dependent module libcobrts64_t.2.so could not be loaded. Could not load module libcobrts64_t.2.so. System error: No such file or directory cob64: error(s) in compilation: sample1.cob A recently released AIX update appears to cause the symptom. To diagnose, cd to a directory in which you have write permission cp $COBDIR/demo/debug/pi.cbl pi.cbl cob pi.cbl cobrun pi If this fails with a similar message, check the LIBPATH setting. If it works, try the Oracle demo, sample1 or any other compilation run from the "make" command. If that fails with the error message above, the problem is diagnosed. Resolution: The problem is caused by make being changed to a setgid program. setuid and setgid programs ignore the value of LIBPATH. This is for security reasons. As a result, Cobol executables, such as rts64, cannot
Problem: How to set a Conditional Breakpoint in Animator. Resolution: You can set a Conditional Breakpoint in Animator. This is not the same as a hard breakpoint. A hard breakpoint occurs when Animator executes a specific statement. A Conditional Breakpoint is a test of a data-item. When that test becomes true, execution stops. Below are some valid examples of breakpoints that may be used by animating our demonstration program pi.cbl. PI > 3.14 N < 25 STRING = "entrypoint" loop-counter > <value> When the breakpoint is set, the COBOL line will be highlighted. Remember, you do not specify the word "if" when setting the breakpoint. Old KB# 4070
Problem: To setup the Java environment with Micro Focus COBOL run the command . $COBDIR/bin/cobsje -v -J <Java_Home> If running on HP/UX 11.11 the cobsje script will abend with the error: ksh: COBCPY: parameter not set Resolution: This is a problem with HP/UX 11.11. The workaround is to set the environment variable COBCPY to anything prior to running the cobsje script: export COBCPY=A . $COBDIR/bin/cobsje -v -J <Java_Home> This is not a problem running on HP/UX 11.00. Old KB# 4073
Problem: A customer's application deletes a record from an index file via COBOL. The record is ".. Not Found" when reading the file. When dumped using 'od' the record data can be seen to still exist in the file. So how can one delete a record physically from an index file using a COBOL program? Resolution: When you delete a record the file handler marks in the data file and index that the record is deleted - it doesn't physically write over the record. You would have to rewrite the key with spaces in the record area and then delete it to remove the data but of course the key is still there. So the only permanent way of doing this is to run rebuild which will remove all the deleted and free space records. The reason we don't permanently delete the record is entirely for performance. Old KB# 4074#ServerExpress#RMCOBOL#COBOL#netexpress#AcuCobol
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: 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: 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: A customer was required to change a single line in over 1000 programs to add text to the end of the PROGRAM-ID statement. The format of the PROGRAM-ID is : PROGRAM-ID. MYPROGNAME. The change required the format: PROGRAM-ID PROGRAMNAME IS INITIAL. They did not wish to edit each file individually. Resolution: sed is made for this sort of job. The answer is simple and very fast. #! /bin/sh for FILE in *.cbl do echo $FILE sed '/PROGRAM-ID/s/[.]$/ IS INITIAL./' $FILE > ./tmp/tmp.$FILE diff $FILE ./tmp/tmp.$FILE >>./tmp/diff.txt done The script is placed in the directory containing the .cbl files. I also create a tmp directory in the same directory. When run, the script performs a loop reading every .cbl file. It prints the filename to the screen. Edits the line containing PROGRAM-ID to remove the trailing period from the prog
Problem: Is there an equivalent feature to the Animate | DateWarp feature in the Net Express IDE, to be used outside of the IDE for runtime? Resolution: Yes, there is. The runtime tunables datewarp_dynamic and timewarp_dynamic. REF: Go to the Net Express help menu and in the 'Index' tab, enter the keyword 'datewarp_dynamic' or 'timewarp_dynamic' Or go to the 'Contents' tab and located under the Reference | runtime system | runtime tunables for the datewarp_dynamic topic datewarp_dynamic Specifies whether the day, month, and year values specified by the current_day, current_month, and current_year tunables return static or "rolling" values. Syntax: >>-----set datewarp_dynamic=---.-TRUE-.------------->< &
Problem: The following information explains how to set a breakpoint in Animator on a specific count. Lets say you want to execute a rountne n number of times. The following explains how to set the breakpoint. Resolution: In Animator position the cursor on the line that you want to count. Enter "B"reak, then enter "O"n-count. Enter the number of times you want to execute that line of code before you want to break (stop) the process from executing. (The value must be greater between 2 and 255) Hit the enter key. Control is returned to the Break-point menu where you may select: On count works with :- Ordinary breakpoints : Stops every n'th time Breakpoint If conditions : Stops every n'th time condition is true &
Problem: Getting a 9/037 error using CBL_READ_DIR and CBL_GET_CURRENT_DIRECTORY Resolution: As the error code suggests, this is a permissions problem. The directory in question can be found using a system trace utility such as truss. In the truss trace on AIX will be something like: statx("./../../../../", 0x2FF216D8, 76, 0) Err#13 EACCES Err#13 EACCES means that search permission is denied for one component of the path prefix. The path prefix in this example is "./../../../../", i.e. 4 levels up from the directory where the program is running. Full information on statx can be found at the IBM site (http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.doc/libs/basetrf2/statx.htm). truss is available on AIX, SCO UnixWare and Solaris. On HP systems there's tusc and Tru64 uses trace, neither of which are included in the main distribu
Problem: This question came from a customer who had Server Express and Application Server for 32 bit and 64 bit. But when he does a cob -V cob -V version @(#)cob.c 1.281 PRN=RXCAI/AAI:9g.K4.22.02 PTI=SP1 PTI=Fixpack22.02_13 I see no work It doesn't tell you if the product is on 32-bit or 64 bit. Even the PRN of Server Expres and Application Server for Server Express doesn't show you this difference even though they they could be a different bit. PRN=RXCAK/AAL:9i.T4.40.02 (Development) PRN=R1CAK/AAC:9i.T4.40.02 (Application Server) Resolution: It is actually quite simple to find this out: type in cob -v or cobmode Old KB# 4109
Problem: Customer downloaded a Fixpack, to find that it was in the format <name>.tar.encr. What does he do with such a file? Resolution: .encr files are encrypted, so that they can only be unpacked on a machine with a valid Micro Focus UNIX product. The approach is therefore to make sure that COBDIR and so on are set, and then to run the .encr file as an executable. It will magically transform itself into a normal .tar file, which can then be extracted in the usual way. Old KB# 4077
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: This illustrates how to use the Win32 Api ResetDC to adjust the page size for the printer Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 SDK function call ResetDC to modify the settings of a printer between print jobs. This program uses the Net Express call-by-name routines PC_PRINTER_OPEN and PC_PRINTER_INFO to select a printer and obtain the printers Device Context Handle. This handle is then used to end the page started by PC_PRINTER_OPEN and in the call to ResetDC in order to change the printers page size to an envelope with landscape orientation. An envelope will then be printed. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- RESETDC .CBL Program that calls the WINAPI functions to reset the device context
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: 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 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: 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 program demonstrates how to allow a user to select a font and style for printing using the Windows SDK function ChooseFont in conjunction with the Net Express PC_PRINTER routines. Resolution: INTRODUCTION ========== This program will demonstrate how to allow a user to select a font and style for printing using the Windows SDK function ChooseFont in conjunction with the Net Express PC_PRINTER routines. This function allows you to present a list of available fonts to the user for selection. This can also be done by setting the appropriate printer-flag when using the PC_PRINTER_OPEN call but the ChooseFont function is more powerful. It allows you to present a list of fonts based on certain criteria such as only Truetype, only fixed fonts etc. The criteria flags can be found in the CFDEFINE.CPY copy file. This example will use the selected font to output various text lines to the printer. The lines will be printed in differing point sizes and
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
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.