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: For ACCEPT FROM ENVIRONMENT-VALUE the COBOL Language reference states: If no previous DISPLAY with a mnemonic-name associated with an ENVIRONMENT-NAME has been performed, or if the specified environment variable does not exist, the imperative statement associated with an ON EXCEPTION phrase is executed. The value in identifier is undefined in this case. ***************** But, what happens when an environment variable has a value of NULL? In Server Express 4.0 the ON EXCEPTION will be executed if the environment variable in not set or if it is set to a NULL value. In OCDS 4.1 for UNIX, the ON EXCEPTION is only executed when an environment variable does not exist. Also, in C the getenv() function can distinguish between an environment which isn't set, an environment variable set to NULL and an environment variable that is set. The following C program shows the possible results: $ cat envtest.c #include <stdio.h> #include <stdlib
Problem: Developing multi-threaded Java application that need to call COBOL programs, then we need the COP Framework. Where can we find the Java COP Jar file, COPClient.jar Best regards, Norton Resolution: The COP framework was never part of Server Express It was a Net Express feature only. 'What is the COP framework'? The COP framework is an add on to Net Express Service pack 1. We have full EJB support in Server Express to interoperate with java, not by using the COP framework. That was created as a temporary measure on Windows until incorporated Enterprise Server and it's EJB support . SX 4.0 and up have the full J2EE support. Since we have released Net Express 4.0 and Enterprise Server we recommend making use of the J2EE interoperability provided by those products. It fully supports the standards and provide an effective contained environment for COBOL to execu
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: Is there a place in a .int file where it shows the compiler directives used? Resolution: There is no direct way to retrieve directives from a .int file. If the .int was compiled with a listing output (.lst file) and the SETTINGS directive was used, the .lst file will contain the directives. The time stamps (ls -l) on the .lst and .int files will be identical or very close in time. That permits the user to infer the directive settings shown in the .lst file were the ones used to compile the .int. Example: cd cp $COBDIR/demo/tictac/tictac.cbl ./ cob -P tictac.cbl -C SETTINGS ls -l tictac.* -rw-r--r-- 1 username usergrp 8739 2006-08-09 15:05 tictac.cbl -rw-r--r-- 1 username usergrp 51968 2006-08-09 15:06 tictac.idy -rw-r--r-- 1 username usergrp 3840 2006-08-09 15:06 tictac.int -rw-r--r-- 1 username usergrp&n
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 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: 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: 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: 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: 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: I can't run the XML tutorial . Cob2xml command can't create files and displays errors about undefined functions . Resolution: Server Express 5.0 is validated with the version 7 of the C compiler . It is necessary to install this version. To verify the version : Login : root lslpp -L vac.C must display the line : vac.C 7.0.0.0 Old KB# 4562
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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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"
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.