Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: In a Windows environment it is possible to use the WIN API GetSystemTime which returns time to milliseconds. However, is there a similar functionality for UNIX platforms? Resolution: The standard functions ftime() and gettimeofday(), both of which are part of the Single UNIX Specification. ftime() is an outdated function; gettimeofday() is preferred for new code. To use either of those functions in COBOL you will have to convert the appropriate structure from the system's version of /usr/include/sys/time.h to a COBOL group item, then call the function passing the item by reference. For example, on Solaris 9, in a 32-bit environment: ----- $set sourceformat(free) identification division. program-id. time-in-ms. data division. working-storage section. 01 timeval-32bit. 02 seconds pic x(4) comp-5. 02 micr
Problem: In cases where differing results are observed between the .INT version of a program and the .GNT,Callable shared object, or UNIX executable version of the same program there are a few basic steps to take in identifying the root cause of the difference. Resolution: The first thing to do is identify the line of code in the program where the difference can be observed, in most cases this will be an arithmetic operation or possible an evaluation operation (IF , EVALUATE etc). Make sure that the fields used in the offending statement contain expected values before proceeding, if any element contains an incorrect or unexpected value then the root cause of the difference has not yet been identified, you'll have to work backwards to see where the error is introduced. Once the offending statement is identified insert some code after the offending statement which will clearly indicate success or failure of the suspect operation. For example if the suspect
Problem: What is the syntaxe to use cobsje Resolution: With Server Express 4.0SP2 and Server Express 5.0 ( by default) . $COBDIR/bin/cobsje -v -J <Java_Home> If you run the command chmod x $COBDIR/bin/cobsje you can use : $COBDIR/bin/cobsje -v -J <Java_Home> With Server Express 5.0WS3 and 5.0WS4 ( by default) $COBDIR/bin/cobsje -v -J <Java_Home> Old KB# 2284
Problem: In Server Express 5.0 WS1 when IKJEFT1A calls a program that doesn't exist, instead of causing an abend it returns a COND CODE = 0012. IBM defines the DISP clause as: DISP=(beginning disposition, normal termination disposition, abnormal termination disposition) An abnormal termination or ABnormal END is really an ABEND. Just passing a non-zero Condition Code is not enough to cause the JCL system to process the DISP clause as an abnormal termination. Generally, the application would have to call an abend routine (ILBOABN0 or CEE3ABD -LE) to provoke and abend and make the JCL to process the 3rd parameter on the DISP clause. Resolution: This has been fixed in Server Express WP4. Now IKJEFT1A produces a system ABEND S04C when the program called doesn't exist. With this abend the file disposition is processed correctly. Old KB# 2318
Problem: Execution error : cob32: Failed to locate an appropriate executable for tool 'cob32' *** Error exit code 1 Stop. Resolution: Reinstall the cobol product in clean directories. The error message is being issued from the triggers (i.e. the 'cob' utility which attempts to execute 'cob32' or 'cob64'). It would imply an issue with file permissions or a corrupt file. Please execute the following commands: ls -l $COBDIR/bin/cob $COBDIR/bin/cob?? cobfile $COBDIR/bin/cob $COBDIR/bin/cob?? sum -r $COBDIR/bin/cob $COBDIR/bin/cob?? cobmode will indicate which the default working mode to check in the output of the above commands. Ex cob32 or cob64 Make make sure $COBDIR/bin is the first directory path in the PATH environment variable. ls -l $COBDIR/bin/cob $COBDIR/bin/cob?? For eample you may find the following xrwxrwx for cob32 On a running system the permissions should be -
Problem: Arithmetic statements produce different results when run in int form and other program forms(.gnt,.so, or executable) Resolution: In some cases different results for arithmetic statements are produced when running programs compiled to int executable form versus running the same program compiled to .gnt (or other object code) form. There are a number of different causes for this problem/symptom. One possible cause is that the arithmentic operation is constructed in a way that allows the result prodcuced to be larger than the the capacity of the data item where the result is to be stored. INT code hides these kinds of things, while object code forms do not. To determine if a particular arithmentic operation is failing because of this unintended overflow condition, modify the statement to include the ON SIZE Error clause. examples: Original suspect statment COMPUTE C = A * B Test for Size Error COMPUTE C = A * B ON SIZE ERROR STOP "SIZE
Problem: How to install Server Express when no CDROM drive is on the computer Resolution: If your UNIX or Linux system does not have a CD or DVD drive, you can install the product by mounting the appropriate disc on another machine, transferring the product to your machine, then running the install. The instructions below take you through this procedure. Before you start, make sure you have enough disk space for the product. The space needed is the same as the size of the tar files you use. (See step 2 below.) In addition, you need the same amount of temporary space to store the tar files. Mount the CD or DVD on the target machine. Look at the file v5000.txt. This lists the directory names and the products those directories contain. It also shows the sizes of the tar files. Change to the directory containing the product you want to install. Most of the products are stored as compressed tar files with filenames in the format vabccppp.trz, where abcc r
Problem: After compiling some .pco files (COBOL source files with embedded SQL) using Oracle's Pro*COBOL precompiler, I notice several files of zero length beginning with "cb" followed by six random characters, example: Jan 29 09:50 cbvlsCx6 Jan 29 10:38 cb8GkGSe Jan 29 09:50 cbBDXwbE Jan 29 09:50 cbYYlwdC Jan 29 10:38 cbjKuFEg Jan 29 09:50 cbrcJzEh Jan 29 10:38 cbkcIy2l Jan 29 10:42 cbus91Vz Jan 29 10:38 cb5ojrct Jan 29 10:38 cbEq7JB5 Jan 29 10:45 cbiDACHP Where do these files come from and what do they mean? Resolution: The files are produced by Oracle's precompiler, not by COBOL. We determined this by examining the makefiles. In the makefile rule about compiling .pco's, immediately after the Oracle pre-compiler is invoked, we inserted "sh user-input.sh". Outside of the makefile, we created a small script named "user-input.sh" like this: echo "hit return to contin
Problem: I would like to use the CICS transaction CNCL . At the moment I must use a 3270 emulator . Is it possible to run this transaction from Unix command line Resolution: This is a Cobol example that runs the cas3270 command to run CICS transaction : 01 Z1 PIC X(80). 01 Z2 PIC X(20). ACCEPT Z2 FROM COMMAND-LINE. STRING 123456 "cas3270 -rESDEMO <<!" delimited by size X"0A1B" delimited by size "CNCL " delimited by size Z2 delimited by spaces X"0A" delimited by size "EXIT" delimited by size
Problem: The command echo $? Displays a value that is higher than 128. What does this value mean? Resolution: If the errno value that is displayed by the command echo $, is higher than 128 , it means that the process was stopped by a signal = {Errno value} - 128 Example Echo $? displays 137 , the process was stopped by signal 9 Old KB# 2369
Problem: If there is a need to run Server Express and Java with multiple versions of Oracle on the same machine, how can it run with one installation of Server Express? There would have to be an rtsora runtime executable created for each release. How can cobrun or cobjrun access the correct rtsora? Resolution: Use rtsora to execute their applications, rather than cobrun? i.e. # Make no changes to $COBDIR/bin/rts32* or $COBDIR/bin/rts64* # User 1:(i.e. Oracle 9) PATH=oracle[9]home/bin:$PATH LIBPATH=oracle[9]home/lib:$LIBPATH or SHLIB_PATH or LD_LIBRARY_PATH according to platform rtsora myapp.int --> will use the rtsora from $ORACLE_HOME/bin # User 2:(i.e. Oracle 10) PATH=oracle[10]home/bin:$PATH LIBPATH=oracle[10]home/lib:$LIBPATH or SHLIB_PATh or LD_LIBRARY_PATH according to platform rtsora myapp.int --> will use the rtsora from $ORACLE_HOME/bin To debug, set COBSW= A, and execute rtsora. To u
Problem: Programs are coded for OPEN OUTPUT and OPEN I/O Is there a way to make them READ ONLY without changing the programs? Resolution: To convert all OPEN I-O statements in a given set of programs to OPEN INPUT statements can be accomplished with a user written file-handler. The file-handler OP-CODE for OPEN I-O is x"FA02" . The user written file-handler would have to convert this to the OP-CODE for OPEN INPUT which is x"FA00". The file handler would contain the following: working-storage section. 01 open-input pic xx value x"FA00". linkage section. 01 opcode pic xx. 01 fcd. copy "XFHFCD.CPY". procedure division using opcode fcd. if opcode = x"FA02" call "EXTFH" using open-input fcd else call "EXTFH" using opcode fcd end-if exit program . Compile the programs using the CALLFH directive naming the user written file-handler and then any attempts to write or update the file should fail with an appropriate file-status code (wr
Problem: MySQL is the worlds most popular open source database because of its consistent fast performance, high reliability and ease of use. Can MySQL database be used with Net Express and Server Express? Resolution: Although the product documentation talks about specific databases such as DB2, Informix, Oracle and Sybase, it is possible to use any RDMS with OpenESQL and the relevant ODBC driver. Pre-requisites: 1. An ODBC driver manager such as unixODBC 2. An ODBC driver such as the one available from MySQL (version 3.51 was used to test the demo programs mentioned in this article) The unixodbc.org and mysql.com websites provide comprehensive documentation on installing and configuring the manager and driver. Please refer to $COBDIR/docs/readme.txt for details on the platforms supported by OpenESQL. Minimum ODBC configuration when connecting to database on local system: If using unixODBC the following configuration information goes into
Problem: There are two methods of starting a COBOL CGI application, one popular method is to cretae a shell script which is invoked by the httpd web server. The subject of this document is how to debug the COBOL application which is ececuted from within this shell script. Resolution: The first requirement is that the application program(s) must be compiled for animation. This is accomplished through flags or options specified at compile time. For .int programs the flag is '-a' for .gnt, callable shared objects, or UNIX executables the flag is '-g'. All httpd web servers run under a user-id specified in the web server configuration by the server administrator. CGI scripts or programs loaded/invoked by the web server run under this same user-id. For example the administrator might set up the server so that it runs under the user-id of 'wwwrun'. All processes run by the web server will be owned by 'wwwrun'
Problem: In the past, on Suse and Red Hat Linux, MQ series did not support interoperability with MF COBOL, so Micro Focus provided to some customers (as a special case), two .gnts and a .so (named MQCONN.gnt, MQCONNX.gnt, and mfmqsup.so), consisting of routines that map MQ calls within COBOL (for example MQOPEN, MQGET, etc.) onto the C support within MQ, as a way of facilitating interoperability between Server Express and MQ Series. A customer had been using these files successfully, but when this customer upgraded from SX v5.0 to SX v5.0 WP4 (i.e. they installed WP4), they began receiving an MQ error: reason 2012 calll not valid for current environment MQRC_ENVIRONMENT_ERROR Resolution: In the past, modules named MQCONN.gnt and MQCONNX.gnt were not supplied with Server Express, but beginning with WP4 for SX v5.0, they are supplied as part of the "Enter
Problem: Getting permissions errors when untarring the file. Resolution: You now have to be root to untar the update. Login as root user, create the directory where you want to install the WrapPack (this is a complete re-install, not an update or overlay), untar the files into that directory then run the install script. Old KB# 2273
Problem: What is the replacement for the watch option (as found in OCDS) in Server Express 5.0? Resolution: In Server Express this is now called 'monitor'. Once you've started animating, you can do Query > Cursor > Monitor. Old KB# 2244
Problem: Compiling Server Express 5.0 for Itanium Using same flags, dirs, etc. as on HP PA-RISC now get the error Load error : file '/opt/cobol/dynload64/inoc.gnt' error code: 217, pc=0, call=1, seg=0 217 Incompatible host for native code file In 32 bit get the error: Load error : file 'inoc' error code: 173, pc=0, call=1, seg=0 173 Called program file not found in drive/directory Resolution: For Server Express on HP Itanium it is now necessary to set the LD_LIBRARY_PATH. LD_LIBARY_PATH=$COBDIR/lib export COBDIR This resolves the problem Old KB# 2176
Problem: When publishing Cobsql applications to UNIX, even if the Oracle environment is set up within the users' .login/.profile etc., this may not get picked up correctly by the remote command. This will lead to Cobsql attempting to invoke procob18, rather than procob, which will either fail (if Pro*COBOL 1.8.xxx was not installed), or invoke the wrong precompiler. Resolution: In order to resolve this, follow the instructions documented in the UNIX Option User's Guide appendix on publishing Cobsql applications. Copy the created Makefile to CSQLMakefile, then to add to the entries which create mfenv.sh : mfenv.sh: @echo "#!/bin/sh" > mfenv.sh @echo "ORACLE_HOME=MY_ORACLE_HOME" >> mfenv.sh @echo "export ORACLE_HOME" >> mfenv.sh &n
Problem: Which version of Server Express will be comatible with RedHat Enterprise 5.0? Resolution: Later in 2007 Server Express 5.1 should support this version of RedHat. Old KB# 2171
Problem: A JCL Job ends before completion with no errors after going through a User Exit or Printer Exit. Resolution: Do not code a STOP RUN statement in the exit program, use GOBACK instead. Old KB# 2137
Problem: I understand that Server Express v2.2 is an older version, and that the current version is SX v5.0, but when is the end-of-service date for SX v 2.2? Resolution: Here is a link to a chart showing end-of-service dates for Micro Focus UNIX products: http://www.microfocus.com/products/Withdrawal/UNIXDisDev.asp SX v2.2 has been beyond end-of-service since Dec 31, 2005. This information was current as of August 2007. The Micro Focus web page may evolve over the years, the above link may not remain accurate. In that case, use the search feature on the main Micro Focus web page, and specify search words such as "sundown" or "end of service" to locate the information. Old KB# 2230
Problem: If web service is running on IIS 5, Return-code 0014 can be returned if the data format used by the server is not understood. Resolution: This is due to IIS sometimes sending "chuncked" data. This is fixed for Net Express 5.0 WS3 and Server Express WS3. There is also a hotfix for Server Express WS1 on HP-UX (Fixpack 50.02_16). Old KB# 2161
Problem: By just trying to execute "cob tictac.cbl" the error 1504-S appears. Resolution: You should have pemisions on the $COBDIR directory else the object file cannot be created. Setting this correctly and the error disappears. Old KB# 2188
Problem: Does Micro Focus support Clear Case for version management? Resolution: Currently the only way it is supported is via the Net Express IDE. However it is anticipated this to be supported in the future with the eclipse support for Windows and UNIX Old KB# 2175
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.