Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: Customer has an IBM AIX machine with MQ Series. Request for help, linking MQ Series for AIX with Server Express. Resolution: Kb article 17817 talks about creating stand-alone programs and shared objects which include the MQ libraries. With a little adaptation it is possible to build an RTS that includes MQ support. The way to do this is as follows: 1. Create an 'export' file to make the MQ series entry point visible. This should include all of the MQ entry points used by your application. Example: echo "MQCONN" >mq.exp echo "MQOPEN" >> mq.exp echo "MQCLOSE" >> mq.exp echo "MQGET" >> mq.exp echo "MQCMIT" >> mq.exp echo "MQPUT" >> mq.exp echo "MQDISC" >> mq.exp 2. Create the run-time using the following cob command: cob -xto newrts -e"" -Q -bE:mq.exp -lmqmcb_r
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
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: 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: The following compilation command fails with the error "cob64: warning: -u overrides -x" cob -x -L/u01/oracle/db/10.2.0/lib/ -L/usr/shlib /u01/oracle/db/10.2.0/precomp/lib/cobsqlintf.o \\ -lclntsh -lnbeq10 -lnhost10 -lnus10 -lnldap10 -lldapclnt10 \\ -lnsslb10 -lntcp10 -lntcps10 -lnsslb10 -lntcp10 -lntns10 \\ -lkstat -lnsl -lsocket -lgen -ldl -lsched \\ -R/u01/oracle/db/10.2.0/lib -laio -lposix4 -lm -lthread Resolution: The compilation command is poorly formed, an option is specified which is not supported by the Micro Focus 'cob' command The invalid option is the '-R' - This is an option for the UNIX link editior, When 'cob' parses the options the -R is essentially ignored, the next character captured is the 'u' which is meaningful to the cob command but is causing contention with the -x specified earlier in the command line. Resolution and explanation of options used in compile: -u Compiles
Problem: On UNIX the file name default is file-base-name for the data portion aand file-base-name.idx for the index portion of a file. The following explains how to change these default naming converntions. Resolution: In the extfh.cfg configuration file you can specify the option IDXNAMETYPE. The IDXNAMETYPE option specifies the format of the filename type for both the data file and index file,present. if presnet. IDXNAMETYPE={0|1|2} where the parameters specify how the the name of the index file (if present) is derived from that of the data file: 0 By discarding any extension and adding the extension .idx 1 By simply adding the extension .idx 2 Like 1 except that the data file name is modified by adding the extension .dat For example, if the data file name presented to the File Handler is abc.def, the options shown above give the following data and index file names: 0 abc.def and abc.idx
Problem: By default, characters whose hex values are less than X'20' will have a null byte (X'00') inserted before each such character. This allows the Micro Focus file handler to read such characters correctly when the file is read, but it may cause compatiiblity issues with files used by other programs. Resolution: If null suppression is desired, despite possible read issues with the Micro Focus file handler and some other programs, there are four ways to turn off the feature: 1. Use the INSERTNULL=OFF option in the file handler configuration file. See reference manual "File Handling" for details of using a configuration file and the INSERTNULL option. 2. export COBSW=-N. However, if there is an active configuration file with INSERTNULL=ON, the COBSW setting is ignored. 3. Call X'91", function 47. See reference manual "Library Routines", "Alphabetical list of library routines"
Problem: How can locks be ignored on files opened for Input? Resolution: Set the filehandler option IGNORELOCK in the extfh.cfg file. The IGNORELOCK option specifies whether to ignore locks on files open for Input. IGNORELOCK= {ON|OFF} Default: OFF Old KB# 4556
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: 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: When moving a source that contains special characters from a different platform (i.e. Windows, HP...) to Linux you may find that you get compilation errors in those lines. For example the following code: working-storage section. 01 m2 pic x(02) value "m²". PROCEDURE DIVISION. (where the characters in the non-numeric literal are U 006D and U 00B2) could produce the following compilation error: 14 working-storage section. 15 01 m2 pic x(02) value "mý". 16 *1004-E****************************************************************( 0)** ** &
Problem: How does the Dialog export command help me as a developer? Resolution: The export command allows a developer to dump every detail about a dialog screenset. This both helps with debugging and also re-coding. Alt/F10 brings up the export option where a filename.txt file can be designated for output. Pressing the SPACE bar allows you to toggle which components are selected Components Screenset Dets Data Block Error Messages Validations Global Dialog Panels This is followed by a list of panels which can be de-selected by use of SPACE. For debugging, one is usually only interested in a subset of panels. The resultant output is a text file containing every detail of the selected components. This is part of the Global Dialog setion. GLOBAL DIALOG CASE-SENSITIVITY ON EK F1 [RETC ] &nb
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.