Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: 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: 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: 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: 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: 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: 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: Customer has both the development product and Application Server on the same machine, installed in two separate locations (cobol and cobolas) They have five development licenses and two hundred Application Server licenses installed, but process is running out of available licenses and failing with an A147 system abend. Resolution: Application Server licenses are recorded against a specific installation path. The mfaslmf userlog showed that the application was trying to use the five development licenses rather than the Application Server licenses. This was ascertained by examining the error messages in the userlog: No license AS /usr/lib/cobol This showed that the environment was pointing to the development product (cobol), rather than the Application Server installation (cobolas). Firstly check that COBDIR, PATH and LD_LIBRARY_PATH/LIBPATH/SHLIB_PATH are pointing to the correct product location. Check any .profi
Problem: When using the directive OUTDD(file n) where n is a value less than 95, for example 80, and when using DISPLAY string UPON SYSOUT, the contents of string are split into several lines, where each line length is much less than the value of n and keeps varying (decreasing). Resolution: This issue has been fixed with the latest fixpack for Server Express 4.0 SP1. There is also a workaround: OUTDD($SYSOUT 95 L A) or OUTDD($SYSOUT) - the default values are 132 L A. If you really need the lines split at 94 or less (80 for example), generate the file so no line is split by defining the record length to the maximum value that can be found, and it should be very easy to write a little program that splits them to 80: ... fd sysoutfile. 01 sysoutline pic x(maxlinelength). fd sysout80file. &n
Problem: What is the guideline of using mfsort or mfsort 64 ? My application is built as 32Bit mode but it is possible to run mfsort under COBMODE=64. Does mfsort64 have more capacity or performance than mfsort with COBMODE_32 ? Resolution: There is no difference between mfsort and mfsort64, other than one being 32-bit and the other 64-bit. Old KB# 7244#AcuCobol#netexpress#RMCOBOL#ServerExpress#COBOL
Problem: The client/server binding demo at $COBDIR/demo/csbind is coded so the file that is read by the client is always saved at the server with a fixed file name, "netxcpfl.dat". Because of this limitation, only 1 client can be run at the same time and successfully create the corresponding output file in the server. Resolution: The version of netxcli.cbl and netxserv.cbl attached have been altered slightly so if the user enters the name of the output file at the client, it is sent to the server and used, otherwise the default name "netxcpfl.dat" is used. Also, when the file has been read completely and the server is still running, there is a new pause in the client. Attachments: netxdemo.zip Old KB# 7251
Problem: What is the purpose of .hnf files, which can be found in $COBDIR/demos. Resolution: The files are for use with Hyhelp, the Micro Focus help system. The ones supplied are used within Editor and Animator. Old KB# 7261
Problem: Two programs use the same file . The first opens the file only to read , the second opens the file to read and write . Some times the second displays the file-status 9/65 , and the first program runs always fine Resolution: If the program uses the verb : OPEN INPUT FIC1 To share this file , it is necessary to put into the file of the configuration of the file handler ( extgh.cfg) the following line : OPENINPUTSHARED=ON Old KB# 7234#ServerExpress#netexpress#RMCOBOL#AcuCobol#COBOL
Problem: A situation can exist where it is not possible to create an executable using "cob -x". The error occurs even when testing one of the simple demonstration programs that are furnished with the product, for example: mkdir /tmp/test cp $COBDIR/demo/debug/pi.cbl /tmp/test cd /tmp/test cob -x pi.cbl The system linker "ld" reports not being able to find a library named "cobstat" or "-lcobstat". The exact wording of the error message depends on the bit mode (whether 32 or 64), but always mentions "cobstat". This problem is specific to HP/UX and does not occur on other UNIX variants. Resolution: This problem is caused by the environment variable LDOPTS being set as follows: LDOPTS="-a shared" This causes the system linker to search only for shared libraries (.sl),
Problem: After copying executables from a server which was running Object Cobol Developers Suite to a new server with Server Express the application got this library error 0509-150 Dependent module libcobol.2.0.a(shr.o) could not be loaded. 0509-022 Cannot load module libcobol.2.0.a(shr.o). 0509-026 System error: A file or directory in the path name does not exist. Resolution: There are a number of libraries which were used under OCDS which are missing completely from the Server Express product. Some of the missing libraries are: $(COBDIR)/coblib/libcobol.a $(COBDIR)/coblib/libscreen.a $(COBDIR)/coblib/libosx.a $(COBDIR)/coblib/libasmcrtn.a $(COBDIR)/coblib/libsupp.a $(COBDIR)/coblib/libcobstat.a One of the differences between OCDS and Server Express is that Server Express has a completely different product shape. The names of the libr
Problem: Server Express error message: dependent module libcobol.2.0.a can not be loaded - problem occurs after migrating from Object COBOL Developer V4.1 to Server Express. Resolution: Here is an more complete explanation of the errors: 0509-150 Dependent module libcobol.2.0.a(shr.o) could not be loaded. 0509-022 Cannot load module libcobol.2.0.a(shr.o). 0509-026 System error: A file or directory in the path name does not exist. There are a number of libraries which were used under Object COBOL which are missing completely from the Server Express product. Some of the missing libraries are: $(COBDIR)/coblib/libcobol.a $(COBDIR)/coblib/libscreen.a $(COBDIR)/coblib/libosx.a $(COBDIR)/coblib/libasmcrtn.a $(COBDIR)/coblib/libsupp.a $(COBDIR)/coblib/libcobstat.a One of the differences between Object COBOL and Server Express is that Server Express has a completely different product shape. The names of the libraries shipped with the product have c
Problem: Assembler messages: Error: Can't open Z for reading. Z: No such file or directory Z:0: Error: Can't open DA1.1 for reading. Z:0: DA1.1: No error cob32: error(s) in assembling /var/tmp/cobAAAa29655/ldtab.s Resolution: Check to see if you have the Operating System's ANSI C compiler and GCC compiler installed. The GCC compiler also installs its own assembler and will reference some of its own header files for C instead of using the Operating System's. So ensure that it uses the right assembler, the Operating System's assembler, either by un-installing the gcc components or ensure that the gcc components are at the end of PATH searches and that it looks for the Operating System's ANSI C compiler first. Old KB# 7214
Problem: When using Rebuild, you may get the following error: Error during sort operation: 9/007 Resolution: The error code 9/007 is an extended file handler error code informing you that the disk space was exhausted during the build. Rebuild uses a series of temporary files during the process, the exact number of which is determined by the complexity of the index. The error you received is simply stating that you have run out of room on that particular drive. What you can do is use the TMPDIR environment variable to specify another location with sufficient space as the work area for temporary files. Old KB# 7237#RMCOBOL#AcuCobol#ServerExpress#netexpress#COBOL
Problem: Problems converting a fixed length line sequential file to variable length idxformat4. The input file is LSEQ 662, fixed length. The output file is mf4 format variable length 662-4089. Using the command: rebuild infile, outfile -o:LSEQ,IND -t:mf4 -k:1-48 -r:v662-4089 getting the error message 'REBUILD aborted - Invalid key specification - key not contained in record'. The -r option specifies the record format. However, the input file is fixed 662 and the output file is variable. How do I specify the input and output record formats in the same command? Resolution: Sequential files do not have header information so the organization and record length must be specified. There is only one keyword for record length (-r) and it is not possible to specify a different record length on the input and output files. To get around this, run the conversion in two steps: Try running the conversion from lseq to
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.