Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Which compiler flag should I use in order to have the objects to be created in a directory other than the current one? 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 tictac.gnt file to be written to the /tmp/testxx directory. Old KB# 4522
Problem: If the database connection criteria is being passed to Pro*COBOL via a compiler directive, is there a way to prevent this from being displayed on the console? Note the line: * CSQL-I-005: Passing userid=abcd/wxyz@INST1 to ORACLE Precompiler in the output of a compilation of an Oracle COBOL program.. Resolution: These messages are actually coming from the COBSQL portion of the COBOL compiler * CSQL-I-005: Passing userid=abcd/wxyz@INST1 to ORACLE Precompiler This message is only displayed if the CONFIRM directive is set. Removing the CONFIRM directive should resolve the problem. Old KB# 4517
Problem: The following message is displayed : << *** This script must not be run from inside the product directory. exiting ... >> Resolution: To install a fixpack , it is necessary to create a temporary directory. This directory must not be $COBDIR and, also, must not be a subdirectory of $COBDIR. Old KB# 4529
Problem: Compile step receives I-O error:idy file renamed to .$dy extension Resolution: This error will occur: 1.When the user does not have write permissions on the directory the .idy files are to be written to. 2.If a .idy already exist in the current directory when compile is exeucted and and user does not have write permission and is attempting to create the idy again. Remove any files created from previous compile attempt. Old KB# 4544
Problem: A customer had an application written in C and distributed on HP/UX PA-RISC platforms as shared libraries. This application could be invoked from either C or COBOL by linking the libraries to a C or COBOL main program. The libraries themselves depended on other libraries, and were originally built with -L and -l specifying the dependant libraries. The 32-bit linker in HP/UX PA-RISC remembers -L locations as absolute paths, so at runtime the dependant libraries could be found even if SHLIB_PATH did not include their location. Here is an example: Cmain or COBmain calls sub1 which calls sub2: > cat Cmain.c int main(int argc, char **argv) { sub1(); } > cat COBmain.cbl CALL "sub1". > cat sub1.c int sub1(){ disp_hello(); return(0); } > cat hide/sub2.c int disp_he
Problem: Opening a file in a "MAIN" program and reading its records in another program "SUB" which is called by "MAIN" results in a file status=47 means: "A READ or START operation has been tried on a file not opened INPUT or I-O." Must the file be opened in each program? Resolution: NO! Please specify in the FD the EXTERNAL clause and add this FD to the SELECT in each program which uses the file. BTW: The variables of the FD are external variables and have the same value in each program where specified. The core of the attached 4 files: ------------------------------------ program-id. Sub. copy SEL. copy FD. display "read: " REC(1:20) read MyFile. display "read: " REC(1:20) ---------------------
Problem: The following rebuild results in an error. $ cat F.seq AAAA0001 AAAAAAAAAA AAAA0002 AAAAAAAAAABBBBB AAAA0003 AAAAAAAAAA AAAA0004 AAAAAAAAAADDDDD AAAA0005 AAAAAAAAAA AAAA0006 AAAAAAAAAA1234567890 BBBB0001 BBBBBBBBBBAAAAAA BBBB0002 BBBBBBBBBB BBBB0003 BBBBBBBBBBCCCCCC BBBB0004 BBBBBBBBBB BBBB0005 BBBBBBBBBBEEEEEE $ rebuild --v F.seq,F1.ism -o:lseq,ind -I -k:1 8 -r:v20-30 RBD 102.14.445 21APR05 File : F1.ism Organization :&
Problem: What are the differents ways of debugging my applications ? Resolution: INTRODUCTION Animator enables you to debug Micro Focus Cobol applications. You can debug all types of application: single-threaded, multi-threaded, with Language C, created in intermediate code file, created in generated code file, callable shared object or system executable code file. This document is to help you to start the debugging. The manual Debugging Guide describes the Animator and debugging. PREPARING FOR ANIMATION To animate the application, you must compile and generate your application with the directives and the options required. The directive of the compilation is ANIM, and the option of the generation is g. By default, the directive ANIM is setting. When a program is compiled or generated to be animated, the file with name of the program as basename is created with the extension .idy. This file contains additional information required by Animator.
Problem: An application moved cursor focus to a group field when pressing a specific key. i.e. to the index 9 in an array of 12. This apparently worked OK on a pre 4.0 version of OCDS but not on Server Express. Resolution: The dialog (local code associated with a panel) pertaining to the group field TOGGLE is shown below. This is the field to jump to when pressing END (that doesn't work). It's a 12 member array of 7 bytes, the application jumps to index 9. PANEL GROUP PRE-GRP VERTICAL LINE 13 COLUMN 59 HEIGHT 9 WIDTH 7 TYPE DATA ACC-EXIT BAR SELECT BAR LENGTH 7 &n
Problem: How to 'OPEN EXTEND' a Line Sequential file in shared mode? "shared mode" meaning than more processes will be able to open the same Line Sequential at the same time. This KB applies to Server Express and Net Express. Resolution: Just add in the SELECT clause the LOCK MODE clause, as pasted and attached below IDENTIFICATION DIVISION. PROGRAM-ID. wfilsEXT. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION.
Problem: A customer reported a problem that after upgrading from OCDS 4.1.40 to SX 4.0 SP2, the application which writes to a line sequential file the records couldn't be seen - it's as if the buffer on the file is far too big. In this particular problem a number of MQ interface programs write to logfiles. These interfaces allow the application to communicate with other systems on other servers. The interface programs are running in the background all day long and the only way to see if they are active/working is to check the logfiles which are updated every 15 seconds. On OCDS this worked, viz. the files got updated regularly. However with SX the logfiles are not being updated directly and it can be 30 minutes before the physical file is updated - which sounds like stuff is still in the buffer. Is there a way to get the old functionality back? I looked at SEQDATBUF, but the default is 4096, and the SX 5.0 docs say that the *minimum* is 4096, so I can't see a way of dro
Problem: EXEC SQL INCLUDE table1 END-EXEC The copy is in the current directory as "table1.cpy" but the compiler appears as if it looking for "TABLE1.cpy" (converts to UPPERCASE in the inverse way as SQLCA). Resolution: The problem is that UNIX is case sensitive and the only way to get round this problem is either to manually change the names to upper/lower case but that would be unfeasible if there are 100s of programs involved. Another way and much easier is to use the compiler directive FOLD-CALL-NAME or FOLDCALLNAME respectively. Both are the same and allow lower and/or upper case letters. Old KB# 4510
Problem: Compiling an XML program result in many error messages, which start with: 6 organization is XML * 131-S**************************************** ** ** Unrecognized phrase in SELECT clause Resolution: 1. The XML-preprocessor has to be used to compile the program: $set p(prexml) endp MF COBOL versions before Server Express 4.0 or Net Express 4.0 cannot compile this program. Hint: you can review the XML-preprocessor output by adding the o(filename) option, e.g. $set p(prexml) o(ppoutput.cob) endp to get the output into the file ppoutput.cob 2. If
Problem: Call of the "make all" (Make-File see below) returns the following error: Undefined first referenced symbol in file SQLADR sample1.o SQLBEX sample1.o SQLADRVC sample1.o ld: fatal: Symbol referencing errors. No output written to sample1 make: Fatal error: Command failed for target 'sample1' # # AUTOMATICALLY GENERATED MAKEFILE - DO NOT MODIFY # # Makefile created usin
Problem: According to the documentation indexed files should have a 128 byte file header and a record header. A customer sent us a demo converting an line sequential file to an index file which had no header. Resolution: There is always a header in the index portion of the file (assuming the file is not IDX-8) The 128 byte header referred to in the File Structure docs is in the data portion and only in MF format files. C-ISAM files do not have a header in the data portion. Changing the demo to create the output file as variable length altered the output file to include a header. Running rebuild -f on the file shows it to be MF format IDX-3. Running the rebuild -f on the original file showed that it was c-isam where the data portion is just a fixed length text file. Old KB# 4493#netexpress#AcuCobol#RMCOBOL#COBOL#ServerExpress
Problem: A customer had a routine that used libcurses for screen handling. When this was called from Animator, the application crashed out of animator, displaying the command line prompt, locking up the session and leaving a looping "rts32" process. Resolution: This is actually a complex area. The libcurses routine does not work correctly if anything else changes the screen (without notifying it). curses works by keeping an internal representation of the screen contents, cursor position, etc. When the program asks curses to change what's on the screen (or, more precisely, when it wants to change anything about the state of the tty), curses computes a hopefully optimal set of control codes (based on the tty description in termcap/terminfo) and display characters and sends that to stdout. If anything else has changed anything about the tty state, curses' internal representation will be wrong, so the commands it sends to the tty will be wr
Problem: Error occurs on Solaris 10 with Java 1.4.2 Trying to run cobjrun: Sorry unable to load libcobjvm_java2 If libcobjvm_java2 is on shared library PATH, then ensure 'libjava' and 'java' are found on the PATH/Shared Library PATH. Resolution: This was caused by a problem with the LD_LIBRARY_PATH related to Java 1.4.2_X: First export JAVA_HOME to point to the Java directory. Then run the Server Express COBOL/Java setup utility. $COBDIR/bin/cobsje -v This resolves the problem. Old KB# 4506
Problem: A particular application allocates memory dynamically. The only access to the data is via a pointer in working-storage. There is no direct way to inspect the data values at the dynamic location. Resolution: Following is a small Cobol program which illustrates the solution. data division. working-storage section. * Data to be inspected -- statically allocated to simplify the demo, but * referenced only by a pointer. 01 data-of-interest pic x(50) value 'This is interesting data.'. 01 pointer-to-interest pointer.
Problem: What is UTF-8? Does Server Express support UTF-8 or UTF-16 format Resolution: What is utf-8? UTF-8 is the Unicode Transformation Format-8. The "Uni" part of "Unicode" comes from "Universal", so it is not only for the English language. Unicode can be used in several formats. In particular, UTF-8 is the one used by default by XML because it is the most complete code without increasing the size of the file too much. It is variable and the number of bytes used to represent a character depends on in which part of the Unicode table the character is. The 8 part of UTF-8 is sometimes misleading, as you could tend to think that all characters are represented with 8 bits, but that is not the case... UTF-8 uses 1 byte only with characters within the ASCII code (only the first 7 bits) and that makes it compatible with ASCII. It is the only UNICODE encoding that is compat
Problem: How to increase filesizes with the use of IDXFORMAT-8 in a COBOL Program, rather then using rebuild. Also how to get file sizes for individual files rather than all of the files available in a program. Resolution: The program will look something like this: $SET IDXFORMAT"8" IDENTIFICATION DIVISION. PROGRAM-ID. P4010. .............. Etc.
Problem: Customer compiles via a script and would like to interpret the codes returned by 'cob' so they can act on a failure. The example below fails with Error "1007-E" and returns 12 ($?) 01 x pic x(2) value "xxxx". procedure division. display 'xx=' xx. stop run. script.sh cob -v -C WARNING=1 $1 rc=$? echo RC=$rc Resolution: The return value from the checker depends upon the most serious error returned. Fatal (aka unrecoverable) errors are 16, severe 12, error is 8, warnings are 4 and info is 2. No messages gives 0. The checker directives change-message, info-return and warning are relevant. If the checker returns a value >= a threshold value, set by cob -W and defaulting to 12 (SEVERE), then cob stops and returns this value. Otherwise cob proceeds with the next compilation/generation/link, or returns 0 if there is no more work. If the ncg returns any non-zero status then cob ret
Problem: I have migrated my screenset from Windows onto RedHat Linux, and it doesn't display correctly, but it looks fine on AIX. What is the problem? Resolution: The problem was that the customer was using the LANG default of en_US.UTF-8. Unfortunately, character-based Dialog System does not support Unicode, so the colours are displayed incorrectly. Changing the LANG setting to en_US enabled the screen to display correctly. Old KB# 4500
Problem: In trying to use the imtkmake, and a 115 error occurs: [root@LinuxMTO mapdemo]# imtkmake -defmap src=book.cbl service=wmapserv type=webservice -generate Micro Focus Interface Mapping Toolkit v1.0.00 Copyright (C) 2004 Micro Focus International Ltd. All rights reserved. Execution error : file '' error code: 115, pc=0, call=1, seg=0 115 Unexpected signal (Signal 6) [root@LinuxMTO mapdemo]# imtkmake -defmap src=book.cbl service=wmapserv type=webservice Micro Focus Interface Mapping Toolkit v1.0.00 Copyright (C) 2004 Micro Focus International Ltd. All rights reserved. Execution error : file '' error code: 115, pc=0, call=1, seg=0 115 Unexpected signal (Signal 6) [root@LinuxMTO mapdemo]# Resolution: For some reason the installation of Server Express wasn't correct and after a reinstall of the product this error disappeared and the deployment worked fine.
Problem: Using Server Express, when a record is read with lock and within the same process another attempt is made to read the same record, file status code 9/068 will be returned. This behaviour did not occur in Object Cobol Developer Suite. This would typically occur where a program reads a record with lock, then calls a sub program. Sub program attempts to read the same record which results in record lock condition. When using Object Cobol this behavior did not occur and file status of '00' is returned. Resolution: In order for Server Express to behave like Object Cobol , set the following run time tunable: Note: The default is different in this tunable. intra_process_record_locking=FALSE In the Runtime Configuration Manual under Runtime Tunables : intra_process_record_locking Specifies whether the run-time system can share a file and set record locks against a file within a process. Syntax: >>-----set intra_process_record_locking=---.
Problem: A customer migrating from the mainframe found that some of his programs were failing with the above error during execution. This was due to PERFORM VARYING statements where the subscript either started at zero, or went past the highest value in a table (e.g. went to 11 when the OCCURS was 10). Whilst he appreciated that such programming practices might be considered unsatisfactory, it was important that the programs should run, unmodified, on the new UNIX platform. Resolution: The compiler directive NOBOUND stops the automatic checking of subscripts at runtime (the default is BOUND). If you are building to generated code, you should also look at the NOBOUNDOPT directve, though using this may impact performance. Old KB# 4538
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.