Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: The file data was translated from EBCDIC to ASCII. From the application it is necessary that this file is sorted in EBCDIC order. Resolution: To sort in EBCDIC order , it is necessary to use the SORT-EBCDIC instruction. This instruction must be before all use and give instructions. The example is : sort fields ( 1, 4 , ch , a ) SORT-EBCDIC give FICHIER2 record(f:40) org ls use F1 record(f:40) Old KB# 2249#netexpress#COBOL#ServerExpress#RMCOBOL
Problem: Why isn't the sign displayed for a signed COMP-3 field (PIC S9V99) when executing a COBOL program that has been compiled using mainframe dialect directives (VSC2)? Resolution: Recently, the product functionality has been modified. When emulating mainframe dialects, the sign is no longer displayed when specifying a signed COMP-3 field. The change was made to align Micro Focus for improved mainframe emulation. Old KB# 2315
Problem: Error occurs trying to compile under sde (Server Express Integrated Development Environment) Compile works fine from the command line. enter sde, load the file and choose "F2 Compile" a message is displayed at the bottom of the window: DIRECT: Memory allocation failed Resolution: During compile under sde Micro Focus tries to allocate some work files in the background. The error "DIRECT: memory allocation failed" may occur if the user's umask is incorrect. Set umask=022 to avoid this error. Old KB# 2302
Problem: In some circumstances, such as no connection to a database, the SQLCODE returned from Oracle is zero even though the SQL statement was not successful. Resolution: Using the CP pre-processor with the Pro*COBOL MODE=ANSI option can cause this problem and is caused by the expansion of the INCLUDE SQLCA statement by the CP pre-processor before the expanded code is submitted to the Pro*COBOL pre-processor. Problem can be resolved by using the SY option with the CP pre-processor which prevents the CP pre-processor from expanding the SQLCA. Please refer to the COBSQL section of the Database Access manual for more information on the CP pre-processor and the SY directive. Old KB# 2294
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: The CHANGE-MESSAGE directive is used to hide or change the severity of an checker errorss or messages. This directive takes multiple options, so getting the right syntax can be tricky. This directive replaces the HIDE-MESSAGE directive Resolution: There are 3 ways of setting this directive: 1. cob command line: -C "change-message(1146 N)" 2. Create a cobol.dir file. The checker will check to see if there is a cobol.dir file in the current directory: change-message"1146 N" 3. Use the $SET in the COBOL program - starting in column 7: $SET CHANGE-MESSAGE(1146 N) Old KB# 2251
Problem: cob -z on tictac.cbl produces an unsupported format .so file Resolution: You need to do like this sample: cob -ze "" aaa.cbl bbb.cbl ccc.cbl -o abc.so Now you can call abc.so with cobrun or from the main program by INITCALL. Old KB# 2319
Problem: * 801-S************ ( 0)** ** External Compiler Module message ** ES0103 INT-COL does not have a suitable definition to be used as a ** host variable. What does this message mean ? Resolution: The field INT-COL is not defined as a SQL Data Type (ODBC) ; If INT-COL is defined as COMP-3 numeric field , it must be signed Old KB# 2375
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: In my application , the Display verbs are described with color clause , but all screens are displayed without colors Resolution: Cobol system uses Unix terminfo database. So the terminfo entry ( $TERM )must be defined with the colors entries. The example is for vt220 & xterm . Attachments: colour.tar Old KB# 2329
Problem: The following message is displayed : as -o /tmp/cob1HMaUa/ldtab.o /tmp/cob1HMaUa/ldtab.s Assembler : /tmp/cob1HMaUa/ldtab.s: line 7 : 1252-191 .llong should be used for relocatable expressions. cob32: error(s) in assembling /tmp/cob1HMaUa/ldtab.s Resolution: As as command is defined for 64bits mode , it is not possible to assemble a file that is created in 32bits . It is necessary to setting OBJECT_MODE=32 before compile the program. Old KB# 2361
Problem: Is it possible to force a program to be reloadedupdate with a shell command ? Resolution: The option -n of the command castran can be used to replace the CICS transaction CPMT NEWCOPY The documentation file of this command is attached. This file is come from Server Express 5.0WS4 Attachments: rhcomm25.htm Old KB# 2292
Problem: Browser displays HTTP:500 - The website cannot display the page when submitting a form and running a script in cgi-bin. (8)Exec format error logged in $ErrorLog/error_log Resolution: This happens because Apache expects to run an executable and finds a script. You need to add a #! to the top of the script to tell UNIX to execute that script using the interpreter specified. for example: #! /bin/sh Old KB# 2265
Problem: When compiling with Server Express 5.0 on HP/UX Itanium 11.31 you may encounter the following warning message: cobAAA027397/ldtab.s:92: warning 4018: invalid size This article explains the reason why the message is returned. Effectively, however, the warning can simply be ignored. It should be fixed in Server Express 5.1 which is currently scheduled for mid-2008. Resolution: Originally HP's assembler contained a bug; a certain size was documented as being in words whilst in practice it had to specified in bytes. In version 11.31 HP fixed this bug but it did unfortunately introduce a problem of incompatability, thus, causing the warning message. In Server Express 5.1 the code wiill be changed so as to work with both assemblers. Old KB# 2281
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: 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: Error returned by Apache server when attempting to run a COBOL application error while loading shared libraries: libcobrts.so: cannot open shared object file: No such file or directory; Premature end of script headers: myapp Resolution: The error is returned because the path to the Cobol libraries was not set at the time Apache attempted to run the program. If you are not using the cobrun triggers - run the app from a script that sets the environment. #! /bin/sh COBDIR=/MyCobolDirectory PATH=$COBDIR/bin:$PATH LD_LIBRARY_PATH=$COBDIR/lib:$LD_LIBRARY_PATH export COBPATH COBDIR PATH LD_LIBRARY_PATH cobrun mycgiapp $* Then run the script from your input form: <FORM ACTION="/cgi-bin/runapp"> Old KB# 2264
Problem: Using COBSQL on a 64-bit platform fails when working in 32-bit mode. Investigations revealed that procob32 was missing from $ORACLE_HOME/bin. Resolution: This is an Oracle issue. Further details can be found on the Oracle Metalink site under document id 458640.1. To resolve the problem you should: 1.Download patch 5887582 2.Place the file spcbd.o in $ORACLE_HOME/precomp/lib32 directory 3.Relink the procob32 using $ make -f ins_precomp.mk procob32 (OR) Apply patch 4757588 on top of Oracle 10g 10.2.0.3 Old KB# 2357
Problem: I would like to check the length of the source and of the target for alphanumeric Move operation Resolution: The compiler directive MOVE-LEN-CHECK ( or MOVELENCHECK) check the lengths . This directive must be used with the directive WARNING that is validated to 2 or 3. Example : -C MOVELENCHECK -C WARNING=3 At the begin of the module : 123456$SET MOVELENCHECK WARNING(3) Old KB# 2312
Problem: In the cobol program the GOBACK statement is followed by a number. When the GOBACK statement is executed the value is not returned. How can this value be returned and displayed? Program contains GOBACK 3. Resolution: You must use RETURNING cob -xav goback2.cbl ./goback2 echo $? IDENTIFICATION DIVISION. PROGRAM-ID. GOBACK2. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. PROCEDURE DIVISION. FIRST-PARA. DISPLAY "This program is just to test GOBACK " "RETURNING 3" GOBACK RETURNING 3. Then run unix script or enter command echo $? Old KB# 2336
Problem: When you need the option of being able to change the order and count of directories/paths where Shared Objects of COBOL programs are located, you might expect that this should be tunable inside the running process with setenv. But changing the COBPATH environment variable in the running process with setenv has no effect to the Cobol run time. It seems that COBPATH is only once read at the process start. How can one change the directories/paths, where the run time searches for the shared object that was called at realtime? Resolution: id division. program-id. TEST1. data division. working-storage section. procedure division. DISPLAY "CALLING SETPATH" &n
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: When installing Server Express v5.0 on LINUX the following error occurs: "bin/cobconvstrtest: error while loading shared libraries: libstdc .so.6: cannot open shared object file: No such file or directory" This error message occurs when the target machine is setup to run only as 64-bit. That is, the target machine does not have the gcc 32-bit installed. The Server Express V5.0 product for LINUX is a dual mode product it supports both 32 bit and 64 COBOL applications. The Install script is searching for the 32 bit gcc libraries. During installation of Server Express v5.0 the installat script looks for libstdc .so.6 in /usr/lib. If the operating system on the target machine is 64-bit only, then the 64-bit gcc (libstdc .so.6) is installed in /usr/lib64 and the 32-bit libraries are not installed. Resolution: The resolution is to download and install the 32-bit version of gcc. The
Problem: Using the DISPLAY verb in a CGI program gives an Interrnal Server Error 500 when deployed using the Apache web server, however the same DISPLAY works fine with other web servers such as Solo. Resolution: The problem is with the way that Apache works rather than Server Express. The following can be found on the Apache website: http://httpd.apache.org/docs/2.2/howto/cgi.html#writing -----------> There are two main differences between "regular'' programming, and CGI programming. First, all output from your CGI program must be preceded by a MIME-type header. This is HTTP header that tells the client what sort of content it is receiving. Most of the time, this will look like: Content-type: text/html Secondly, your output needs to be in HTML, or some other format that a browser will be able to display. Most of the time, this will be HTML, but occasionally you might write a CGI program that outputs a gif image, or oth
Problem: demonstration is attached. It contains I) ================== firts a COBOL code, named pipeCob.cbl, which uses UNIX primitives: pipe & write and read and close To WRITE in a pipe & READ from the pipe II) ================== A C code named pipeCob.c which ....creates a pipe ....calls COBOL ( CobolWrtPipe.cbl) ) passing to COBOL the pipe File descriptor ... .. .. the Cobol Function writes in the pipe ... Back in C code, the C code, thru the use of the read function, reads the content of the pipe filled by the COBOL function above Resolution: I) ================== Sample Cobol code which uses UNIX primitives pipe & write & read & close to I-O on a pipes Cob -x pipecob.cbl pipeCob.cbl WORKING-STORAGE SECTION. 01 int pic s9(9) comp-5 is typedef. 01 fildes. &nb
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.