Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: There are times when you open a file for input and are reading thru the file and get a file lock status (9/068) on a record. Resolution: You can set the filehandler option IGNORELOCK in the configuration file extfh.cfg to Ignore locks when reading Input files. The IGNORELOCK option specifies whether to ignore locks on files open for Input. IGNORELOCK= {ON|OFF} Default: OFF Old KB# 2089#COBOL#AcuCobol#netexpress#ServerExpress#RMCOBOL
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: 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
Problem: Using COPY ... REPLACING ... gives user-name not unique errors even though the variable name is unique. The problem only occurs when using the CP preprocessor with COBSQL. Resolution: Solution tested on Red Hat Enterprise Linux 4 & Server Express 5. 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 END-C COMP5=NO P(CP) ENDP Old KB# 2037
Problem: Iinstall the FSVIEW addpack for either Net Express 4.0 or Net Express 5.0. Create a desktop shortcut which has a target executable which points to the location of FSVIEW.EXE. Question: Why does it launch with "Command Prompt"-style window with initial Title Bar text of icon name, before the FSVIEW GUI window is displayed? This didn't happen in Net Express 3.1. Resolution: There is a workaround, strange as it may seem. Open the Properties window for thr shortcut to FSView.EXE and click on the layout tab. Under Window Size change both the height and width of the window to a size of 1. Apply the change and press OK. There will still be a small command prompt displayed but it is too small to see. Old KB# 1574#ServerExpress#AcuCobol#RMCOBOL#netexpress#COBOL
Problem: Support for Generation Data Groups (commonly known as GDGs) was only introduced in version 5.0 of Server Express MTO. Resolution: Support for GDG is a complex subject but is explained in depth in the Server Express 5.0 documentation at: http://supportline.microfocus.com/Documentation/books/sx50/sx50indx.htm under the chapter: Mainframe Transaction Option Developer's Guide > 10. Advanced Data Set Information Old KB# 2030
Problem: The File Handling manual says that mfsort uses a temporary workfile during sort & merge operations. What is the name of the workfile and where is it located? Resolution: SORT uses the following environment variables to determine the location of the sort work files: Unix: TMPDIR Windows:TMP, TEMP If the environment variable is not set the current working directory is used. The temporary sort files are prefixed with M$FST and the actual files created will vary depending upon the input data. Example file names: M$FST000.TMP M$FST000.001 M$FST000.002. This applies to both Server Express and Net Express. Old KB# 2059
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: 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: 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: 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
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.