Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: What is the syntaxe to use cobsje Resolution: With Server Express 4.0SP2 and Server Express 5.0 ( by default) . $COBDIR/bin/cobsje -v -J <Java_Home> If you run the command chmod x $COBDIR/bin/cobsje you can use : $COBDIR/bin/cobsje -v -J <Java_Home> With Server Express 5.0WS3 and 5.0WS4 ( by default) $COBDIR/bin/cobsje -v -J <Java_Home> Old KB# 2284
Problem: How to install Server Express when no CDROM drive is on the computer Resolution: If your UNIX or Linux system does not have a CD or DVD drive, you can install the product by mounting the appropriate disc on another machine, transferring the product to your machine, then running the install. The instructions below take you through this procedure. Before you start, make sure you have enough disk space for the product. The space needed is the same as the size of the tar files you use. (See step 2 below.) In addition, you need the same amount of temporary space to store the tar files. Mount the CD or DVD on the target machine. Look at the file v5000.txt. This lists the directory names and the products those directories contain. It also shows the sizes of the tar files. Change to the directory containing the product you want to install. Most of the products are stored as compressed tar files with filenames in the format vabccppp.trz, where abcc r
Problem: In the past, on Suse and Red Hat Linux, MQ series did not support interoperability with MF COBOL, so Micro Focus provided to some customers (as a special case), two .gnts and a .so (named MQCONN.gnt, MQCONNX.gnt, and mfmqsup.so), consisting of routines that map MQ calls within COBOL (for example MQOPEN, MQGET, etc.) onto the C support within MQ, as a way of facilitating interoperability between Server Express and MQ Series. A customer had been using these files successfully, but when this customer upgraded from SX v5.0 to SX v5.0 WP4 (i.e. they installed WP4), they began receiving an MQ error: reason 2012 calll not valid for current environment MQRC_ENVIRONMENT_ERROR Resolution: In the past, modules named MQCONN.gnt and MQCONNX.gnt were not supplied with Server Express, but beginning with WP4 for SX v5.0, they are supplied as part of the "Enter
Problem: Is it to set a break on data change in Server Express? Setting a break on data change can be done in Net Express. In Net Express, the following is done to set a "break on data change": - starting animating - find the field you want to set the "break on data change" - double-click the field to bring up the Examine List - click "monitor" - right click on the monitor window and select the option "Break on change value" - this shows 3 options 1) Hex 2) Break on change value 3) Query List - when "Break on change value" is selected, the monitor window has a stop sign Is there a way in Server Express to take a screen capture of the 3 options available? Resolution: This functionality is not available in Server Express. The capability may be available in a future release of the Eclipse IDE plug-in for Server Express but will not be implemented in the character animat
Problem: There are two methods of starting a COBOL CGI application, one popular method is to cretae a shell script which is invoked by the httpd web server. The subject of this document is how to debug the COBOL application which is ececuted from within this shell script. Resolution: The first requirement is that the application program(s) must be compiled for animation. This is accomplished through flags or options specified at compile time. For .int programs the flag is '-a' for .gnt, callable shared objects, or UNIX executables the flag is '-g'. All httpd web servers run under a user-id specified in the web server configuration by the server administrator. CGI scripts or programs loaded/invoked by the web server run under this same user-id. For example the administrator might set up the server so that it runs under the user-id of 'wwwrun'. All processes run by the web server will be owned by 'wwwrun'
Problem: 'fuser' is a standard UNIX command which displays the PIDs of processes using the specified files or file systems. In the default display mode, each file name is followed by a letter denoting the type of access: c current directory. e executable being run. f open file. f is omitted in default display mode. r root directory. m  
Problem: STABLE or NO STABLE is an option of SYNCSORT utility EQUALS or NO EQUALS is an option of DFSORT utility DFSORT allows the user to set "option EQUALS=NO" or "option EQUALS=YES" to determine whether or not equal-key records should appear in sorted order or the order in which they are found. EQUALS tells the process to preserve the original order of the data within the "sort keys". If EQUALS is not specified, the order of the data will be unpredictable beyond the specified keys. Does MFSORT give the user this same option? Resolution: By virtue of the tree-based implementation used in MFSORT, duplicate records are returned in the order in which they were found in the input file. Unlike perhaps the DFSORT or SYNCSORT implementations in this regard, there is no overhead in producing the output in this way. This behavior cannot be changed. Duplicates are returned in order. The order in which yo
Problem: My table has a number of occurrences that is variable. Is it possible to manage this table dynamically ? Resolution: The example is : The table is managed dynamically The table is sort IDENTIFICATION DIVISION. PROGRAM-ID. PROG. WORKING-STORAGE SECTION. 01 TABLE-DYNAMIQUE IS TYPEDEF. 10 LI-AIDE-TABLE-CLEF PIC X(10). 10 LI-AIDE-TABLE-INDEX PIC 9(05). 10 LI-AIDE-TABLE-AFFICH &nbs
Problem: Within the general subject of multi-threaded COBOL programming, the distinction between "local-storage" and "thread-local storage" may not be clear. This Knowledgebase article illustrates the difference, with an explanation and example source code. Resolution: In the documentation for both Server Express and Net Express, there is a book named "Multi-threaded programming", where this subject is generally covered. The documentation says thread-local storage is "persistent across calls". This means you can call a single individual COBOL program repeatedly within the same thread, and it will "maintain state" across calls, that is, it will remember the values in its thread-local storage from the last time it was called in that thread. Local-storage is different, because local-storage is initialized each time a program is entered (that is, values from previous calls are not remembered). The
Problem: The error manual states: You are trying to open a file which you previously closed with lock, which violates one of the general rules of COBOL programming. Resolution: This error can be caused when the UNIX system runs out of file descriptors. When a program opens a file, the operating system returns a corresponding file descriptor that the program refers to in order to process the file. The command "ulimit -a" displays the current system limits. Example: $>ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 8192 coredump(blocks) 0 nofiles(descriptors) 256 vmemory(kbytes) unlimited In the example above, the system lim
Problem: This KB has the same aim than the KB No. 25663. (http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=25663). ===== The demonstration is attached. Customer need: C calling COBOL AND redirect COBOL STDOUT AND retrieve COBOL STDOUT in the C code which has called a COBOL shared library ===== The main difference is that C code in KB 25663 uses C primitives dlopen & dlsym & dlcose when C code in this KB uses MF "C Functions for Calling COBOL" which makes the C code to be simpler and more portable. Another thing here is that the Cobol Shared library is loaded 3 times and cancelled every time is has been loaded, just to show that the cobcancel function & cobfunc functions CANCEL the shared library ( see in LOG file the comment "BEGIN CobolFunc Vn" n being equal to 0 or 1 or 2) ( the Cobol Shared library was relinked every time before to be called again) Resolution: The demonstration : The
Problem: The demonstration is attached. ==== Customer need: C calling COBOL AND redirect COBOL STDOUT AND retrieve COBOL STDOUT in the C code which has called a COBOL shared library ==== The C code here uses C primitives dlopen & dlsym & dlclose.... It's better to use MF "C Functions for Calling COBOL" which makes the C code to be simpler and more portable. see KB 25667 which uses MF cobcall & cobcancel & cobfunc (http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=25667) Resolution: The demonstration : The C code CCobStdout.c ...>Sets en environnent variable (setenv primitive) ...>Gets the content of this environment variable (getenv primitive) ...>Loads a COBOL shared library (dlopen primitive) ...>Finds the location of a Cobol function (dlsym primitive) ...>Calls the COBOL function
Problem: Should COBOL programs become hung for some reason, the Micro Focus debugging tool named Fault Finder, and also a stack trace obtained from the UNIX system debugger, are helpful in debugging the problem. Resolution: Fault Finder is explained in the Server Express documentation, available on the Micro Focus web site. Start at: http://supportline.microfocus.com then select "Documentation", then select a version of Server Express. From there, click "Debugging Guide", then "Fault Finder". To collect Fault Finder output, first make sure the Micro Focus runtime tunable "faultfind_level=20" is specified. Runtime tunables are specified in a "runtime configuration file". As explained in the Server Express documentation, a run-time configuration file is a text file you can edit with a standard text editor. It is an optional file (no error will be issued if it doe
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
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: Sample demonstration which uses: >> a File Share Server on Windows side, This File Share server using a 'Virtual File Handler' thru the use of the FS Server /ap option for files having to ne printed on the winfows default printer >> a File Share client on UNIX or Windows side ( both work ), File Share client which writes on the FS server described above to print on the windows default printer Resolution: 1) Environnent On Windows Net Express ( Test was done with NE 5.0 Websync4 ) On Unix Server Express 5.0 ( Test was done with SE 5.0 Websync4 ) Acronym used: FS = File Share 2) Launching of the demonstration Unzip the demonstration on a Working directory 21) Launch File Share Server on windows Launch FSDB.bat from a Net Express command prompt 22) Launch FS client on Windows Open the Net Express project Cont
Problem: The compile works, link fails with ld: Can't find library or mismatched ABI for -llibrt.so Modified the LD_LIBRARY_PATH, but it still fails. Resolution: The default linker search path can be modified by using the LPATH environment variable. This environment variable allows you to specify which directories ld should search. If LPATH is not set, ld searches the default directory /usr/lib. If LPATH is set, ld searches only the directories specified in LPATH; the default directories are not searched unless they are specified in LPATH. If set, LPATH should contain a list of colon-separated directory path names ld should search In this case LPATH was set to /usr/lib. Changed it to the /usr/lib/ hpux64 on the ia64 HP/UX server and the link works fine Old KB# 2282
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: A project is created using Net Express which includes map files like: map-name.bms. When the project is rebuilt, a map-name.mod is generated, the map executable. When the project is published to Unix it is not possible to capitalize the names of .mod files because they do not appear in the list of files to be published. The .bms files are published and compiled on Unix, genetating .mod files, with the extention in lower case. When the CICS application is requested to run it searches for .MOD files instead of .mod files and to have the CICS application working, you need to rename manually all of the .mod files to .MOD, for every project, or after any publishing. Resolution: The publish setup gives in the tab [Server], button Settings, tab [PostBuild], the option to type the name of a script that should run after the publishing proccess ends, and you can write a script in the project's directory on Unix to change to upper case, all files
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: Demo - print flow of data from Unix on Default Printer of a Windows PC thru File Share ======= This KB is the next step of the KB 25059 http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=25059 Which implements the STEP 5) of this KB === 5) Regards to the File Handler called by FS server thru the use of the /ap parameter Another scenario, could be, On the File Handler order 'OPEN OUTPUT' I use a MF PC_PRINTER_OPEN On the File Handler order 'WRITE' I use a MF PC_PRINTER_WRITE On the File Handler order 'CLOSE' I use a MF PC_PRINTER_CLOSE === ======= On File Share Server side (WINDOWS) The File Handler invoked by File Share thru the use of the /ap parameter is named here mymffhPCPR Depending on the existence of a CONSTANT named SaveOfTheFilePrinted If Exists: Il will SAVE on FS Server side (Windows) the 'Data stream' received thru File Share And will print the 'Data stream'
Problem: Sample message: ld: warning: file /opt/lib/cobol/lib/libcobrts.so: section .dynsym: symbol [25]: global symbol has no name Resolution: This error occurs because Server Express is being used on an operating system with a C compiler that is newer than the version it was developed on. To see the Reference Environment for the Server Express that it installed see the file $COBDIR/docs/env.txt. It will list the C Compiler used when Server Express was developed. For instance: C Compiler ---------- cc Forte Developer 7 C 5.4 2002/03/09 This will be followed by the command to be executed on the current machine to see which C Compiler is installed locally: cc -V 2>&1 |cut -c5-80|head -1 If these do not match that would cause this kind of error. In this case because it is only a warning, the messages can be safely ignored. Old KB# 2326
Problem: Results of arithmentic operations are different between INT and GNT code forms Resolution: One of the things that can cause these differnces is the presence of an undetected overflow condition , otherwise known as a size error. That is the executiion of a computation or arithmentic operation is producing a result to large for the receiveing data item. To detect this condition add the ON SIZE ERROR clause to the COBOL statement - If the size error occurs, modify the size of the receiving data item. Old KB# 2344
Problem: Results differ when running INT code versus GNT. Resolution: One thing that can cause differing results is the presence and use of an invalid numeric item in a computation. Sometimes programmers find it convient to execute INT programs using the -F runtime switch, this diaables error reporting for unitialized or otherwise invalid numneric data. In GNT code the default behavior is to assume that all numeric items contain valid data, there is no error checking enabled. This can cause the results of computations or arthmetic operations to differ from the results observed in INT code. To enable error reporting for GNT code, compile the the program using the NUMCHECK compiler directive, this will cause an error when invaid numeric data is encountered Old KB# 2343
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
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.