Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
This article describes how to resolve an XML-code 201 error for XML PARSE when parsing data that contain German umlauts, French accented characters, or a charater that has an ANSI code larger than 0x79. Problem: When parsing data that contains German umlauts, e.g. äöüÄÖÜ or ß, French accented characters, e.g. àÀéèÉÈ, or a charater which as an ANSI code larger as 0x79 XML PARSE delivers an XML-code 201, which is "Miscellaneous XML document parsing errors". <ROOTELEMENT><GermanWords>Ärger Öse Übel -</GermanWords><ABitFrench>ètè means summer</ABitFrench></ROOTELEMENT> Resolution: These characters require the ISO8859-1 encoding specified in front of the root element: <?xml version="1.0" encoding="ISO8859-1"?><ROOTELEMENT><GermanWords>Ärger Öse Übel -</
This article explains how to use the MS Word printout automation object from COBOL. Problem: The printout automation method in Microsoft Word allows you to print out specific page ranges from your application. However there are a lot of different options available for this method and most are not relevant for page ranges. How can you call this from COBOL ? Resolution: You can use OLE Named Parameters with the printout method to print a page range. An example of this is: mftech***** Use OLE Named parametersmftech invoke olesup "setNamedParameters" using by value 4 size 4mftech set wdPrintFromTo of ws-range to truemftech invoke theDocument "PrintOut"mftech using by reference z"Background"mftech by value -1mftech by reference z"Range"mftech by value ws-rangemftech by reference z"From"mftech by reference "1"mftech by reference z"To"mftech by reference "2" Before you use the “PrintOut
Problem: In Net Express with .Net version 5.0 a CALL “MethodName” could be used to call a static method. When the method is defined in the same project, it still works unchanged with Net Express 5.1. When the called method has been placed in a different project, compiling this code in Net Express 5.1 results in: warning COBCH0987: Could not find method 'METHODENNAME' with this signature - will generate dynamic call. Executing the program gives the message: RTE 173: Program not found. Resolution: It is not recommended to CALL a method. An INVOKE is the correct way to start a method. There might be existing programs which CALL methods, and for these programs there is a way doing it in Net Express 5.1: A change can be made in the CALL allowing a dynamic CALL to unmanaged code, for example, CALL VariableName, which disallows the old behavior at CALL “MethodName”. The following steps are necessary for static COBOL methods to be
This article explains the commands used to shut down a Tuxedo server. Problem: The command tmshutdown is used to stop a Tuxedo server. If the Tuxedo server is made with Micro Focus COBOL services, it is necessary to call the function cobtidy() to empty buffers, to close files, to free any data areas allocated by the COBOL system. The command tmshutdown -i displays the following execution error: file 'mfini'error code: 119, pc=0, call=1, seg=0119 Name is not unique (binding symbol 'mfini') Is it necessary to call the function atexit();? Resolution: In the current directory that is used to create the Tuxedo server, it is necessary to create two files mainexit.h and microfocus.c that are as follows: mainexit.h int i ; char c[60]; int atexit(void (*function)(void)); void microfocus(); i = atexit(microfocus); microfocus.c void microfocus(void) { cobexit(); } Add to the command line of the command buildserver -f
This article explores the licensing error ASLM - You need to rerun as root (No Error Number). Problem: This message was received after a reboot and when trying to run a program. The message does not include any error number as with a similar message relating to the semaphore file /var/aslmfsem. Resolution: This error is caused by the absence of or incorrect permissions pertaining to the file /var/.mng2sys. > ls -la /var/.mng2sys -rw-rw-rw- 1 root root 56 Jun 29 15:32 /var/.mng2sys The problem can be resolved by running a program as 'root'. For example: > cobrun hello ASLM: You need to rerun as root > echo $COBDIR /home/products/9i.T4.40.03 > su Password: # export COBDIR=/home/products/9i.T4.40.03 # export PATH=$COBDIR/bin:$PATH # export LD_LIBRARY_PATH=$COBDIR/lib # cobrun hello hello # exit exit > cobrun hello hello Old KB# 14485#COBOL#Licensing#ServerExpress
This article describes how to include the <xml version="1.0" > header in COBOL output when using XML Syntax Extensions. Problem: When using XML Syntax Extensions, the COBOL output does not include the <xml version="1.0" > header. Resolution: The <?xml version="1.0"?> header is actually an XML Processing Instruction so you need to output it using the Syntax for Processing Instructions. For example: $set preprocess(prexml) o(foo.pp) warn endp select xml-stream assign "out.xml" organization is xml document-type is omitted file status is xml-bookdb-status. xd xml-stream. 01 xmls-group identified by "group". 05 xmls-Number pic 9(18) identified by "elementNumber" is attribute. 05 xmls-Alpha pic x(80) identified by "elementAlpha". working-storag
This article addresses the compiler error message reported for READ XML file with AT END condition specified. Problem: A compiler error is generated when a READ statement is coded for an XML file with organization is XML and the AT END/NOT AT END clause is present. Resolution: You cannot use the AT END/NOT AT END clauses when reading an XML file. Instead you should check the xml-file-status as follows: READ XML-FILE IF XML-FILE-STATUS = -7 *> end of file ... ELSE ... END-IF Incident Number: 2183877 Old KB# 14505
This article explains the error message "LMF 004: You have exceeded the license limit for this product". Problem: We received the message "LMF 004: You have exceeded the license limit for this product". Following this message, a further message indicates the number of license units in the license database, all of which are in use. For example: "No more licenses for this product are available. All of the 0002 license units in the license database are in use. You may continue using this product after this message as a temporary unlicensed user." Resolution: It is possible that the number of licenses available has been exceeded, in which case you will have to contact your sales representative in order to purchase more licenses. However, if you believe that you have not exceeded the licenses available, it may be possible that a rogue process is still running behind the scenes and is still making use of a license. To check the state of all processes running do one of
This article addresses the Field Developed Solution MFFTP in the Mainframe Migration Toolkit. Problem: How do I resolve receiving an S806 error program not found when executing PGM=FTP or PGM=MFFTP? Resolution: The MFFTP support files are included as part of the Mainframe Migration Toolkit as a Field Developed Solution. If you have it installed under Windows, you will find the MFFTP files in the MFFTP directory of your Migration Toolkit. To resolve the S806 error: Install msdk08all.exe if it has not yet been applied. Copy the MFFTP.lbr into X:\\Program Files\\Micro Focus\\Net Express 5.1\\Base\\Bin (where X is the correct drive) and use PGM=MFFTP. To use FTP, set the Alias from ESMAC JES resources FTP Alias to MFFTP. Incident Number: 2285867 Old KB# 14506
This article explains how to use the ANY LENGTH clause to define the incoming string in the sub program. Problem: Is it possible to to pass strings to a sub-program without the sub-program knowing the length of the passed string? Resolution: Use the ANY LENGTH clause to define the incoming string in the sub program. The attached example defines a user function, MyFunc, which receives strings of any length and calculates the length based on the position of the last non-space alphanumeric character in the string. The MyMain.cbl program uses two different variables, one defined as a PIC X(20) and the other PIC X(378). These variables are assigned string values and the MyFunc function is called twice, once for each variable. Myfunc defines the incoming linkage item as PIC X ANY LENGTH, allowing it to receive varying length strings. Incident Number: 2266912 Old KB# 14479
This article explains an error that occurs when the environment points to the wrong assembler. Problem: We have received this error when trying to create an executable on HP/UX: Assembler error: can't open Z for reading: No such file or directory Resolution: This error occurs because the environment is pointing to the wrong assembler (as) . To find the correct assembler look at the file $COBDIR/docs/env.txt. The entry which identifies the required assembler will look something like the following: Assembler: as HP92453-03 UX.11.01.31 PA-RISC 2.0 Assembler as -V 2>&1 < /dev/null |cut -c5-80| head -1 The first line indicates the version certified by Micro Focus for this product. The second line indicates the command to execute on the local machine to see the version of the assembler that’s actually being used. Server Express requires the Hewlett Packard version of the assembler and will not run with a GCC version. If the correct version of t
This article explains an error that occurs if a COBOL program using XML is not linked to shared runtime. Problem: When linking a COBOL program to an EXE you can get the following error message: LNK2001: unresolved external symbol _CBL_XMLIOOr LNK2001: unresolved external symbol _CBL_XMLIO_INTERFACE Resolution: This error occurs if you attempt to link a COBOL program that contains XML syntax to the static COBOL runtime. COBOL programs that use XML need to be linked to the shared runtime. If you change the build setting for your EXE then it should link correctly. Incident Number: 2284296 Old KB# 14492
This article explains how to uninstall a license for Server Express. Problem: How can a license for Micro Focus development system be deleted? I can install a license for Micro Focus development system with mflmcmd. Is it necessary to use mflmadm to delete a license for Micro Focus development system? Resolution: With all versions of Server Express older than 5.1, the license can be suppressed only with mflmadm. However, with Server Express 5.1 a new option U of mflmcmd allows you to uninstall a license. Old KB# 14499
This article provides a walkthrough to add new locale to AIX 5.x. Problem: How can we add a new locale to AIX Server running Server Express? Resolution: A walkthrough of how one adds a new locale (Turkish in this case) to an AIX 5.3 installation. This method can be used on earlier revisions of AIX. Refer to attached Word document (smitty mle.doc). Old KB# 14484
This article explains what the Rebuild –d option specifies when reconstructing the index of an indexed file. Problem: The –d option specifies that Rebuild should reconstruct the index of an indexed file from the data area. Any corrupt data records are skipped and logged to a file. However, if rebuild is entered at the command line you get: -d [:c] –rebuild corrupt data file What does it do, rebuild the index or rebuild data? Resolution: If the data portion of the file is intact and only the index portion is corrupt, then Rebuild can generate a new index (.idx) file from the data file with no loss of data. If the data portion of the file is corrupt then Rebuild can rebuild a complete new indexed file, both data and index portions, but there will be loss of data as Rebuild discards any corrupt data records that it encounters. Note: When you use Rebuild to generate a new index file from an existing data file, the file can grow in size. One reason i
This article explains how to call COBOL subprograms that are located in different directories to the main calling program when executing from a command prompt. Problem: When executing a main calling COBOL program from a command prompt, how is it possible to enable any called subprograms that are in different directories to be found and called successfully? For example: program1.int resides in c:\\dir1 and program2.int resides in c:\\dir2 and program3.int resides in c:\\dir3 and so on… As it stands, if you were to execute program1.int from a command prompt, when it called program2.int you would get a 173 file not found error displayed as the subprogram is not in the main folder. Resolution: You need to set the COBDIR environment variable if called module is not found in the current directory. This can be done as follows in relation to the scenario described above by creating a .bat file containing the following entries: setlocal set COBDIR=c:\\dir1;c:\\dir2;c:\
The RM/COBOL v12.02 Linux install script fails with a cpio error: Premature end of file. This article explains what to do when this happens. Problem: The version 12.02 installation script, (install.sh), does not properly recognize the Linux 32-bit platform. Therefore, the script chooses the incorrect options for cpio. These incorrect command-line options for cpio cause the “Premature end of file” message. Resolution: The attached zip archive, install.sh.zip, contains a modified installation script (install.sh) that will detect the Linux 32-bit platform and set the proper cpio command-line options. Download this modified script and use it to replace the install.sh file contained in the RM/COBOL downloaded installation media. Incident Number: 2260814 Old KB# 14467
This article describes how to use the WHEN directive to address this issue. Problem: A FILE SECTION field that is redefined by another field that is specified as a key, or part of a key, is not being added as a column in database tables. As an example, in the following FD the t_cod_tra and t_cgc_tra fields do not get created as table columns: fd trans_fil. 01 reg_tra. 05 t_cod-tra pic 9(03). 05 xt_cod_tra redefines t_cod_tra pic x(03). 05 t_nom_tra pic x(40). 05 t_end_tra pic x(40). 05 t_bai_tra pic x(25). 05 t_cep_tra pic 9(08). 05 t_mun_tra pic x(25). 05 t_uf_tra pic x(02). 05 t_tel_tra pic x(11). 05 t_col_tra pic x(11). 05 t_con_tra pic x(20). 05 t_mai_tra pic x(50). 05 t_cgc_tra
This article describes a possible computational error when using fractional exponents and describes a potential work around. Problem: Upgrading to version 7.x uncovered a computational error that occurs when executing iterative mathematical statements that involve exponentiation with fractional powers, such as square root. For example, executing the following statement in a loop 50 times could cause the resultant value of MY-CALC-INT-A to equal 1 instead of the correct value of 3. COMPUTE MY-CALC-INT-A ROUNDED = 9 ** 0.5 Resolution: Upgrade to version 8.x or higher. A potential work around is available, but requires code modifications to the existing COBOL program source. To utilize this work around, an ON SIZE ERROR phrase may be added to the COMPUTE statement. For example: COMPUTE MY-CALC-INT-A ROUNDED = 9 ** 0.5 ON SIZE ERROR … Incident Number: 2264802 Old KB# 14459
This article explains how to use the C$SOCKET routine to connect to a Network Time Protocol (NTP) server and obtain a Universal Time. Problem: Sometimes it is useful to know the Universal Time so that the exact time and date can be provided to an application (for example to check license expirations). Resolution: The Universal Time is available from the internet thanks to NTP servers. The attached program shows how to use the C$SOCKET library routine to get information from one of these servers. Incident Number: 2284151 Old KB# 14461
This article explains what to do if AcuXDBC sends you the error message “Too many columns NNN (max: 256)." Problem: When trying to access a VISION file through AcuXDBC that has more than 256 fields (columns) — the default maximum number of columns allowed — a user receives a “Too many columns NNN (max: 256)” error message. Resolution: The user can change the default of 256 columns in the “Advanced” tag of the data source name (DSN). The Maximum Columns field on this tag can be set to up to 8191. Incident Number: 2284263 Old KB# 14471
This article explains how to send a fax programmatically from a COBOL source program. Problem: Is it possible to send a fax directly from a COBOL program? Resolution: Yes. The attachment to this article includes a sample that explains how to feed a Windows Fax service with an addressee's information and fax number directly from a COBOL program. The sample then demonstrates sending the document to the fax queue. Requirements: Minimum Operating Systems are Windows XP and Windows Server 2003 Windows Fax service can be installed from the “Windows Components Wizard” interface panel (Control Panel / Add or Remove Programs / Add Remove Windows Components / Fax Services) This sample has been tested successfully with ACUCOBOL-GT runtimes 7.2.2 and 8.1.0 without any particular compiler options or runtime switches. Incident Number: 2283068 Attachments fax-from-cobol.zip Old KB# 14449
This article explains what to do when AcuXDBC gives the wrong date for a date mask that specifies only the year and month, YYYYMM. Problem: AcuXDBC supports incomplete date types. This feature is documented in Section 3.3.4 of the AcuXDBC User’s Guide as: "It is sometimes desirable to have incomplete date types, for example to have YYYYMM to simply store the year and month. AcuXDBC defaults the month and day to 1, so that incomplete types will be valid. Note that AcuXDBC can handle incomplete date types, but if you have a complete type and invalid date data, AcuXDBC cannot handle the date." However, if only a partial date mask is specified, the unspecified portion does not default to the correct value. For example, with a date mask of YYYYMM and data of 200810, the field might assume the value 2008-OCT-00 (which is not a valid date) instead of the correct value of 2008-OCT-01. Resolution: This is a known issue and has been fixed in Ver
Compiling using the --netdll flag on Windows 7 generates a CreateProcess failed error. Problem: Take a sample program (such as calc3.cbl), use the .Net interoperability compiler option --netdll. Compile with the following options:-o .\\object\\@.acu -x --netdll:2.0 The following error message is returned: CreateProcess failed for C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\AL.EXE \\target:lib \\v:1.0.0.0 \\embed:".\\object\\ACU.acu",AcuNet \\out:".\\object\\ACU.dll" ".\\object\\ACU.NETModule" ACU.acu - Completed: 0 Error(s), 0 Warning(s). This works on XP and Vista machines. Resolution: al.exe is part of the Microsoft .Net framework SDK. al.exe is not included with the Windows 7 OS, you must download and install the .Net framework SDK. Old KB# 14511
This article provides information about the implementation date for the configuration variable A4GL-WHERE-CONSTRAINT. Problem: Although the Micro Focus Database Connectors User’s Guide documents the availability of the A4GL-WHERE-CONSTRAINT, it has not yet been fully implemented. Resolution: Currently, the full implementation of the A4GL-WHERE-CONSTRAINT is scheduled for version 5.1 WebSync 4 (WS4). Incident Number: 2285746 Old KB# 14493
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.