Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
This article describes how to get information about the Operating System when an ACUCOBOL-GT runtime is executed on a Linux server Problem: How to get information about the Operating System when an ACUCUBOL-GT runtime is executed on a Linux server. Resolution: Usually, you can use ACCEPT from SYSTEM-INFO on Windows environments, but this returns only "Unix" when the server is non-Windows. To get more information from a Linux server, use code like this: identification division.program-id. prog.author.remarks. environment division.input-output section.file-control. select myfile assign to "-p uname -a" organization line sequential file status fs. data division.file section.fd myfile.01 rec pic x(50). working-storage section.01 key-pressed pic 9(4) is special-names crt status.01 fs pic xx.procedure division.main-logic. open input myfile read myfile next at end continue end-read display rec accept omitted
This article provides you with a way to verify UK postcodes using the LIKE verb. Problem: Because of the construct of UK postcodes, it is not a simple matter to verify them using traditional coding methods, but the LIKE verb does the job easily. Resolution: The attached sample program “postcode.cbl” contains the required code. Note that it is not possible currently to just specify the upper-case characters and use CASE-INSENSITIVE; this will cause an Assertion Failure on all versions from 12.02 back. This is why the sample program allows both upper- and lower-case characters in the condition. For better performance, the declaration of REGEX is a level-number 78 constant-name declaration instead of a level-number 01 data-name declaration. The regular expression is then compiled at compile-time instead of each time it is used at run-time, as would be the case with an 01 declaration. Old KB# 14338
Some legacy programs use a technique that involves defining tables with minimum values for ‘OCCURS’ and addressing items beyond the defined value; the special options required to make this technique function properly under Server Express and Net Express are explained in this article. Problem: Legacy programs sometimes use the following technique to handle large numbers of items in a table. Consider the following example code: WORKING-STORAGE SECTION. 01 CNT PIC 9(5) VALUE 1. 01 BIG-AREA PIC X(1000). 01 BLLS-TABL PIC S9(8) COMP-5 VALUE 0. 01 PLLS-TABL REDEFINES BLLS-TABL USAGE IS POINTER. LINKAGE SECTION. 01 TABLE-RECORD. 02 T-ID OCCURS 3 TIMES INDEXED BY T-INDEX. 03 TD-ENTRY-NUMBER PIC 9(5). 03 TD-FIELD PIC X(10). PROCEDURE DIVISION USING TABLE-RECORD. 0000-START.. ** Set the address of Big-area to the TAB
This article explains the error "ProgName fails with RTS 173". Problem: A program can be executed from anywhere if its location is added in the environment variable COBDIR (if it is in .INT or.GNT and executed with the RUN command) or PATH (if it is in .EXE). However, the animator cannot find it if it is to be animated from the command line as shown below: MFNETX /DEBUG:ProgName.Ext. Where ProgName is the name of the program and Ext is the extension (INT, GNT, or EXE). The above command fails with RTS 173, which means that the program cannot be located, unless the program is in the current directory. Note: Animating a program always requires its program source and its .idy files to be available. Resolution: The command line parameter ProgName should either be the full path of the program or a program name relative to the working directory. The following precision has been added to the documentation of Net Express 5.1 with WrapPack 2, which applies
This article describes what to do if command-line arguments are supplied to a program with parentheses "()" instead of "=". Problem: When executing the following command: cobrun program file=myfile output=outputfile when the arguments are retrieved in the COBOL application, the “=” character is removed and the argument is bracketed with “()” parentheses, like this: file(myfile) output(outputfile) Resolution: The replacement of the “=” characer by parentheses occurs because of the parsing of the command by the cobrun command. If the application is built as a standalone executable, this parsing of the command-line arguments does not occur, and the values retrieved by the COBOL program are exactly as entered on the command line. To retrieve arguments without the parentheses, use the command: Cobrun program file==myfile output==outputfile. A program to test command-line handling is attached to t
This article describes how to avoid the CANCEL ALL statement from canceling DLL’s and Shared Library Objects, but still cancel COBOL programs. Problem: It is necessary to cancel everything at this point except DLLs and Shared Object Libraries. For this purpose the CANCEL ALL statement is being used in the code of the program, but it is canceling everything. Resolution: The solution is to use the configuration variable CANCEL_ALL_DLLS. The default value for this variable is “1” (on, true, yes). By setting it to “0” (off, false, no) CANCEL ALL will not cancel DLLs or Shared Object Libraries. To cancel a DLL or Shared Object Library a CANCEL statement followed by the name of the library will be needed. Old KB# 14352
The AcuBench drag-and-drop paged list-box has the incorrect page-size set for it. Problem: After adding a paged list-box to a screen using AcuBench’s drag-and-drop mechanism the generated code does not work properly. At runtime the resulting list-box displays the data beginning with the second record. The first record is not seen until the list is paged down then paged up. Resolution: The first record is missing because the page-size for the control is incorrect. It is one record too large for the physical size of the control. Thus the first record scrolls off the top and isn’t seen until the user pages the control down then up. The page size generated by AcuBench for a drag-and-drop paged control (grid or list-box) is an approximation. This should only be considered a starting point. The programmer must verify and adjust the value in Working-Storage so the number of records is precise. Open the program’s working-storage section in AcuBench’s Working-Storage editor, locate the co
This article descries how to change at runtime the title shown for each page on a Tab. Problem: Is there a way to dynamically change the title of each page defined as part of a Tab? Resolution: The solution is to reset the Tab and then add the new titles to be shown. Not resetting the Tab will just add pages and not rename the existing pages. Below is sample code based on a Tab called Screen1-Ta-1: modify Screen1-Ta-1, reset-TABs 1 modify Screen1-Ta-1, TAB-TO-add ("test1" , "test2") After this, the two pages on the Tab will have the titles changed to “test1” and “test2” with all their elements attached correctly. Incident Number: 99-043554 Old KB# 14351
This article describes how to hide the cursor when using an ACCEPT OMITTED statement. Problem: Is it possible to hide the cursor in an ACCEPT statement? Resolution: The cursor may be hidden by using the runtime configuration variable: CURSOR_MODE This variable can assume one of these values: 1 (always visible) 2 (always invisible) 3 (invisible except during ACCEPT statements, then visible) The default value is 3. Note that this variable has a global effect over the whole application, so it is advisable to set it programmatically when needed. The program sample below shows how to do this and how to restore the default value. identification division. program-id. prog. author. claudio.contardi@microfocus.com. remarks. environment division. special-names. decimal-point is comma. input-output section. file-control. data division. file section. working-storage
This article explains how to move License Server from one PC to another without dongles. Problem: How do I move License Server from one PC to another without dongles? Resolution: Save the ls4.arc file and the licenseserver.mdb file. Remove the software from the old machine. Install the ls4 software on the new machine, install the lsf06l40.exe fixpack available from: http://supportline.microfocus.com/websync/ls40 Copy the ls4.arc file and the licenseserver.mdb file to the ls4 bin directory. Go to the administration pages. At this point every screen will display a message stating that the license file doesn’t belong to that machine. However, it will issue licenses for five days from that point. Set up the groups if you are using them. Then, on the administration page, click the fix hyperlink and generate a reset key. Visit the web licensing pages within the SupportLine web site at: http://supportline.microfocus.com/licensing/LicensingHome Follow the links to en
This article describes how to resolve a vision file error 98,20. Problem: Vision files are portable, but if they are transferred in ASCII mode you will receive a 98,20 error when the program is run. Example: $runcbl custrpt.acu File error 98,20 on custfile.dat COBOL error at 000016 in custrpt.acu <Ok> File Status 98:Indexed file corrupt. An internal error has been detected in the indexed file. The secondary status code contains the internal error number 20 Non-zero key prefix on first key in node Resolution: Switch the transfer mode to binary and re-transfer the files. Old KB# 14296
If an .adb file is corrupt the user will receive a Segmentation Fault error when running a program in debug mode. Problem: When trying to run an ACUCOBOL-GT application in debug mode the user may receive a “Segmentation Fault” error. Resolution: The debugger saves state information in a ".adb" file which is used when the debugger is executed in another run. This information includes window placement and breakpoint settings. The segmentation fault may be caused by a corrupt .adb file. Delete the .adb debug file (username.adb). The "--no-save-debug" option provides a way to eliminate this behavior as well by not creating a .adb file. Incident Number: 2265685 Old KB# 14295
This article describes how to record in a trace file, which keys are hit by the user while the application is running. Problem: Is there a way to record in a file, the sequence of keys hit by the user while the application is running? Resolution: There is an ACUCOBOL-GT library routine called W$KEYBUF that can be used to record keystroke sequences. To activate keystroke sequence recording and save in a text file, simply run this code in your application: CALL "W$KEYBUF" USING 7, FILE-NAME To stop the recording, use this code: CALL "W$KEYBUF" USING 5 W$KEYBUF can also be used in Thin Client mode. The W$KEYBUF library routine is documented in the ACUCOBOL-GT Appendices manual, Appendix I. Incident Number: 2114758 Old KB# 14347
This article explains why the RTS 153 error occurs when attempting to access a data item with an occurs clause. Problem: This error occurs when attempting to access a data item with an occurs clause. The subscript value at time of the error exceeds the defined maximum occurence value contained in the definition of the item. This application does not fail on the mainframe and fails after migration to a UNIX operating system. Resolution: Compile the program using the generator directive -N NOCHECK. The -N indicates that this is a directive that will be passed to the Micro Focus native code generator The CHECK directive turns on all run-time checks in generated code. The run-time checks include checks for: Divide-by-zero Calling invalid (that is NULL) procedure-pointers Recursion of non-recursive programs NOCHECK disables all run-time checks in generated code. The NOCHECK option sets
Fileshare server is stopped immediately if started in background; this article explains what to do when this occurs. Problem: The fileshare configuration file fs.cfg contains the background switch -b. fs is submitted to the background with: fs > logfile 2>&1 & (The last "&" tells UNIX to put the program in the background.) However, fs reports "stopped" the next time a foreground command is entered or the Enter key is pressed. Resolution: Fileshare attempts to write a status message to the terminal screen as it interprets each line found in fs.cfg. The -b background swtich in the configuration file is seen only after the first console output is attempted. It is this attempt that causes fileshare to stop. The workaround is to start fileshare with: fs -b > logfile 2>&1 & Fileshare then sees the -b on the command line immediately and outputs nothing to the screen. (The -b switch in fs.cfg is
This article explains why symbol errors occur with COBOL executables. Problem: The following errors were encountered during execution time: 0509-023 symbol XFH_CLOSE in [filename] is not defined 0509-023 symbol regetblk in [filename] is not defined 0509-026 system error: can not run a file that does not have a valid format Resolution: Verify the COBOL version (Product Reference Number) of the failing environment compared to the version (Product Reference Number) of the COBOL development system which was used to create the executable. The versions must be the same, executables built using older versions of the Development System will not execute under a mismatched run time environement. COBOL executables are built/linked using UNIX shared libraries. At execution time, the system dynamic loader verifies that all symbols present when the executable was built are still present in the same libraries used at compilation time. If symbols are removed or relocated
This article explains an ASLM 1013 semaphore failure when attempting to run a COBOL program or when using Application Server without world writable permissions for /var/aslmfsem. Problem: Without world writable permissions for /var/aslmfsem, the following error gets displayed when running an application: ASLM: Semaphore failure. Rerun as root ASLM: Errno 1013 What is the file for, and is there a way to remove the world writable permissions and still have an application run? The same ASLM 1013 semaphore failure also happens when attempting to run a COBOL program. Resolution: The message is normally caused by the missing semaphore file in /var/aslmfsem or the permissions on the file are incorrect. The aslmfsem file has a zero length so it can be created by using the following command: touch /var/aslmfsem The file permission should be rw_rw_rw_ (or R/W) for all and should be owned by root. If the file is present with the correct permissions the check the permiss
This article addresses how to perform manual installs on client machines, specifically a silent install using the Windows group policy. Problem: It can be tedious to perform manual installs on client machines. Using the group policy it is possible to "push" the runtime to client machines silently, without prompts. Resolution: Follow these instructions to use the Windows group policy to perform a silent install: Put the runtime.msi and the liant.lic file on a network share available to the users who are supposed to get the software. E.g. \\\\<servername>\\NETLOGON (this is actually C:\\WINDOWS\\SYSVOL\\sysvol\\<domainname>\\scripts) Apply read rights for those users. Start the Group Policy Management program from the Administrative Tools in the Configuration Panel. Expand Domains. Expand your domain. Expand Group Policy Objects. Create a new Policy or select the policy you like to edit. Select Edit... from the Action menu
This article describes what you can do if an error occurs when attempting to run a program with the Server Express run-time. Problem: An executable file cannot be run using Server Express; a load failure caused by a missing shared library is reported. Resolution: The dependency on library liboops.2.0.so indicates that this executable was built using Object COBOL Developer Suite. Recompiling/rebuilding the executable file under Server Express will resolve the error. Old KB# 14330
This article includes a COBOL program that will convert a UNIX date to an epoch date and then back to human-readable. Problem: How can a calendar date be converted to an epoch date and then back to human readable? Resolution: The attached COBOL program is an example of how to convert a UNIX calendar date to an epoch date and how to convert an Epoch date to a calendar date, using the operating system’s date command. epoch.cblEpoch, UNIX Time, Posix Tim, Unix TimestampDate: Name: Description of change: Date: Name: Description of change: Attachments epoch.cbl Old KB# 14335
This article explains that a Memory Allocation Error occurs during runtime when the SORTSPACE environment variable is too large. Problem: We received a Memory Allocation Error 105 while running a program containing an internal sort. Is the run-time system unable to allocate sufficient memory space to successfully carry out the attempted operation because of insufficient memory space? Resolution: This error occurred because the SORTSPACE environment variable was set to too large a value on the server. A larger value for SORTSPACE will generally result in a faster sort. However, if a value is specified that exceeds the capacity of main memory in the computer, such that the operating system has to page memory in and out, performance will be degraded and an error can occur. Old KB# 14322
This article explains why the LMF daemon does not start at boot time when inittab is present. Problem: LMF can be started from the command line but it fails to start after a reboot. The correct entry resides in /var/inittab: mF:2345:wait:sh /etc/mflmrcscript > /dev/null 2>&1 Resolution: This can happen when LMFCOMM is used to relocate the named pipe file LMF-common. This needs to be reflected in the start-up script mflmrcscript. The directory specified by LMFCOMM must have full read/write/execute permission for all users who will be using the licensed development system. See the section on Relocating the Long-lived Named Pipe in the Development System Licensing Guide Chapter 2, Administering the License Management Facility. Old KB# 14308
This article resolves an ASLM error due to underlying permissions. Problem: This error occurs when trying to run a COBOL program. ASLM COBDIR not set or inadequate permissions An "ls -ld" on the directory while the file system is mounted shows the appropriate permissions and owner/group identities. Resolution: The error occurs due to the underlying permissions on the volume mount point being more restrictive than on the actual directories. To fix a current problem with the underlying mount point, the only viable option is to follow these steps: Stop the processes that are running on the mounted file system and any file systems that are mounted on it. Un-mount the file system (this will require un-mounting file systems, if any, mounted in its path). Use the "ls -ld" command to inspect the mount point directory. Change the owner/group/permissions of the mount point directory. Mount the file system back onto the directory.
Created On: 14 July 2011 Problem: Executing programs in EXE outside of the Net Express IDE fail with a Semaphore Failure. The problem, however, does not occur if the program is linked with the static run-time or dynamically bound shared run-time. Here is the exact error message: ASLM: Semaphore failureASLM: Errno 1000 Resolution: This error occurs when the application is using or picking up an older version of the run-time. For example, this error occurs if an application that was built with Net Express version 5.1 is executed with a Net Express version 4.0 run-time. There is no reason to run an application with an older version of the run-time, and unexpected errors may then occur when old run-time files are found in the PATH environment variable. Incident #2267278 Old KB# 14356
This article describes how to configure Ericom's PowerTerm emulator. Problem: Ericom's PowerTerm is a terminal emulator that is shipped with Micro Focus's Net Express product. It can also be purchased separately from Ericom. PowerTerm is used to create a telnet connection to UNIX or LINUX environments. When executing Micro Focus's "sde" (Integrated Development Environment) or Micro Focus's License Administrator utility, "mflmadm," the screen drawing lines are displayed as a line of "Ä"s: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ instead of as a graphic line: ______________________________________________ As with any emulators, th
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.