Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
This article explains how to invoke a UNIX command from within COBOL using CALL “SYSTEM” and retrieve the return code of the command. Problem: Micro Focus Server Express and Visual COBOL provide a way for UNIX commands to be invoked from within COBOL. This is done by calling a routine named SYSTEM. Individual UNIX commands such as "ls" or "pwd" can be invoked, or entire shell scripts or executable programs can be invoked. How can the return code from the UNIX command be retrieved and communicated back to COBOL? Resolution: Here is an example of the COBOL syntax for invoking a UNIX command: CALL "SYSTEM" USING CMD-LINE. "SYSTEM" (uppercase) preserves the COBOL screen and state of the terminal, then calls the UNIX system() routine (lowercase), then afterwards restores the COBOL screen and terminal. For more information about "system", see the system(3) man page. It is possible to call "system" (lower
How to capture network packets using WireShark. Problem: In order to troubleshoot certain types of issues, it may be necessary to take a network trace. Also known as a 'sniffer trace', this captures all communication to and from the workstation, providing a low-level view of network traffic. Resolution: To take a network trace using WireShark: Install the WireShark network sniffer. WireShark can be downloaded from http://www.wireshark.org/download.html When the installation completes, start WireShark. Select Capture > Interfaces from the menu. Click the Options button for the desired interface. Configure the capture options: Capture packets in promiscuous mode. This option allows for the capture of packets with destinations other than the workstation where WireShark is running. Normally, this should be left checked. Limit each packet to. This option should be left unchecked to allow all packet data to be captured. Capture Filter. This
This article addresses how to resolve the runtime error message 199. Problem: A runtime 199 will occur when a program is accessing a file that is located on a remote resource and somehow a network "glitch" happens that will get the runtime/file handler confused. In rare situations, it may be caused by an out-of-date installation of Net Express 4.0 which was reporting 199 errors instead of the actual runtime errors. How can this be resolved? Resolution: If this issue is seen on Net Express 4.0, and the version of Net Express 4.0 installed is not 4.0.38 then it should be upgraded with the all08n40.exe WrapPack available from http://supportline.microfocus.com. This should solve the issue if the 199 errors are being improperly reported by the runtime system. The actual runtime errors should now be reported. If this is an already upgraded version of Net Express 4.0, or a later version of Net Express, some possible workarounds include: a) Move the file being rea
This article addresses the unpredictability of the value in the RETURN-CODE special register once COBOL has called an Oracle routine. Problem: In an application that uses Pro*COBOL, COBOL passes control to Oracle routines (for example, during a SQL CONNECT), after which the flow of control returns to COBOL. On one occasion the COBOL special register RETURN-CODE had been modified by Oracle and that it carried a large and meaningless value. This was despite the fact that the SQL statement had succeeded and the SQLCODE was zero. As a rule COBOL does not modify RETURN-CODE (except if the program contains RETURNING syntax or if a fatal runtime error occurs). A meaningless value supplied by Oracle will remained unmodified within COBOL. At the end of the program, COBOL will report this RETURN-CODE to the invoking shell. The shell can access it via "$?", for example: cobrun myprog if [ $? -ne 0 ] then echo "non-zero return code" fi On one occasion, a shell script noti
Acushare will not allow new runtimes to start and behaves incorrectly when commands are issued. Problem: When starting a program, a message that "Acushare 7.0 or later not running" is received.The Unix command “ps -ef | grep acu” reports that no runtime processes running. “acushare –start” returns "already running", and “acushare –kill” reports "failed to connect to server". Resolution: Typically this indicates that Acushare was terminated abnormally (kill -9, which it can't catch,) or it crashed. Should acushare terminate unexpectedly, its master shared memory segment may be left behind. Before restarting acushare, you should use the "acushare -clean" command to remove the stranded memory segment. $ ./acushare acushare: failed to connect to server $ ./acushare -clean acushare: shared memory segment removed $ ./acushare -start acushare: ope
This document describes how to send the "at sign" to the Rumba emulator from a script. Problem: When sending the "@" character to the Rumba display from a script, the character does not appear on the display as expected. How can this be done? Resolution: There are times when it may be desirable to send the "@" character to the Rumba display from a script. For example, if an email address needs to be inserted into a field. One might expect to call EMSendKeys to perform this task as follows: EMSendKeys "User@mydomain.com" This script doesn’t work as expected, because the "@" sign is interpreted as an escape sequence to introduce 3270 keyboard mnemonics. To properly send the "@" character, it must be doubled as shown here: EMSendKeys "User@@mydomain.com" This will result in the expected string being sent to the display: User@mydomain.com. Old KB# 14420#Rumba
This article discusses how to define column names in a SQL statement that contain spaces and the words “OF” or “IN”. Problem: I am getting the ES0100 incorrect SQL statement syntax when a column name contains spaces and the word “OF” or “IN”. How is this resolved? Resolution: This is happening because there is a problem with the OpenESQL pre-processor when using column names with embedded spaces and reserved words which are surrounded by square brackets. The column name is flagged as an error. If the column name is enclosed within double quotes " " instead of square brackets [ ] then the error is not generated, for example: EXEC SQL DECLARE MYCUR CURSOR FOR SELECT [Item Num] ,[Completed Quantity] ,[Unit of Measure] FROM [TESTTAB] WHERE [Order N
This article provides instructions for removing Server Express from a machine, while leaving an installation of Server for COBOL in place. Problem: Background information: Micro Focus COBOL for UNIX is distributed as two individual products. For clarity, this article will refer to them as the "development" product and the "runtime" product.The development product is officially named "Server Express". It includes the entire product offering: the compiler and development tools (including Animator), and also the runtime system and its supporting libraries and files.The runtime product is officially named “Server for COBOL" (or in older versions, "Application Server for Server Express"). This is a sub-set of the development product. It includes only the runtime system and supporting libraries and files; it does not include the COBOL compiler or Animator. The runtime product is meant to be installed on a machine on which there is no need to c
This error occurs running a sample program from the addpack for ACU DataConnect Problem: When running a sample program from the addpack for ACU DataConnect using the following sequence of events, a 173 Called program file not found in drive/directory error can occur. This can be the results of the following sequence of events: The sample program is copied from the COBDIR directory using the following command: cp $COBDIR/sample/acu4gl/demo.cbl to a /tmp or user directory Use the following command to compile the program: cob -v demo.cbl Use the following command to run the program: cobrun demo The following error occurs:Load error : file 'acufh'error code: 173, pc=804, call=1, seg=0173 Called program file not found in drive/directory This error occurs because of the following $set statement: demo.cbl: $set callfh(acufh) The actual file is ACUFH that is, the file name is upper case on disk. Resolution:
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
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 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 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 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
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 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 describes the message received when Application Server is unable to open a licensing file. Problem: What does the following error message mean? ASLM: Errno -301002 when running COBOL application Resolution: The message means that Application Server licensing is unable to open a licensing file (/var/mfaslmf/aslmodf), which is shipped with the product (Server Express 4.0). The reason given in the error code is that the file does not exist. The aslmodf file has to be present in the /var/mfaslmf directory every time that a COBOL application runs. A re-installation of the Application Server Licensing system should solve the problem. Old KB# 14319
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 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.
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 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
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 tells you how to associate a function key with a button so that it executes the same code whether you press the function key or click on the button. Problem: Once a push button is defined, it is necessary to associate the appropriate code with the button so that when a function key (such as F7) is pressed, or when a mouse clicks on the push button, the proper response results. Resolution: Associating the exception value of the function key to be used with the push button enables the proper response when the key or button is pressed. For example, the value to associate with F1 is "1", and for F2 is "2", and so on. When using AcuBench, you make this association by modifying the exception value property for the button. If you are not using the AcuBench IDE, you'll need to add the following code (with "7" representing a value) to the button definition: EXCEPTION-VALUE 7 Here's an AcuBench co
This article shows you how to run multiple products on the same machine. Problem: Many users are now running or would like to run multiple versions of Micro Focus COBOL products on the same machine. It doesn't matter whether you want to test a patch or test a new version before putting it into production: it is easy to run multiple versions of Server Express and older versions of Micro Focus Object COBOL Developer Suite on the same machine without any problems. Resolution: Let's take the example of running Server Express v5.1 and Server Express v4.0 SP2 on the same machine. First, they must be installed in separate directories. The directory structure would look something like: Next, you must ensure that the environment variables COBDIR and LD_LIBRARY_PATH — LIBPATH for AIX and SHLIB_PATH for HP/UX — are set correctly. Then set the PATH environment variable so that the first entry is pointing to $COBDIR/bin. This will guarantee that the correct drivers are used with the
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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.