Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: 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: 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: System-wide default directives are contained in a cobol.dir file, either in the source directory or in $COBDIR/etc/cobol.dir. However, there are a few programs which cannot be compiled correctly without overriding one or more of the default directives. Resolution: In this example, the "RM" (Ryan-McFarland dialect) directive is set in cobol.dir, but must not be used for ore or two special programs, so NORM ("NO" "RM") must be set. There are several ways to accomplish the override, all based upon the same concept: If there are conflicting directives, e.g. RM and NORM, the last one the compiler "sees" is used. From the documentation, manual "User's Guide", Chapter "COBOL System Interface (Cob)", section "Specifying Compiler Directives", the directive processing order is: (any or all of the following do not necessarily exist for a given
Problem: I use the File handler configuration parameters TRACE , TRACEFILENAME . Now I would like to read the trace file . Resolution: Under UNIX : The command is cobfhrepro2{nn} /g{name of the trace file} /a /d /n{name of the data file} cobfhrepro2{nn} nn is 32 or 64 /a /d : all information xfhrepro.log is the name of the output file with information if /n is omitted , the information are for all data files Old KB# 2178#ServerExpress#COBOL#RMCOBOL#netexpress#AcuCobol
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: 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: 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: 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: 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: 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
Problem: Printing is not stopping at the end of the page additional lines are printed on the next page. Resolution: Use the compiler directive RWHARDPAGE This directive causes the Report Writer control module to execute a form feed after the last item has been printed on a page, instead of the usual multiple blank lines. This ensures that the paper is positioned correctly ready for a new page. Old KB# 2095
Problem: I have just installed COBOL for UNIX (i.e. Server Express) for the first time, or I've made changes to the installation or to the licensing. What is a quick way to test whether Server Express can compile and run successfully? Resolution: Set the COBDIR environment variable to the Server Express location to be tested. For example: COBDIR=/opt/microfocus/cobolexport COBDIR Your machine might have more than one installation of Server Express (an old and a new version) in different locations. Decide which one you want to test, and set COBDIR to that location. After COBDIR is set and exported, enter the following commands: LD_LIBRARY_PATH=$COBDIR/libexport LD_LIBRARY_PATH [On AIX, specify LIBPATH instead of LD_LIBRARY_PATH, and on HP/UX, specify SHLIB_PATH instead] PATH=$COBDIR/bin:$PATHexport PATHCOBPATH=.export COBPATH Next, copy and paste the following six commands onto the command line: mkdir /tmp/cob_testcd $CO
Problem: Any non COBOL main program that calls any COBOL application, including Micro Focus EXTFH, needs to be linked using the Micro Focus cob interface. Resolution: You can find 2 references in the documentation at: http://support.microfocus.com/Documentation/books/sx50/sx50indx.htm - Bookshelf > Program Development > 11. Interfacing with C Programs - Bookshelf > User's Guide > 8. Linking to System Executables > Simple default linking And also, within the cob flags section also in Bookshelf > User's Guide > 10. Descriptions of cob Flags, the following flags might be of interest: -CC c_ption CC cplus_option -Q ld_option among others... Old KB# 2194#RMCOBOL#AcuCobol#COBOL#ServerExpress#netexpress
Problem: Customer has a script written in-house that uses the 'rebuild' command to rebuild some data files. Since upgrading their version of COBOL, the script has begun failing with: build.rad1 /v1/hosp/seqrad/RAD0.dat,/v1/h1/rad/RAD0 -o:seq,ind -k:1 41 -r:f72 -i -e ***Error during sort operation - status 9-037 Resolution: File status 9-037 means a permission problem. I notice the script changes directories to $COBDIR/bin and invokes rebuild with "dot-slash": ./rebuild. The rebuild input and output files are specified by full path and are located elsewhere, but at the time rebuild is running, the current working directory is $COBDIR/bin. The Server Express install script sets permissions such that a common user cannot disturb official files and directories. The user running this script does not have permission to write in $COBDIR/bin -- this is intentional. Although the rebuild input an
Problem: Sample attached is just a demonstration which applies recommendations of KB 19691 Customer has questions on using large XML files with Net Express http://supportline.microfocus.com/mf_kb_display.asp?kbnumber=19691 What does this sample show? =========================== It just shows the chapter 3) of the KB 19691 ... 3. You can use the CBL_OPEN_FILE and CBL_READ_FILE byte stream routines to read the data directly from the XML document in managable blocks of 100KB or more. You can then use INSPECT and STRING statements to parse the data read to find the first <childdocn> start tag and the last </childdocn> end tag in the data buffer and then extract this information into another buffer such as XML-BUFFER PIC X(100000). In the SELECT statement for your XML enabled file you can have ASSIGN TO ADDRESS OF XML-BUFFER. Then when you open the file you can do a READ NEXT through each of the <childdocn> elements in the XML-BUFFER until
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.