Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Is it possible to track back to a line of code from the PC= address at runtime? Resolution: It is possible to debug your programs in this way and the method used depends on whether you are running INT or GNT/OBJ code. Full details can be found under "Debugging Techniques" section in the online help. Old KB# 1533
Problem: I plan to use the XML PARSE statement to read an XML instance document, but can I then use the READ statement to examine the data one record at a time? Resolution: There are two different XML parsers available in MF COBOL. One is a DOM-based parser and the other is an event-based parser. The DOM-based parser is invoked by a READ statement, whereas the event-based parser is invoked via the XML PARSE statement. DOM parsers read an entire XML instance document into memory all at once and hold it in the form of a tree. Once the entire document is in memory, a COBOL program can read through the data, and update and modify the data. In the end, the updated memory image can be written out to disk as an XML instance document. An event-based parser, on the other hand, reads an XML instance one line at a time, and presents it to a program as a series of events. For example an event might be 'START-OF-ELEMENT' announcing that a new XML elem
Problem: How to use nested expressions with the INVOKE statement using the .NET version of Net Express. Resolution: Some in-line invoke statements can become quite complex when accessing multiple methods and properties directly within a .NET Framework class. Expressions within parenthesis are evaluated first. Example: set wsHashedBytes to clsHashAlgo::"Create"(clsCryptoCfg::"CreateFromName"("MD5") ::"ToString")::"ComputeHash"(wsClearBytes) The equivalent set of invoke statements would look like: set wsTempString to "MD5" invoke clsCryptoCfg "CreateFromName" using wsTempString returning wsMD5Service invoke clsHashAlgo "Create" using wsMD5Service::"ToString" returning wsHashAlgo invoke wsHashAlgo "ComputeHash" using wsClearBytes returning wsHashedBytes Old KB# 1545
Problem: When attempting to call a third party application from within a COBOL program the call does not work. Resolution: If a COBOL program needs to execute a third party application which exists as an executable program, i.e. .EXE extension, then the COBOL CALL statement cannot be used. An .EXE must be run as a separate process by using the WINAPI function CreateProcessA or the COBOL library function CBL_EXEC_RUN_UNIT. There are samples of both of these on the microfocus.com supportline web site under Examples and Utilities. Old KB# 1608
Problem: After uninstalling an application, then attempting to open Micro Focus Net Express' help facility the following error is reported: : Cannot open the file: mk:@MSITStore:C:\\ProgramFiles\\MicroFocus\\NetExpress5.0\\Base\\Help\\mfnetx50.chm Resolution: The problem is caused by the file hhctrl.ocx located in the System32 folder (or just System on some OS), it is likely that it has been overwritten by an application with an incompatible version of the file. One way to resolve this error to reinstall the operating system . Another alternative is to restore hhctrl.ocx. Look for it on the cabinet file from the Windows CD-ROM or download/copy a working version from an outside source or even from a backup. For example, download a working version from: http://freeware.it-mate.co.uk/?Cat=OCX_Files After downloading the file, copy it into C:\\windows\\system32\\ (or wherever the corrupted f
Problem: On UNIX the file name default is file-base-name for the data portion aand file-base-name.idx for the index portion of a file. The following explains how to change these default naming converntions. If you want to change the filename typeu Resolution: In the extfh.cfg configuration file you can specify the option IDXNAMETYPE. The IDXNAMETYPE option specifies the format of the filename type for both the data file and index file,present. if presnet. IDXNAMETYPE={0|1|2} where the parameters specify how the the name of the index file (if present) is derived from that of the data file: 0 By discarding any extension and adding the extension .idx 1 By simply adding the extension .idx 2 Like 1 except that the data file name is modified by adding the extension .dat For example, if the data file name presented to the File Handler is abc.def, the options shown above give the following data and index file names: 0&nbs
Problem: Writing large XML files using XML-I-O is time consuming. How can this be improved? The XML-File was declared as select myfile-frame assign "MyFile.XML" organization XML document-type "MyNamespace" file status XML-STAT. XD myfile-content. 01 Support identified "Support". 02 rec identified "Person". 03 Na
Problem: Why do I occasionally receive a 9/037 (access denied) file status when opening a file using LOCKTYPE(2)? Resolution: When using LOCKTYPE(2) the File Handler creates a separate data file with the extension .LCK, against which record locks will be held. When a COBOL program closes a file, the File Handler attempts to delete the lock file as it is no longer required. The problem arises when this delete operation coincides with another process that is attempting to open the same data file. If this process attempts to create a lock file currently being deleted by the first process a 9/037 can be returned by the operating system. This issue is typically only likely to occur if multiple processes open and close the same files repeatedly. Possible workarounds: Check the file status following an OPEN operation and reattempt an open if you receive a 9/037 error. Do not use LOCKTYPE(2) for fil
Problem: The documentation states the following: If you specify a file without an extension, the dynamic loader run-time support module adds the extension .so to the basename of the file, and searches the disk for the corresponding callable shared object file. If it cannot find the callable shared object the dynamic loader run-time support module adds the extension .int to the basename of the file, and searches the disk for the corresponding intermediate code file. If it cannot find the .int file, the dynamic loader run-time support module adds the extension .gnt to the basename of the file, and searches for the corresponding .gnt file. Resolution: This is actually incorrect and is the subject of an RPI (bug report). The default is .so, .gnt and then .int. Also, see tunable 'program_search_order' reference as this makes the above redundent. Old KB# 2060
Problem: A main COBOL .EXE is calling two subprograms which each contain a sort with an input procedure and an output procedure. The first program is canceled before the second one is called . The sort in the second program called is failing with a 9/220 on the first release record of the input procedure. If the first program is not called then the sort in the second program runs fine. it appears like the sort from the first program is still active when the second programis run. Resolution: This can occur if the output procedure in the first called program is not being completed before the program exits back to the main program. Make sure that the first called program is not exiting to the main program within the output procedure. Old KB# 1587#COBOL#AcuCobol#netexpress#RMCOBOL#ServerExpress
Problem: When compiling a COBOL program severity "E" errors are not being displayed. Resolution: You may have either HIDE-MESSAGE or CHANGE-MESSAGE directive set. The CHANGE-MESSAGE is replacing the HIDE-MESSAGE directive. Setting either of these directive will "hide" the error so that if the error is encountered, it is ignored. The syntax is - HIDE-MESSAGE "integer" The default is - NOHIDE-MESSAGE The compiler will also accept the directives without a hyphen - HIDEMESSAGE. Setting the HIDE-MESSAGE "integer" directive will add the error message number to a list to "hide" the error. To set multiple error messages you must use the directive repeatly. During compile time any message with a severity of E=error, W=warning, I=Information or flag with it's number in the "hide" list will not be shown in any listing and will note be included in the summary at the end of the
Problem: Compiling a COBOL program that is running on IBM COBOL MVS and the reserved words are not being treated as reserved words by the checker. Resolution: When compiling your COBOL program use the directive "MVS". This will turn-on the IBM COBOL for MVS reserve word list. The syntax: >>-.---.-.----.--MVS------------------->< -/- -NO- Parameters: None Properties: Default: NOMVS(Dialect ) Phase: Syntax check $SET: Initial Dependencies: The MVS directive sets DBSPACE and DBCS"3" immediately. Old KB# 2074
Problem: Will previous versions of Visual Studio be overwritten by the NetExpress 5.0 installation? Resolution: No. The Micro Focus NetExpress 5.0 installation will detect and preserve installed, previous versions of Microsoft Visual Studio (ex: Microsoft Visual Studio 2005 Professional Edition) and will not install the Visual Studio 2005 Standard edition that ships with the product. Full functionality of the pre-existing Visual Studio will be retained. Old KB# 1559
Problem: In COBOL, integers are declared as PIC 9 but also have a length descriptor which specifies the amount of data which can be held within ; for example, PIC 9(10). Resolution: In a .NET environment, however, there are two types of basic integers; INT16 and INT32. Both of these integers represent an integer of different length; INT16 is a 16-bit signed integer whilsts INT32 is a 32-bit signed integer. In COBOL these two types of integer are represented as: PIC S9(04) COMP-5 and PIC S9(09) COMP-5 rescpectively. A PIC X in COBOL is converted into a string data format in the .NET environment. The .NET compiler inserts an automatic conversion beween the COBOL variables and the strings. However, it is worth noting that when defining a string in .NET, the default length of the string is 8192 bytes. Although the developer may in fact require a string which is ten characters in length. So problems
Problem: When calling a dynamically loadable shared object (.so or .sl for HP/UX) you receive this error. Resolution: You have attempted to load a shared object with a name that has not been defined. When you create a dynamically shared object using Micro Focus "cob" (cob -zv pgm-name.cbl myC.c), any references in the COBOL or C function must be resolved at link time. COBOL pgm-name.cbl Procedure Division. Call "another-cobol-pgm". The COBOL program "another-cobol-pgm" must be resolved. That is, the linker must be able to resolve the symbol. If not, the shared object will be created, but you will not be able to load it. Hence the 9/118 error. To get around this you can specify the -U cob flag when creating the shared object: cob -zvU pgm-name.cbl myC.c The -U flag causes any unresolved reference to be treated as a COBOL program to be
Problem: When compiling a program using IDXFORMAT"8" in the cobol.dir file, can this program still access existing files with a different IDXFORMAT type? Resolution: Yes, the file handler knows the format of existing files when it opens them and reads the header information so it is possible to create new files as IDXFORMAT"8" while still being able to open existing IDXFORMAT"3" files. for example. Old KB# 1592#COBOL#ServerExpress#AcuCobol#netexpress#RMCOBOL
Problem: We have a product developed in C that uses the MicroFocus file handler (extfh). The product works on a variety of Unix platforms, but we are having problems porting the product to RedHat Linux. When we attempt to open the file, a 9/142 error occurs. Resolution: This is a problem with byte-ordering. Using the CTF utility with the following options: mftrace.level=info mftrace.comp.mf.mffh.xfh#base=true produced a trace which showed the Opcode being passed to the File Handler Open was 01FA, instead of FA01: 15:04:55.295 MF.MFFH.XFH 65536 1 "M" 01FA Old KB# 2012#netexpress#AcuCobol#ServerExpress#COBOL#RMCOBOL
Problem: If Net Express 4.0 and Net Express 5.0 are installed on the same computer is there the capability of using either 4.0 or 5.0 of Net Express. The customer develops and distributes runtime executables, that need to run with Application Server 4.0 but would also like to use 5.0 for the clients that have upgraded to 5.0 Will the executable developed with 5.0 work with Application Server 4.0? When Net Express is opened for a compile, Net Express 5.0 comes up. Resolution: It is possible to have both Net Express 4.0 and Net Express 5.0 installed on the same computer without a problem as long as the PATH, COBDIR etc., environment variables are set so that the desired compiler folder will appear first within the environment variables folder list. If a shortcut is created on the desktop which will point to either the BIN folder of Net Express 4.0 or 5.0 as desired then it should start the correct version. These are all comp
Problem: Defining a field with S9(31) COMP-3 returns the message : * 213-S***************************** ** ** Item is longer than USAGE allows or contains too many numeric positions Resolution: According to the ANSI standard, numbers are limited to 18 significant decimal digits. All significant digits must be within 18 digits of the decimal point. Old KB# 2061
Problem: There are multiple servers on the network which contain COBOL data files. The COBOL applications and Application Server are also in a directory on the same server as the data files. CCITCP2 and Fileshare are both run as Windows Services on the servers containing the data and applications. The applications are started by logging into a Citrix server and clicking on a shortcut which will launch one of the COBOL applications on the data system. Resolution: Some people have a misconception of how a Citrix Server actually works. It is basically just a computer to which multiple users can log on to and run applications. It is a misconception that if an application is started on Citrix which physically resides on another computer then the application will be run on that computer. This is false. The application will be run in a partition on the Citrix Server computer and the computer on which the application resides will just be used a
Problem: Using Cobsql, programs compiled with the Pro*COBOL pre-compiler return 1403 for the NOT FOUND condition instead of 100. Resolution: 1403 is the Oracle SQLCODE for a NOT FOUND condition, 100 is the ANSI standard return code for the same condition. The default for the Pro*COBOL MODE is ORACLE. This provides compatibility for programs written specifically for Oracle. Programs written for othe RDBMS's and ported to Oracle or programs written using only ANSI standard SQL may require different behaviour so setting MODE=ANSI is one solution. Another solution is to leave MODE=ORACLE and use END_OF_FETCH=100. This can be set in the Pro*COBOL configuration file ($ORACLE_HOME/precomp/admin/pcbcfg.cfg by default) or as a command-line parameter to Pro*COBOL as follows: preprocess(cobsql) csqlt=oracle8 end-c end_of_fetch=100 endpOld KB# 2027
Problem: Using Server Express, compiling a program with the DB2(IGNORE-NESTED) directive the following error appears: 413 EXEC SQL 414 OPEN myCursor 415 END-EXEC * 801-S************ ( 8)** ** External Compiler Module message ** DB0114 Statement only allowed in the PROCEDURE DIVISION. Resolution: The DB2(IGNORE-NESTED) directive uses the PROGRAM-ID specified in the program source. If this does not match the program source name, it can lead to such compiler er
Problem: COBOL program uses the external file handler with CALL "EXTFH". The program works ok in 32 bits, but in 64 bit it returns a file status of 9/161 on file open. Resolution: FCD-VERSION needs to be initialized to fcd--version-number. When it works in 32 bits is normally because the whole fcd is initialized to low-values and 0 happens to be the right value for FCD-VERSION there. When compiling and running in 64 bits, P64 is set, and therefore the value for FCD-VERSION is different (see $COBDIR/cpylib/XFHFCD.CPY). The following should be added to the program's initialization procedure for it to work in any environment: MOVE fcd--version-number TO FCD-VERSION Old KB# 2081#AcuCobol#netexpress#ServerExpress#RMCOBOL#COBOL
Problem: This particular error has been encountered when using local temporary tables in SQLServer with the COBOL programs which reference a database on a local SQLServer instance. When everything works correctly, the temporary table is created within tempdb and it is possible to carry out any operation on it whether it be DDL or DML. However, if the same COBOL program references a database which is on a different instance (eg. servernt\\istanzaprova) it cannot correctly create the temporary table and, as a consequence, any DML operation (insert, update, select) returns the error sqlcode -208 Invalid object name. Running the table create again you may encounter sqlcode -2714 There is already an object named '%.*ls' in the database. Resolution: In short, this problem is caused by a collation conflict between the database collation of the application and the tempdb collation of the instance in which the temporary tables a
Problem: ccitcp2 is not installed when one opts to install Enterprise Server during the Server Express Install procedure. Resolution: If one installs Application Server or a Server Express development system without accepting the Enterprise Server (ES) option, ccitcp2 is installed. If one responds 'yes' to installing ES or installs a stand-alone ES, ccitcp2 is replaced with a script that runs mfds. Old KB# 1994
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.