Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: When you have say about 3000 ints and 50 users. It can happen that a file in I/O is locked. How can you find out in the runtime who locks the file or which runtime process as you could kill all but that's not very user friendly. Resolution: There is a tool in Server Express which is not documented (yet). It's called 'wholock'. It's quite simple to use: wholock filename dfed filename This opens the file in the data file editor Then use the command: wholock /support/cmc/filename result: Process 15098 (cmc) on tty pts/4 holds 1 read and 1 write locks Old KB# 4528#ServerExpress#RMCOBOL#netexpress#AcuCobol#COBOL
Problem: READY TRACE is set up in an online program. The trace compiler directive was set. When the program executes the trace logging is written directly to the online screen. How can the ready trace output be directed to a physical log file? Resolution: Trace output defaults to standard out. Try setting the OUTDD compiler directive to redirect the file. A simple example would be compile the program with the directive: cob -C OUTDD=SYSOUT myprogram.cbl then establish the desired location for the log file. export SYSOUT=/home/dir/myfile.txt For more information on the OUTDD compiler directive, see the online documentation at: http://supportline.microfocus.com/Documentation/books/sx40sp2/stpubb.htm Old KB# 4542
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 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: Cobol program's being animated using COBSW= A set will not start up in the animator, but will just execute. Resolution: This problem can be caused by the environment variable DISPLAY being set. When the DISPLAY environment variable is set the Server Express product will try to create a new X-Term window for the Animator screen and user interface. If the user is not using an X-Windows session, this operation fails and the Animator screen is never displayed. Ensure that the environment varaible DISPLAY is not set. If DISPLAY is set, unset and then animate. example: echo $DISPLAY DISPLAY="information" unset DISPLAY Old KB# 4516
Problem: When trying to run a Unix script that invokes a Cobol program, it runs fine when manually running it from the shell. So you are able to run the script as the user from a menu. However, when running the script from a cron as the same user it won't work - the error "could not obtain latest contract from popen(3C): No such process" appears. Resolution: The problem here was the "popen" error message seemed to be a generic error message. This particular program had "display" in it - running it in the cron caused the above "popen" error - when commented the displays out the error no longer appeared. It was identified as a Solaris error and they can provide a fix for this. Old KB# 4526
Problem: The RTS error on failure is one which may be caused by an environment variable setting problem, e.g. 173, 211, 114, etc. How to check the environment while running in CGI mode and compare it to the command line environment? Resolution: One good way to compare environments is to run the mfsupport utility from the successful command line environment and from the cgi environment. A comparison of the environment sections of both output files may reveal the problem. However, it is not simple to run mfsupport in the cgi environment. To do the latter, write a small cgi program which contains the following fragments: 01 mfsupport-command-line. 10 mfsupport-command pic x(200) value 'mfsupport > /dev/null 2>&1'. &
Problem: Release 4.0: Server Express install breaks with message libc not found on a Linux System. Resolution: Please ensure that you have the gcc component installed because gcc is not a standard Package for the most Linux Systems and must be installed separately. Old KB# 4559
Problem: Rebuild -f:c63d5 <file-name> returns the followin error: -f:c63d5 <file-name> ^ REBUILD aborted - Invalid option Resolution: This Rebuild validatation command is no longer valid. The correct sytax is: rebuild -f:c9 <file-name> The -f performs a full integrity cheeck on a file, display all possible information The -c Specifies the validation performed. You can select any combination of checks 1, 2 and 8 by adding the appropriate numbers together. (The more checks you perform, the longer the validation takes.) The default is 11. 1 Checks the data file structure and counts the number of records. 2 Checks the structure of the free space list (FSL). 8 Checks the index file structure. 256 Checks the data file structure and counts the number of records with the file open for sharing in another process. You cannot
Problem: A program, including the routine CBL_READ_SCR_CHATTRS, is generated using NetExpress and runs correctly on a Windows platform. However, when porting this application to a UNIX platform under Server Express, the routine no longer works in that it no longer reads the screen attributes (backgound colours) of the screen. Resolution: The problem can be solved by inserting CBL_SCR_SET_PC_ATTRIBUTES at the beginning of the program. Old KB# 4546
Problem: How can I get information about input and output files? Resolution: Rebuild -i <file-name> Displays information about the input and output files, including record lengths, file type and key structure. If you only want to see the information and do not want to perform any other operation, use the -n option instead. Old KB# 4554#COBOL#ServerExpress#netexpress#AcuCobol#RMCOBOL
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: You may be trying to do a very simple rebuild on a small ISAM file but for some reason the command is not finding the input file to be rebuilt (even though it is in the present working directory). You may have been following the suggestions in the manual & it seems like it should work.... Resolution: The first thing to consider is the way the file is named. If it is FILENAME.dat and FILENAME.idx, then you are probably using the IDXNAMETYPE filehandler configuration option. By default, the name of the data portion of the indexed will be exactly as specified in ASSIGN clause in the SELECT statement of the program. Therefore, if the program has ASSIGN "CCSTAT.dat", then the data part of the file would be CCSTAT.dat - however the indexed part of the file would be created as CCSTAT.dat.idx. For you to have the file extensions as you have - CCSTAT.dat and CCSTAT.idx, you probably have the IDXNAMETYPE configuration option set to 2 in the fil
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: 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: 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: The command is cob -z prog.cbl . The Intermediate Code file and the object file are created . The Callable Shared Object file is not created . This message is also displayed if the command is cob -x prog.cbl Resolution: These messages are displayed when the environment variable LIBLIST is validated : If $LIBLIST is validated to a file that has a size to zero : the message is : "cob64: can not execute" If $LIBLIST is validated to a file that does not exist ,the message is : "cob64: error opening: name of the file " If $LIBLIST is validated to a file that exists ,the message is : "cob64: illegal format in name of the file" the file is displayed $LIBLIST specifies an alternative file for Cob to use; you should not use it unless a Micro Focus representative asks you to. Old KB# 4491
Problem: This error has been encountered when running Server Express 4.0 SP2 on AIX 5.3 (64 bit) with Websphere Queue Manager 6.0.1.1. Load error : file 'MQCONN' error code: 173, pc=0, call=1, seg=0 173 Called program file not found in drive/directory Resolution: It is infact a problem with the Technology Level package 5300-04 for AIX 5.3 causing Informix 4GL and SQL products to fail. When you apply Technology Level package 5300-04 on the AIX® 5.3 operating system, 64-bit versions of IBM® Informix® 4GL (and SQL) 7.32 will no longer work. Example $ fglgo -V Could not load program fglgo: $ truss fglgo -V execve("/usr/informix/4gl7
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: Release 4.0: /usr/lib/libc unable to find socket.lib install error check disk space permissions and try again Resolution: If you get this message during the installation of Server Express 4, please make sure that the gcc is installed on your system. Old KB# 4550
Problem: A customer had a script called (say) ggg, and a program (say) ggg.cbl. The script was in a directory pointed at by PATH, and the program was in a directory pointed at by COBPATH. If he typed 'anim ggg', then Animator picked up the script, rather than the program. Why was this? Resolution: Animator can debug .int, .gnt, .so, executables, core files and running processes. So when you type anim nnn the animator will first check to see if 'nnn' is number and, if so, see if it can dynamically attach to a process with that pid. Next, it will search for exes, down $PATH. It that fails, it will search using the standard RTS rules (using $COBPATH and the program_search_order tunable, etc). Finally, it checks to see if it's been asked to debug a core file. In this case, as a script is an executable, it was be picked up first. The ideal solution is not to have s
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: How do you use the h2cpy utility to convert pstat.h to pstat.cpy Output is not aligned correctly with 64 bit application using the following command to create: h2cpy /usr/include/sys/pstat.h -I /usr/include -e lp64 h2cpy /usr/include/sys/pstat.h -I /usr/include -e ilp64 Resolution: The pstat_ functions is used to obtain system and process information. Create pstat.cpy with the following command: h2cpy /usr/include/sys/pstat.h -I /usr/include -D_PSTAT64 It will create pstat.cpy with the following: 01 pst-status is typedef. 02 pst-idx usage l-long. 02 pst-uid usage l-long. 02 pst-pid &n
Problem: There are three ways to determine the number of records in an Indexed file. Resolution: Option 1 - The record count is at offset offset x"40" and is 8 bytes long in the Micro Focus indexed file formats 3,4 and 8, which contains the index. Micro Focus provides a special op code h"0003" to read the header into the record buffer. Refer to the documentation - File Handler, chapter 7.4 Operating Code. Option 2 - The rebuild utility options -n or -f will return the number of records in the file, if the information is present. Option 3 - Calculate the number of records in the Micro Focus ISAM file (format 0) - take the length of the file and divides by the overall record length. This is actually one byte longer than the data record. Old KB# 4558#AcuCobol#RMCOBOL#netexpress#ServerExpress#COBOL
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) ---------------------
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.