Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: If mfosrt is used to try and create one file from another, with a greater record length in the output file, then the result is not as expected. The scenario: Input file indata: 01234567890123456789012345678901234567890123456789 Desired output file outdata: 012345678901234567890123456785678900 0 0 4567890123456789 mfsort_directives, the directives file: USE indata ORG LS RECORD F,50 sort fields=copy OUTFIL GIVE outdata ORG LS RECORD F,75 OUTREC=(1,25,26,4,26,6,C'0',6X,C'0',7X,C'0',8X,35,2,37,7,44,7) The command line: mfsort take mfsort_directives The actual output: 012345678901234567890123456785678900 0 viz. the output is being truncated. Resolution: This is a bug, which will be fixed in due course. There are a couple of workarounds. both which entail changing th
Problem: I see that the file $COBDIR/docs/env.txt shows the versions of Java that are supported for my version of Server Express. These are all "Sun" versions of Java. I would like to use IBM Java version 2.1.4. Can I still use this with Server Express? Resolution: Strictly speaking, the versions of Java listed in $COBDIR/docs/env.txt are the only ones supported. But this does not mean it is impossible to use other versions of Java. Java versions from other vendors such as IBM are often "rebadged" Sun versions (derived from the same code base and maintaining the same version numbering). These are sometimes functionally compatible with the Sun versions. What Micro Focus means by "supported" is that, for customers with active maintenance, Micro Focus Supportline will always be willing to talk on the phone and answer technical questions and provide assistance, but if a b
Problem: Code that relies on the compiler directive: PREPROCESS"window1" (see the documentation; this implements ACUCOBOL windowing syntax) compiles correctly but encounters errors during Animation. Certain COPY books cannot be found by the Animator, even though they exist and are correctly specified in the source code. The problem did not occur in Object COBOL Developer's Suite, nor in Server Express versions prior to v5.0. It began to occur in SX v5.0. Resolution: The problem is fixed by fixpack 14, or fixpack levels subsequent to 14, for SX v5.0. Old KB# 2154
Problem: Java Objects Leak when being used from COBOL. When using many Java objects from COBOL it was found that the Java Objects were not garbage collected by the Java runtime. Resolution: In order for the Java runtime (JVM) to reclaim objects created from COBOL then COBOL needs to finalize the object reference. For Example:- class myjava is "$java$myjavaclass" 01 myjava object reference. invoke myjava "new" returning myjava invoke myjava "aMethod" invoke myjava "finalize" returning myjava The "finalize" call is required to prevent any Java object leaks. Old KB# 2102
Problem: How to specify paths in an environment variable Resolution: The use of, and interpretation of, ":" and "." in PATH type variables (PATH, LD_LIBRARY_PATH etc) is often misunderstood. ":" is the directory separator. A colon at the beginning (or end) of the environment variable value means a null path at the beginning (end) of the search order. A null path means the same as ".". That is, the current working directory. "::" in the middle of the env-var value is equivalent to ":.:", which obviously means search the current directory at that point in the order. A frequent mistake is "::" at the end of the value, which means search the current directory twice. Example of setting COBDATA- export COBDATA=:/home/data/directory This would cause the search order to be the current directory then /home/data/directory Incidentally - if you specify COBDATA then the current directory wi
Problem: By default the XML GENERATE statement converts data names to upper case to generate XML tags. The following: 01 myXML pic x(1000). 01 myItem1. 05 myItem2 pic x(10) value "my value". ... Xml generate myXML from myItem1 would generate "<MYITEM1><MYITEM2>my value</MYITEM2></MYITEM2>" in myXML Resolution: To preserve the case of data names when XML tags are generated with XML GENERATE it is necessary to use the PRESERVECASE compiler directive, i.e. $SET PRESERVECASE This directive is not documented in Server Express 5.0 but should be documented in Server Express 5.1. After setting PRESERVECASE, the contents of myXML in the example above would be: "<myItem1><myItem2>my value</myItem1></myItem2> Old KB# 2158
Problem: Program defined with ASSIGN TO PRINTER is not sending output to the printer Resolution: Printing from an application in Unix is usually done via unix pipes (dd_). set up dd_ environment variables so commands will be executed by the operating system shell. The shell used is that defined in the environment variable SHELL or, if this has not been set, /bin/sh is used. The ASSIGN TO PRINTER clause does not send output to a printer; it sends it to a file named LPT1. To send output to a physical printer, you must use the dd_LPT1 environment variable or, if your system supports the lp printer spooler, you should use: dd_LPT1=">lp";export dd_LPT1 - Or you can just write in a normal sequential file and print it at the end: working-storage section. 01 myfile-fid pic x(20). 01 my-print-call pic x(30). procedure division. ...... close myfile string &
Problem: Compiler appears to automatically redefine "usage comp" fields to comp-5. When field is referenced receive non-unique data name error. This occurs when using the Oracle preompiler PROCOB Resolution: By default pcbcfg.cfg (in $ORACLE_HOME/precomp/admin) defines: comp5=yes define=comp5 Changing COMP5=YES to be COMP5=NO will resolve this issue. COMP5=YES can also be overridden at compile time by passeing COMP5=NO in the list of directives to be passed to the Pro*COBOL precompiler as follows: PREPROCESS(COBSQL) CSQLT=ORACLE8 ENDC COMP5=NO P(CP) ENDP The only effect this directive has is on the code generated by the Oracle precompiler. As COMP and COMP-5 are the same byte ordering on AIX, the change should not impact the application. To see what I mean, with this small app : 01 a pic s9(4) comp-5 value 23. 01 b pic s9(4) comp value 23. &nbs
Problem: There is known defect where in some cases the results of a COMPUTE statement may be incorrect when executing in machine native code on Intel x86 platforms. Resolution: This error can be avoided by using the -g flag when compiling the machine native code executable. The error is introduced by a incorrect assumption in the code optimization routine used by the compiler. The -g flag alters the optimization routines used by the compiler so that the error is avoided. A permanent correction for this error will be released in a Fixpack for Server Express V4.0 SP3. Old KB# 2157
Problem: In some Unix platforms the following example code gives unexpected results (different from 0). 01 WK-NUMER-12 PIC 9(12). 01 WK-QUOTIENT-06 PIC 9(06). 01 WK-REMAINDER PIC 9(02). 01 WK-CHECK PIC 9(01). PROCEDURE DIVISION. MOVE 114600120320 TO WK-NUMER-12. MOVE 0 TO WK-QUOTIENT-06 WK-REMAINDER. &nbs
Problem: Problems encountered while using C routines to access the Micro Focus filehandler using the EXTFH API Resolution: Debugging a C language calls to EXTFH The API for calling the Micro Focus filehandler is well documented and it's possible to create C language applications which use the Micro Focus filehandler to access and update COBOL data files. The interface to the filehandler consists of a call to the function EXTFH which passes two arguments, 1) a pointer to the Operation Code and 2) a pointer to a Micro Focus File Control Descriptor (FCD). When the interface between your C language routine and the filehandler fails the problem is frequently caused by a errors in the contents of one or both of these arguments. There is a fairly straight forward means available to debug and troubleshoot the interaction between your C language application and the Micro Focus filehandler, Create a COBOL program that contains a L
Problem: Can IDXFORMAT"8" files be variable length? Resolution: The following program demonstrates that it is generally possible to create an IDX8 file having variable length records: 000001$set idxformat"8" 000002 select file1 assign to "file1" 000003 organization indexed 000004 access dynamic 000005 record key file1-key1. 000006 000007 fd file1 000008 record contains 30 to 50 characters 000009 recording mode v. 000010 01 file1-rec1. 000011 05 file1-key1 pic x(10). 000012 05 file1-data pic x(20). 000013 01 file1-rec2. 000014 05 file1-key2 pic x(10). 000015 05 file1-data pic x(40). 000016 000017  
Problem: rebuild myfile -p -d receives error Too many records with duplicate keys Error on output file - status 22 - records read = xxxxxxx Resolution: An output filename must be specified on the rebuild command if the -p (in place) option is specified. Make sure enough space is in the directory or give it a directory path/outfilename where there is enough space. The -p option instructs Rebuild to rebuild an IDXFORMAT"8" file in place. The rebuild uses less disk space, but if it fails the file is lost. You must back up the file before you attempt a rebuild with this option. Old KB# 2128#ServerExpress#RMCOBOL#COBOL#netexpress#AcuCobol
Problem: Used rebuild infile, outfile but still having problems. Resolution: What the above command does is use the index tree to recover the file and will only recover records for which there is an index entry. The correct/recommended Rebuild command to use to recover a corrupt file is: Rebuild infile, outfile -d -e which will recover all valid records. The -d option tells Rebuild to ignore the index tree and scan for all valid data records that will be included in the outfile. The -e option indicates to Rebuild to continue to process the input file when an illegal duplicate record is encountered. All illegal duplicates are discarded from the outfile and are directed to a file with the base name of the infile with the extension .err. Old KB# 2173#AcuCobol#RMCOBOL#netexpress#COBOL#ServerExpress
Problem: On versions post 2.2 of Server Express this error may occur when trying to create an indexed file from a line sequential file maintaining the record format defined in the previous file. The loader is a C program which includes an FCD structure with the FCD3 format and a code which sets the value of the FCD field - all set to OPEN OUTPUT and DYNAMIC ACCESS MODE. If the not-ordered key is encountered, the following error is returned: write error: status = 2/1 So is it possible to create an Micro Focus indexed file from a sequential file containing the record including the keys but not in ascending order? Resolution: In earlier releases of the product the sequence checking was performed on the basis of the K switch. However, at some stage in the life-cycle of the product, it was changed so that this would have to be sent via a tunable. The value used in the access mode byte of the FCD specifies only that this FCD uses a file sta
Problem: Under Object Cobol Developer Suite, using chatr to examine an executable, the following occurs: cob -x pd.cbl chatr pd pd: shared executable shared library dynamic path search: SHLIB_PATH disabled second embedded path disabled first Not Defined Under Server Express the following occurs: cob -x pd.cbl chatr pd pd: shared executable shared library dynamic path search: &nb
Problem: Porting application from HPUX 11/23 PA-RISC to HPUX 11/23 Itanium. Compile cobol module with cob, using ld to link linker produces the warning: ld: (Warning) Unsatisfied symbol "_mFldhandle" in file xxx.o This cobol module is one several modules compiled to .obj for inclusion in a shared liabrary. The shared library is built, but at runtime the above Unsatisfied symbol "_mFldhandle" is not being resolved. SHLIB_PATHs, and LD_LIBRARY_PATH are set which /cobol/lib shared lib to use with the -l flag on the ld command to resolve this symbol Resolution: When linking Cobol you must use cob. . IBM, HP and other take the same approach with C . You must use the C tool to link C applications. _mFldhandle is not defined in any library in $COBDIR/lib. This symbol is created by cob, locally to each shared object, as part of the link process. It is used as part of cancel processing, and shared object load/unload
Problem: Specifying a 'CODE' clause in the RD (Report Descriptor). This allows multiple reports to be included within a single report file... The two(2) report 'code' characters that are included in the final report output, at the beginning of each line is problematic. Resolution: The CODE clause is not required to write more than one report to a file. This can be done without the CODE clause. select my-file assign to "a.pnt". file section. fd my-file report report-1 report-2. report section. rd report-1. 1 my-detail type detail column 1 line plus
Problem: When installing Micro Focus Sever Express you are asked whether you want the default working mode to be either 32 or 64 bit. Whichever you select the working mode default is set appropriately. Resolution: You can change the working mode (COBMODE) on a temporary basis or if you have root permission you can change the default working mode. To change the default working mode temporarily you can set the COBMODE environment variable: export COBMODE={32/64} Once you have logged out the default working mode will revert back. Note: You can set COBMODE in your .profile If you have root permission you can change the system default working mode by running the following command: cobmode -s {32/64} Old KB# 2205
Problem: Micro Focus supports several internal formats for indexed files, including: IDXFORMAT"1" IDXFORMAT"2" IDXFORMAT"3" IDXFORMAT"4" IDXFORMAT"8" An existing indexed file of unknown format can be examined by the "rebuild" command to determine its type. Use the "-n" flag of "rebuild" to report the file's properties without actually rebuilding the file, for example: rebuild -n <filename> In the output, rebuild indicates the IDXFORMAT in a field named "Format", but uses a different set of descriptions in place of: IDXFORMAT"1" IDXFORMAT"2" IDXFORMAT"3" IDXFORMAT"4" IDXFORMAT"8" Resolution: The shell script attached to this Knowledgebase article creates and then compiles a COBOL program, which in turn creates files of various IDX format, then the shell script runs "rebuild -n" for each file to show how rebuild behaves. Just download the script and run it like: sh doit.sh It reveals that rebuild report
Problem: Is there any tuning parameters for rebuild that might help performance? Resolution: During processing Rebuild sorts a temporary file which it generated when it loaded the indexes (the file is created in the system temporary directory) and then uses the results of the sort to update the indexed file. There is an environment variable - SORTSPACE which specifies the amount of memory to be allocated to internal workspace for SORT operations The setting for SORTSPACE when performing a rebuild should be based on key size rather than record size (as it would be when using MFSORT). As a rule of thumb the value of SORTSPACE should be the larger of the following values rounded up to a suitable megabyte: a) SORTSPACE = (number of records * (size of the largest key 16)) Or b) SORTSPACE = (number of records * ((number of keys with duplicates * 4) 16)) Old KB# 2214#AcuCobol#COBOL#netexpress#ServerExpress#RMCOBOL
Problem: Attempting to build an executable linking COBOL and C modules getting errors from the system link editior 'ld" example error message: # cob -x a ld: (Warning) Ignoring allowunsats. The option is currently not supported in a 32-bit PA link. ld: Can't open /opt/langtools/lib/pa20_64/crt0.o ld: No such file or directory Resolution: IN order to build executables on the HP/UX PA/RISC environment the HP C language development system must be installed - the version installed should be as identified in the file: $COBDIR/docs/env.txt Old KB# 2210
Problem: If an rts error occurs COBCONFIG can be used to invoke the animator at the point where the rts error occurs. It is also possible to invoke the system debugger. Resolution: This article assumes the user has a working knowledge of the operating system debugger. If not, consult the operating system man pages or vendor. First, download attached script sysdebug. It may be necessary to modify this script to include the correct debugger for the operating system. Install this script in a directory which is on the PATH. In this directory run chmod x sysdebug Then create the file /tmp/debug.cfg with the following lines: set debug_on_error=1 set debugger_command="sysdebug" and set and export the COBCONFIG environment variable. For example in ksh use: export COBCONFIG=/tmp/debug.cfg If already using COBCONFIG, simply append these
Problem: In SELECT statements, a customer's application code declared line sequential files (using the ORGANIZATION LINE SEQUENTIAL clause). In the FD, the application code specified RECORDING MODE V and the RECORD CONTAINS clause for these files, because of the customer's impression that line sequential files are variable length. The customer noticed that it didn't seem to matter what values were specified in the RECORD CONTAINS clause, even if the values did not match the actual minimum and maximum record sizes in the file. The customer was also using "mfsort" and "rebuild", and wondered whether options declaring variable-length should be specified when processing line sequential files with "mfsort" and "rebuild". Resolution: Line sequential files are neither truly fixed nor truly variable format files. The presence of RECORDING MODE, RECORD CONTAINS, or RECORD VARYING IN SIZE clauses does not change the behavior of line sequen
Problem: Error occurs on select and insert of data via OpenEsql to sqlserver. String data, right truncation (SQLCODE 000000001) Running SQLServer 2000. Datadirect ODBC64 v 53. Resolution: Correct by using OpenESQl in 32 bit mode with Datadirect 32 bit ODBC data sources Server Express currently support OpenESQL in 32-bit mode,....to providing support for accessing 64-bit ODBC data sources from OpenESQL will be within the SX 5.1 timeframes. There is no commitment date at this time Old KB# 2203
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.