Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: While loading screen using either EL Loader or loader lite ther is noway to specify which protocol to use TN3270 or TN3270E but there is a option after the project is created. Resolution: At the start of loader in the information page under the category "Display Attributes" there is a checkbox "Extended mode". TN3270E is extended mode. And is this also true for LoaderLite, the "Extended Attributes" check box turns on TN3270E? Old KB# 4134#Rumba#EnterpriseLink
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: CBL_YIELD_RUN_UNIT was present in Object COBOL Developer Suite, but did not appear to work. Has the situation changed in Server Express? Resolution: CBL_YIELD_RUN_UNIT is now functional in Server Express. It yields the remainder of a run-unit's time-slice to unspecified run-units. On some environments this can result in a one-second pause. Old KB# 4078
Problem: Can the Acrobat reader be launched for a PDR file from Net Express COBOL? Resolution: Yes - use the WinApi ShellExecute. A demo for ShellExecute can be found at our samples page in the Internet: http://supportline.microfocus.com/examplesandutilities/nesamp.asp#Win32API It demonstrates how to launch the Internet Browser for an HTML-file. Changing the name of the HTML-file to the name of the PDF-file will start the Acrobat reader. The ShellExecute expects a zero-terminated filename, e.g. by z" ". Old KB# 4052
Problem: With Unix filenames/sourcenames are case-sensitive. With Net Express you could write: CALL "Great" and GREat.int will be found How does this work on Server Express? Is there a directive you can use to have the same behaviour? Resolution: On a UNIX system one can only have upper or lower case. A 'mixed' name in upper & lower case letters will not work. e.g.: GREat.int. This is related to the Operating System. Windows can handle this without problem but not UNIX. There is a directive FOLD-CALL-NAME (FOLDCALLNAME without hyphen works as well). This compiler directive allows lower- or upper case. But not a mixture. Old KB# 4108
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: 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: 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: While debuging, if I want to have a look at the contents of a field, I press "q" then followed by "c". However, if I want to have a look at the contents of an array, I am having problems finding the keys that allow me to "scroll" up/down the array contents. Resolution: To view the contents of an array, place your cursor over the group item of the array, by going to the working storage of the array and then press "q" followed by "c". Next press "F5" / "F6" to step down / up through an 'OCCURS' field of a group item. "F8" will take you to the child of that group item, that is, the data element of that level. "F9" will take you to next data element of the same level. "F7" will take you back to the group item of the child. Old KB# 4117
Problem: Following the steps in the Resolution below it should be possible to discover which Native Code Generator created a .GNT or .O file. This can be useful if you want to discover which release of Server Express was used. Resolution: Open the GNT/OBJ file with the command: what filename or strings filename | fgrep "@(#)" Seach the contents of the file for @(#) There should be a string which looks like: @(#)Hello 99051015180266 GNR-049060000AC Genesis PowerPC hilo 1.231> or @(#)hello 99051015393162 GNR-054060000AC tcg1di386 1.422> which means: hello - base name of the INT file from which this file was generated. 99051015393162 - date and time when it was generated. GNR-054060000AC - version of checker stamp which comes from the INT file. tcg1di386 - version of the generator used.
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: You may find that this information may be missing in your version of the documentation. The "What is new" section says that the search order has changed since Server Express 2.2, but the search order that is actually taking place hasn't been detailed within the chapters that talk about the file handler configuration. Resolution: Currently (Server Express 4.0 and 5.0) the file handler searches for the configuration file in this order: 1. It checks for an environment variable named EXTFH. If the environment variable value is not equal to a space, it attempts to open that file. 2. Otherwise, it tries to open using "$COBDIR/etc/extfh.cfg". 3. If that fails, it tries to open "extfh.cfg" in the current working directory. 4. Finally, if that fails, it assumes that there is no configuration file and it takes all the default values for each one of the options. Old KB# 4107#netexpress#ServerExpress#COBOL#RMCOBOL#AcuCobo
Problem: Is it possible to design Dialog System windows with different colors? Resolution: It is not possible to design or change Dialog System windows (border and title bar), as they are controlled by the operating system. Here is also the description of "Color" from the Net Express help: -------------------------------------------------------------------------------- Color Color changes the foreground or background colors of a selected object or objects. You cannot change the color of a title bar of a window object. When to use: Use Color to change the colors of selected object(s). You must select an object or group of objects first. Effect: Dialog System displays a dialog box for you to select foreground and background colors. Select Foreground, then click on a color to make it the foreground color. Then select Background and click on a color to make it the background color. Press Apply to color the selected objects. Press Close to
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: 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: How to find out the software version of the UNIX product? Resolution: To locate the software version of the cobol unix products installed cat $COBDIR/etc/cobver This will show the software version (see below example: v4.0 SP1) and build version (see below example: 40.03) of the product, as well as any latest fixpack installed (see below example: PTI=Fixpack40.03_10) and if the Enterprise Server Development component is installed (see below example: PTI=ES). For example: cobol v4.0.00-e PRN=RXCTZ/AAA:9h.N3.40.03 PTI=SP1 PTI=ES PTI=Fixpack40.03_10 If you have more than one version of any of the Micro Focus Unix products, then you'll need to know the exact location of where these products are installed to determine the version of these products. Old KB# 4087
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: Are ISO2002 User Defined Funtions supported in Net Express V3.1? Resolution: ISO2002 User Defined Funtions are NOT supported in V3.1 of Net Express. To use this functionality you need to use V4.0 or above. Old KB# 4046
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: 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: When writing a customised file handler on OCDS, the file ufhtab.o is provided to give various functions. This file has to be linked in to the runtime system. There seems to be no equivalent to this file in Server Express. Resolution: The cob command line to link an application with a user callable file handler has changed: you no longer need to specify the file handlers for all the different types of files, and the module ufhtab.o is therefore no longer required. It's also recommended that you specify the file handler with the CALLFH compiler directive, rather than using the -m flag. ** This option may be withdrawn in a future release of Server Express. ** Old KB# 4080#ServerExpress#RMCOBOL#COBOL#AcuCobol#netexpress
Problem: All terminals use a temporary storage queue right now. How can we convert all to use a recoverable storage queue? Also, is there a way to set the default to recoverable storage queue in place of the temp as it is now? Resolution: If the existing configuration does not use predefined queues, which is the typical usage, then depending on the queue name it might be possible to use a generic TST definition. When you define a Temporary Storage Table (TST) entry the name can be up to 8 characters long. If you specify less than 8 characters then you can still get a generic match. For example, assuming you have terminals A000 and B000 each running the transaction TEST. If the TS queue name is of the form TESTA000 where the transid is prepended to the termid then you can define a protected TS queue of 'TEST'. All TS queues that start with the prefix TEST will match the generic TST entry and use its configuration. Old KB#
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
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.