Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: In the course of Cobol program execution, it would be desirable to issue a command to the Unix shell for processing and to work with the command's output. Is it possible. Resolution: The procedure division statement is: CALL 'SYSTEM' USING MY-COMMAND. where MY-COMMAND is: 01 MY-COMMAND. 10 MY-COMMAND-LINE PIC X(2048). 10 FILLER PIC X VALUE LOW-VALUES. MY-COMMAND-LINE may contain any valid system command line, e.g. ls -l > lsout.txt It is recommended that command output be redirected to a file if the Cobol program needs a
Problem: When executing a database client application, an error about libpthread, or thread-local storage appears, such as : * /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local Storage: * OpenESQL Error: You must execute your application using the threaded COBOL run-time. * RTS198 (load failure) Resolution: Recent versions of database software are built using threaded C libraries. It's therefore imperative that user applications are compiled and executed with the threaded run-time, i.e. : * Compile, generate, and link the application using the -t cob flag * Ensure that you execute the app using cobrun_t, rather than cobrun On some Operating Systems, such as HP-UX PA-RISC, if you attempt to execute a database application with the non-threaded COBOL run-time, you will see an error from the dynamic loader : > cobrun myapp /usr/lib/dld.sl: Can't shl_loa
Problem: Compiler errors reported becuase of * in first 6 columns of the source program Resolution: An asterick in column is treated as a comment compile using the directive NOMFCOMMENT Old KB# 7160
Problem: COBOL program with huge tables. The compiler is returning an error 16 "Data space too large". Is there anything directive they can set? Resolution: The application program has exceeded the limit of the data division. Old KB# 7178
Problem: Example of Status Codes returned by byte-streams routines: 14605 = Hex 390D = 9 013 = File not found. The sample pasted below "retrieves" the extended file-status code from the status-code returned by the byte-stream routine. Resolution: copy "cblproto.cpy". program-id. MYMAIN. working-storage section. 01 . 05 file-details cblt-fileexist-buf. 01 status-code pic xx comp-5. 01 status-codeX pic xx comp-x. 01 lgind-status redefines status-codeX . &n
Problem: Net Express Release 4.0: The XML-Wizard may generate a data structure like: 04 xml-act identified by "act" count in xml-act-count. 05 xml-MyName PIC X(90) identified by "MyName" . .......... 05 xml-more identified by "more". 06 xml-MyName PIC X(90) identified by "MyName". When coding MOVE "Harry" to xml-MyName of xml-act. The following compiler error message is returned: COBCH0005S User-name XML-MyName not unique Resolution: The identifier xml-MyName at the 05-level cannot be used in the COBOL-program, because there is no way for a proper qualification of thi
Problem: NOT SEEING PARAMETERS ON INPUT FILE defined as STDIN Resolution: set command_line_accept=true in the cobconfig file, which is a run-time configuration file. The run-time configuration file is a text file, which you can edit with your standard text editor. It is an optional file (no error will be issued if it does not exist) with the default name $COBDIR/etc/cobconfig. You can specify a filename for the configuration file by setting the environment variable COBCONFIG; for example: COBCONFIG=$HOME/myconfig export COBCONFIG command_line_accept Syntax: set command_line_accept={TRUE|FALSE} Value: TRUE or FALSE If TRUE, the first ACCEPT or READ from STDIN takes the input from the command line. Default: FALSE. The first ACCEPT or READ from STDIN takes the input from the user. This provides direct ANSI conformance. You should set this if you want to execute a program that has been generated from convert3 or convert5. Old KB# 717
Problem: Why don't the keys ALT CTRL work when pressing them? Resolution: Unfortunately most UNIX terminals, by default, simply do not send a key sequence when the Alt or Ctrl key is pressed. You can see that no key sequence is sent from the ALT key by trying the following: > cat > test Then try pressing ALT, you will see that nothing appears in test, then try pressing ESC and you will see the key sequence ^[ being shown as this is what is sent when the ESC key is pressed. As nothing is sent when the ALT key is pressed then there is nothing for Server Express to respond to, therefore this is not a Server Express software issue, but a keyboard/Unix issue. In order to get around this to use our software, we recommend using /a for alt and /c for ctrl. To get a full list of key mappings you can use /m or see the COBOL User's Guide Appendix for Unix key usage chart Otherwise maybe
Problem: Debugging C language modules called by COBOL Resolution: Compile the C modules for DEBUG ie using the C compiler specifiy -g then link the .o's with the COBOL - now when starting the application start it through the C language debugger ie dbx applicationname then set breakpoints in the C functions that need debugging Old KB# 7166
Problem: The only reason a process would continue to run when a terminal session is ended is when the terminal session is not shut down correctly, for example if a client machine is switched off unexpectadly or the network connection is lost. When a telnet session is 'killed' i.e. not shut down cleanly, it does not send any signal back to any child processes (cobol, C or vi for example) and therefore the child processes have no reason to die and they continue running. Resolution: The best option is to always close the Cobol application cleanly. The other option is to use the exec command so that the cobol process is not a child process. When you don't use "exec" you effectively have two processes running, the first one is the shell invoked from the telnet session the second is "cobrun xxxx". If you then switch off the PC or the connection is lost, only the shell is ki
Problem: cob64: bad magic number error when linking application cob32: bad magic number error when linking application Resolution: When using COBOL in conjunction with third party software, ensure that the COBOL working mode matches the environment settings for the third party software. For example, Oracle installations on UNIX typically provide both 32-bit and 64-bit shared objects in $ORACLE_HOME/lib and $ORACLE_HOME/lib64 . You would therefore need to ensure that LIBPATH/LD_LIBRARY_PATH/SHLIB_PATH was set correctly. See Knowledge Base article #22062 for further details. Old KB# 7183
Problem: During compilation is there a way to route .gnt output files to a specific location? The default is to write the file in the current directory. Resolution: Use the -Ngnt flag then specify the file location for the output file. cob -u -Ngnt="/tmp/testxx/tictac.gnt" tictac.cbl This example causes the tictac.gnt file to be written to the /tmp/testxx directory. Old KB# 7186
Problem: Adis error messages are displayed at line 24 in Animator, Resolution: Issue caused by the fact that the Animator uses the MFDEBUG terminal description entry and this entry contains the definitions LINES=#24 this then limits the usable screen to 24 lines. This is not a defect and is documented as follows: Here is the information extracted from the Server Express documents; 2.2.6 Specifying Screen Size for Screen-swapping When Animator executes a program, the program might need to use the terminal for input and output. If you only have access to a single terminal, and both Animator and the executing program need access to it, Animator keeps a virtual image of the program's output in the background. This image is displayed, and Animator swapped to the background if you press F2=View, or if Animator itself displays the program's output (during Step or Zoom operations, for example). By default, the size of this virt
Problem: When Animator is invoked, the screen clears, some escape sequences are written including a 'bell' (this can be captured by redirecting stdout and stderr) then the process immediately exits back to the command prompt instead of animating as it should. This happens for all programs including the most simple "hello world" program (use $COBDIR/demo/debug/tictac.cbl to demonstrate). It occurs no matter how animator is invoked, including: regular "anim" From within tbox cross-session with "animsrv" cross-session with dynamic attachment CBL_DEBUGBREAK COBSW= A Animator is the only feature that's broken: tbox and dfed work fine, and any program can be compiled successfully and will execute successfully, as long as animator is not used. The COBDIR, LD_LIBRARY_PATH, and PATH environment variables are set correctly. The LMF and ASLMF licensing systems are working correct
Problem: How to setup environment variable to point to location of file from within a program. Resolution: Search in the net express 4.0 help for EMBEDDED ENVIRONMENT VARIABLES and will find the following : Embedded Environment Variables You can include an environment variable in the name of a file you want to open. It should have been previously given a value using the operating system SET command. The file specification is of the form: $env-name\\filename.ext Example $test\\app.dat where you have issued the command: set test=c:\\appdir;d:\\appdir\\appsub; env-name will only be recognized as an environment variable if it is enclosed within dollar ($) and backslash (\\) characters; thus if you simply specify an environment variable by itself it will not be expanded. The environment variable env-name can contain a list of one or more paths, separated by a semicolon (;). The open mode of the file determines the pa
Problem: Net Express Release 4.0: How to get more information about interfaces writing a COM client? Resolution: The Type Library Assistant in Net Express can be used to get more information. The Type Library for a COM object defines information that can be useful when writing a COM client. A COBOL copyfile can be generated for any Type Library by using the Type Library Assistant. Click Type Library Assistant on the Net Express Tools menu followed by all registered Type Libraries. According to the Net Express doc files in Distributed Computing Part 4: COM,COBOL and .NET Chapter 16: Creating COM clients: Depending on the information in the Type Library, the COBOL copyfile includes the following: COBOL type definitions for any data types defined by the Type Library For each automation interface defined by the library: Level-78 data items containing the IID (interface IDs) of any interfaces defined by the type library A comment showing the i
Problem: projmake -Buildall aProject.app "Generic Debug Build" ---> ERROR: "Could not open SYSTEM.DAT" Resolution: install Net Express 4.0 latest fixpack ( ALL04N40.EXE) ... Old KB# 7120
Problem: Receiving a compilation error when trying to compile from within the IDE, click on compilation error to bring up the offending program line and receiving message "cannot access message file". Resolution: Removing all the files from the debug directory and recompiling cleared the "cannot access message file" error. Old KB# 7142
Problem: Deployment of EJB mapdemo fails..."failed to create deployment package" Resolution: Make sure MFJ.CFG is pointing to JAVAC.EXE and MFJAR.CFG to JAR.EXE. These .cfg files are text files: ...Net Express\\Base\\bin\\mfj.cfg d:\\jdk\\bin\\javac.exe -verbose ...Net Express\\Base\\bin\\mfjar.cfg d:\\jdk\\bin\\jar.exe Old KB# 7110
Problem: Can I use Rollback on files without the user of Fileshare ? Resolution: To do this you still need to use Fileshare, but in single user mode. This means you don't need the external fileshare and comms processes. See the Advanced chapter in the Fileshare Manual for more information. Old KB# 7099#RMCOBOL#COBOL#netexpress#ServerExpress#AcuCobol
Problem: I need constants in my code for an apostrophe and a quote. I've got an apostrophe ("'"), how do I define a nonnumeric literal that is a quote (") character? Resolution: 1) When you need to embed a quote character within a nonumeric literal that is delimited by quote characters, use two consecutive quote characters. 77 aQuote pic x value """". 2) Both quotes and apostrophes can be used within the same source text to delimit nonumeric literals, but the delimiters for any individual literal must match. 77 anApostrophe pic x value "'". 77 aQuote pic x value '"'. 3) There is a figrative constant avialable (QUOTE) that can be used to initialize variables and analyze values. 77 aQuote pic x. procedure division. move QUOTE to aQuote if aQuote = QUOTE
Problem: Making a change to an existing form, and trying to Save, gives an error that the form.cpf cannot be saved. Resolution: Has the project been moved ? alternatively Check whether the Working Directory field is filled in in the Project Properties. Old KB# 7079
Problem: You can find the data mapping between COBOL and .NET from the Net Express with .NET Help. Resolution: 1. Go to Start > Programs > Micro Focus Net Express with .NET > Net Express with .NET Help 2. Click on the Contents tab (if it is already not) 3. Go to Using Net Express with .NET > User's Guide > Interoperating with Managed Code in Other Languages 4. Click on "COBOL Type Compatibility" under the Type Compatibility section Old KB# 7116
Problem: Larger interfaces slow down operations when using the Interface Mapping Tools in the IDE. Some operations (such as canceling changes) can take an increasingly long time to perform as the size and complexity increases. Resolution: This has been accepted as a bug and fixed in the all04n40 wrappack released November 2004. The fix released is contained in the Interface Mapping Fixpack V4.0.005. Old KB# 7105
Problem: When installing Net Express 4.0 under XP Professional from a Net Express 4.0 CD dated 2003, the following Internet Explorer display will be presented: The Internet Explorer Titlebar will display the following jump-to-target - Microsoft Internet Expolorer In the body of the Internet Explorer display, a yellow tinted "security report" will appear with this information. To help protect security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options... Resolution: Right mouse click on the yellow tinted "security report" and a context menu pops up with these buttons: Allow Blocked Content... What's the Risk? Information Bar Help Click "Allow Blocked Content..." (button) A Windows MessageBox opens with "Yes" and "No" buttons and this message: Allowing active content as script and A
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.