Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: If an entry-point stored in .a archive is called from main COBOL program using the ON OVERFLOW or ON EXCEPTION clause, even if the program is linked with the .a archive, the call fails and the ON OVERFLOW clause is executed. If in the same program the same entry-point is called using a simple CALL, it will succeed but the call with the ON OVERFLOW clause will still fail. To reproduce it: $ cat test1.cbl PROCEDURE DIVISION. CALL "HF-TEST02" ON OVERFLOW DISPLAY "OVERFLOW." END-CALL. DISPLAY "Back to the main program.". CALL "HF-TEST02". &nb
Problem: Since installing upgrade to Informix 9.4, ESQL 7.25 Animator no longer recognizes any function keys or keystrokes. rts32 is rebuilt by the Informix scripts Using the original rts32 (shipped with the mfcobol product) the keys funtion correctly, it seems like the new rts32 generated with informix libraries is causing this problem. Resolution: Informix support confirms this is a problem with ESQL 7.25 and higher. The user is running into the following bug: Bug: 155395 ESQL/COBOL CAUSES ANIMATOR TO FREEZE Description: ESQL/COBOL causes new versions of MF COBOL to freeze when trying to step through the code with animator. HP tech support thinks ESQL/COBOL may be intercepting a poll() call intended for animator. Older versions of MF cobol did not use the poll call. Old KB# 7327
Problem: You may get the "undefined reference" error message when compiling and linking a program with cob that contains a call to another program and this second program is not included in the cob command line to be included in the resulting executable. For example, if inside mainprog.cbl there is a call to a program prog2.cbl: call "prog2" using ... the following command cob -x mainprog.cbl will return an "undefined reference" error message on the symbol "prog2". Resolution: Assuming that you have already compiled prog2.cbl independently because you want it to be loaded dynamically at run time when you run mainprog as a shared object: cob -z prog2.cbl or as .int code: cob -i prog2.cbl or as .gnt code: cob -u prog2.cbl (please have a look to your User's Guide manual to understand the differences and how th
Problem: How to create an archive that includes a COBOL .o module and statically link it to another COBOL executable. Resolution: First you compile your program to .o (the -c cob flag stops the process at .o and doesn't create the executable that the -x option would require): $ cob -cx hf-test.cbl Then you create the archive with the ar system tool: $ ar -r libtst.a test.o To statically link the code corresponding to the entry "test" inside the libtst.a archive (assuming that the archive is in the current directory, otherwise -L should be use to point to the directory where libtst is): $ cob -x testmain.cbl -L. -ltss -Itest The -I cob flag may not be necessary if the program is calling the entry-point directly using LITLINK and the clauses ON OVERFLOW or ON EXCEPTION are not used, but it is always better to be safe by using the -I flag to ensure that the code represented by that symbol is pulled in by the linker. Old KB# 728
Problem: Customer uses ServerExpress's cobjrun to start IBM WebSphere 5.1. Customer wrapped a COBOL application with Java. The Java Wrapper is called by EJBs in an J2EE application running on IBM WebSphere 5.1. In a typical J2EE application running on WebSphere, the memory usage increases during daytime (peak) and decreases during night time (off-peak) due to Java's garbage collection. However, customer noticed that after running with cobjrun the memory usage increases during daytime, but stays the same during the night, and the next day it increases again. Resolution: This way of working it is not the way we recommend. When a java EJB needs to call COBOL, the recommended way of working is to run your COBOL program under Enterprise Server as a service and use the Interface Mapping Toolkit and the Resource Adapters technology to communicate the java EJB with the COBOL Service. We don't think that these memory problems have anything to do wi
Problem: If you have an output file defined as SELECT myoutfile ASSIGN TO "OUTFILE"... and when you run your program you need to print the output, you define it as follows: export dd_OUTFILE=">lp -s -dmyprinter" or export dd_OUTFILE="|lp -s -dmyprinter If instead you need the file on disk, you define it as follows: export dd_OUTFILE="mypath/myfile" But what if you want to direct a file to another file AND print it at the same time? Resolution: If you need both, to get the output to a file and also to print it at the same time, what you need is to duplicate your output. So what you need is a command that is capable of duplicate what it gets from the standard input to the standard output and to a file. I think that the UNIX tee command is what you need. This is an extract of man from HP-UX: " NAME
Problem: Customer has a page ASP that accesses a COM Object generated by Net Express. In the Windows environment this works correctly. Now the customer would like to know this solution can be migrated to the UNIX environment. Resolution: There is a company, Mainsoft, that has produced the COM/DCOM support for UNIX. They can be found @ www.mainsoft.com. You can see an article on Microsoft's website on this subject: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvc60/html/msdn_unixcom.asp However, they would need to solve the following issues: - migrate or find an ASP web server on UNIX (it may be possible to use: Sun's ONE Active Server Pages 4.0.1 -formerly Sun Chili!Soft ASP-) - migrate the COBOL bits (calls to Microsoft API's, use of non-portable COBOL routines, names of files... ) - Server Express also has no support for COM/DCOM
Problem: Is RM/COBOL supported on virtual machines? Resolution: Micro Focus uses some virtual machine technology in its quality assurance testing. Specifically, VMware is used to emulate some Unix and Linux environments. However, none of the RM/COBOL family of products is subjected to a complete quality assurance test on any virtual machine environment, nor is any attempt made to emulate Windows environments on Unix. Customers that choose to use virtual machine technology are relying on the claims made by the vendors of such technology. As always, Micro Focus will attempt to support our customers who choose to use virtual machine technology subject to its capacity to demonstrate product issues on 'native' systems. Old KB# 7504
Problem: file error 21( 'Key out of sequence'.) occurs when writing to an indexed file. Resolution: Indexed files store their records in key order. If you attempt to write a record to the file sequentially, and the key of the 'new' record is less than that of the last record in the file, this error will be returned. Indexed files can be accessed randomly but the key sequence must be borne in mind when writing to them sequentially. Old KB# 7262#COBOL#AcuCobol#RMCOBOL#netexpress#ServerExpress
Problem: A customer upgrading to a new version of Server Express, or rebuilding his/her runtime, may encounter problems when running CICS applications. Resolution: IBM supply a file mkcicscobol. Their documentation states that this must be run whenever a new version of a Micro Focus product is installed, whenever a new version of CICS is installed, or whenever a new version of any supported database product is installed. The script apparently creates a 'language message file' and a runtime library. Further IBM documentation states that this should also be done if the runtime is rebuilt. For specific technical information, Micro Focus would recommend that you contact IBM. Old KB# 7260
Problem: Using CRT Status to detect the page-up or page-down key in a COBOL program. Resolution: The page-up and page-down keys are not ADIS keys. They are in fact user function keys. If they are not recognized by your COBOL program then you have two options on defining them. First, you can define the page-up and page-down key using keybcf. Under option 3-Alter User Function Keys you must modify function keys 53 (page-up) and 54 (page-down) by pressing the key for appropriate action. Save the file (cobkeymp). There is a table of the various key numbers in the Server Express documentation. The other option is to modify your terminfo setting. Old KB# 7255
Problem: In Server Express divding by zero always causes an error if you do not use the ON SIZE ERROR clause; otherwise the results are unpredictable. Resolution: Recode your program so that you can trap the error with an ON SIZE ERROR clause If, after decimal point alignment, the absolute value of a result of an arithmetic operation exceeds the largest value that can be contained in the associated resultant-identifier, a size error condition exists. Division by zero always causes a size error condition. Note that the results of division by zero when no ON SIZE ERROR phrase is specified are unpredictable. The size error condition applies only to the final results, except in MULTIPLY and DIVIDE statements, in which case the size error condition applies to the intermediate results as well. Violation of the rules for the evaluation of exponentiation always terminates the arithmetic operation and always causes a size error condition. If the ROUNDED
Problem: On HP/UX the following command: : cobjrun -version Produces the following output: Error occurred during initialization of VM Unable to load native library: /opt/java1.3/jre/lib/PA_RISC/libjava.sl Resolution: The HP/UX environment should be set up as follows: 1.2.1.4 Environment Variable Settings for HP-UX This section lists example environment variable settings that enable COBOL/Java working on HP-UX platforms, using the default JVM which was selected when Server Express was installed. You will need to change the settings given below to specify the relevant directories on your system. export JH=/usr/java1.2 export COBDIR=server-express-directory export PATH=$JH/bin:$PATH export PATH=$COBDIR/bin:$PATH export SHLIB_PATH=$JH/jre/lib/PA_RISC:$JH/jre/lib/PA_RISC/hotspot: $JH/jre/lib/PA_RISC/native_threads:$COBDIR/lib:$SHLIB_PATH export CLASSPATH=$COBDIR/lib/mfcobol.jar:$JH/jre/lib/rt.jar:. export COBCPY=$COBDIR/cpylib ex
Problem: If migrating a mainframe appliction where initialization of data items may not have been required, you may have numeric fields in the REPORT SECTION that will print as spaces instead of zero unless a numeric value has been moved to them. For example, if a numeric field used to store a total has not updated since the program started it may be assumed that this would physically print as zero (i.e. 0) when it will actually print as spaces. This will only occur on programs compiled to any form of object code - i.e. .gnt, .o, .so and .exe. It will print 0 if using .int code and therefore may not be picked up during testing. Resolution: Use the HOST-NUMMOVE compiler directive. Old KB# 7273
Problem: Are no license messages saved in a file after they have been issued to the monitor? Resolution: A log is kept of "no license" conditions it is /var/mfaslmf/USERLOG. Micro Focus provides a default script that updates this file every time the user runs out of licenses. The default nolicense script updates the USERLOG file and writes a message to the user's monitor. The system administrator may modify the script to take additional action such as send email to a specific account when the "no license" condition occurs. Old KB# 7233
Problem: Customer is migrating from OCDS to Server Express. Compiling code results in multiple occurrences of COBCH1146W messages - these did not occur under OCDS Resolution: The message produced is just a warning - there are no runtime issues. The compiler has always had the ability to produce this message. This message is only produced when analyzing the CSI information while creating the .idy file. In the Server Express product, CSI is now set to on by default when ANIM specified. Old KB# 7235
Problem: Setting a external runtime switches that can be used within COBOL applications. Resolution: The COBOL program would be coded as follows: IDENTIFICATION DIVISION. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. switch-0 ON is test-switch-0 switch-1 ON is test-switch-1 switch-2 ON is test-switch-2. DATA DIVISION. WORKING-STORAGE SECTION. PROCEDURE DIVISION. 100-process. &nbs
Problem: Customer used to have the COBCAP environment variable, Now, however, the variable no longer exists. What can be used instead? Resolution: COBCAP was an old means of mapping external file names which was retained for backward compatibility. It was superseded (and its use was deprecated) about 10 years ago, and it was finally dropped from Server Express in 2001. COBCAP was replaced by the ASSIGN "EXTERNAL" directive (or the EXTERNAL reserved word in the ASSIGN clause of a SELECT statement), along with an environment variable or a configuration file to create the exact mapping of logical name onto physical name. For full details and examples of filename mapping and assignment, please refer to the Server Express File Handling Manual. Old KB# 7236
Problem: Sometimes the user many want to use animator and faultfinder without the animator generating information files. Is this possible? If so, how? Resolution: If the compiler directive NOANIM is implemented the compiler will not create the animator information file (.idy) If Tte compiler directive NOANIM is used , the flag -g is useless Old KB# 7281
Problem: When migrating from Object COBOL Developer Suite to Server Express you may encounter a compilation error where there is a 77-level field with subordinate level entries. Eg 77 entry-field. 05 entry-field-1 pic x(10). 05 entry-field-2 pic 99. In some versions of Object COBOL this did not return a compilation error but will in all versions of Server Express. This form of entry is strictly not legal in COBOL. By definition a 77-level entry is a single level elementary field with no subordinate level entries. Resolution: Change the 77-level entry to a 01-entry. Eg 01 entry-field. 05 entry-field-1 pic x(10). 05 entry-field-2 pic 99. This will have no impact on the data field or any associated code. Old K
Problem: The 'usercall.c' is no longer in the product. What is its replacement? Resolution: The method of calling C from COBOL using usercall.c has been removed from Server Express product as obsolete. A more effective method is to use the CALL "C_func" functionality, as documented in the chapter 'Mixed-Language Programming' in your Program Development book. Old KB# 7240
Problem: A COBOL program prints 30 tables. Each one is OPEN OUTPUT and under Server Express only the last table is in the print file at the end of execution each individual file has been overlaid by the OPEN OUTPUT command. Resolution: On Server Express it is necessary to code the OPEN statement as OPEN EXTEND. This will cause each additional file to be concatenated onto the end of the file. See the "Language Reference" manual for syntax rules for coding OPEN EXTEND. Old KB# 7225
Problem: A sample clustered system has a file system that's shared between machines. On that shared file system within /usr/opt subdirectory is where the ASLMF license keys were installed. Both the Server Express Developer product and the Application Server product are installed in the original file system, not on the shared file system. Resolution: Application Server's license databases must reside in /var/mfaslmf and not other file systems or other directory structures like /usr/opt/ . Even in clustered systems the system directory, /var/mfaslmf, will be visible. Old KB# 7212
Problem: In designing a transaction-oriented application that emulates a mainframe legacy system, it would be helpful to be able to restore all COBOL modules to their initial state, as though the entire run-unit had exited and had been re-started, but without the overhead of actually exiting and re-starting. The function CBL_SUBSYSTEM is supposed to have this capability, but how to call CBL_SUBSYSTEM from C? Resolution: Attached to this Knowledge Base article is a tar file containing an example demonstration. Included are C and COBOL source files, a script showing how to compile, and a "readme.txt" with information and instructions. Attachments: subsystem_demo.tar Old KB# 7220
Problem: I/O error : file 'AS1S' error code: 9/220 (ANS74), pc=0, call=1, seg=0 220 Attempt to execute more than one SORT or MERGE simultaneously The problem is input procedure is working fine and is releasing all records, but while returning the records it is abending and is throwing the error as mentioned above. What could be the reason for this, since no other sort or merge statements are being executed? 006200 PROCESS-RECORDS. 006400 SORT AS1S-SORT-FILE 006500 ON ASCENDING KEY AS1S-SD-NO 006600 INPUT PROCEDURE IS 3100-INPUT-PROCEDURE 006700 OUTPUT PROCEDURE IS 3200-OUTPUT-PROCEDURE. <snip> 007700 3100-INPUT-PROCEDURE SECTION. 007800* 007900 MOVE 100 TO AS1S
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.