Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Do DECLARATIVES override the RETRYLOCK directive? Resolution: With the standard Micro Focus COBOL directives a DECLARATIVES section does not OVERRIDE the RETRYLOCK directive. However, compiling with RM directive will cause control to passed to the DECLARATIVES section despite getting a 9/68 (locked record) error. Old KB# 1583
Problem: The following error might appear when running the cob command: cob32: Can't open message file '/opt/microfocus/cobol/lang/default/cob.msg' Even if your product is not installed in /opt/microfocus/cobol. Resolution: The problem is that the COBDIR environment variable is not set and the system cannot find the error message file to display a proper error message. Old KB# 2080
Problem: There is no property to invoke this piece of code in Visual Basic: Application.ErrorCheckingOptions.BackgroundChecking = False This is not documented in Visual Basic or in msexcel.cpy --> not defined. This attribute turns off the 'Green Triangle Indicator' that one would see in the cell when one put a text in the cell preceded with a single quote symbol as in: '12/12/04 Manualy, one can click 'Tools.... Options... Error Checking Tab.' Then, uncheck 'Enable background error checking'. When recorded under a msexcel macro, one will see the visual basic code above. Resolution: Try the following: 01 errorcheckoptions object reference. 01 backgroundchecking object reference. procedure division. &n
Problem: Is it possible to generate a pdb file for a COBOL DLL ? Resolution: The linker will generate a pdb for a COBOL DLL is the environment variable :- LINK=/debug before the linker is run. Old KB# 1619
Problem: There are times when you develope a COBOL program and a user defined data-name conflicts with a reserve word. Resolution: To remove word(s) from the reserved word list you can specify the REMOVE directive. The syntax: >>-.---.--REMOVE---"rsv-word"--------------->< -/- rsv-word = A reserved word. By default no reserved words are removed. Phase: Syntax check $SET: Initial Note: This directive does not appear in the list created with the SETTING directive. Old KB# 2075
Problem: There are three ways to determine the number of records in a file. Resolution: The record count is at offset x"40" and is 8 bytes long in the MF file, which contains the index. You can use special op code h"0003" to read the header into the record buffer. Refer to the documentation - File Handler, chapter 7.4 Operating Code. rebuild -n or -f will give you the number of records, if the information is present. The calculation for the number of records in an ISAM file is taking the length of the file and divides by the overall record length. This is actually one byte longer than the data record. Old KB# 2091#netexpress#AcuCobol#RMCOBOL#ServerExpress#COBOL
Problem: When migrating from Micro Focus Workbench COBOL to Server Express you can experience different results as Workbench COBOL. How can I get the same results. Resolution: The ARITHMETIC compiler directive specifies how arithmetic expressions are to be evaluated. Setting the ARITHMETIC compiler directive to TRUNC20 - Will truncate the number of digits to the right of the decimal point to 20 at each step of the evaluation of the expression. This provides similar results to the truncation provided in COBOL Workbench. You should only use this directive if you need to obtain evaluation results similar to those provided in COBOL Workbench. If you specify TRUNC20, you must not change the setting of the INTLEVEL Compiler directive from its default value of 2. This means that you cannot use some of the newer features, such as numeric pictures with more than 18 total digits, with the TRUNC20 parameter. The default value for ARITHMETIC is &q
Problem: When calling semctl from a COBOL program the fourth parameter is always zero. Resolution: The interface for semctl() passes a union by value. We do not support passing a union or struct by value to a C program. From SX 4.0 SP2 the shared memory demo programs in $COBDIR/demo/sharedmem have been corrected to reflect this. See sharemem.cbl and smipc.c in this directory for further details. Old KB# 1993
Problem: Giving Visual C run time library run time error on mfnetx.exe Resolution: If this error occurs then a Repair should be run from Add/Remove Programs on Net Express. Old KB# 1576
Problem: With simply a cob -x tictac.cbl the error: ./bin/cobchecker32 not found appears Looking for this cobchecker32 in /opt/microfocus/cobol/bin indeed does not exist. Resolution: Problem is that the wrong product was installed. The server product is only the deployment products, you need studio for development. Server > Deployment Studio > Development Old KB# 2048
Problem: When using arithmetic syntax and the results are not the same as the mainframe. How can I get the results to be the same. Resolution: The ARITHMETIC compiler directive specifies how arithmetic expressions are to be evaluated. Setting the ARITHMETIC compiler directive to "MF", which is the default, will not truncate intermediate results. This means that the calculation is as accurately as possible because no trunction is taken place until the very end. If you want to truncate according to OSVS COBOL, then set the ARITHMETIC="OSVS" Old KB# 1998
Problem: I would like to modify my files with SDE. But all my source files have the extension pco . Resolution: It is necessary to modify the configuration file for the development environment, which is located in $COBDIR/etc/mfcobolrc. After the tag [EDIT-USER], ( This tag describes the defaults to be used by the COBOL Editor) After the line MARGINS BAK cbl Add MARGINS pco cbl Modify the line EXTENSIONS cbl cpy cob bak CBL CPY COB BAK {space} To read EXTENSIONS cbl cpy cob bak CBL CPY COB BAK pco {space} Old KB# 2017
Problem: With project that contain many source files, the number of open windows can become difficult to manage and take a long time to manually close them all. Resolution: There is an option to keep the animator from opening a new window for each file it steps through. It is called 'Recycle Windows' and can be found by going to Options > Edit > Source Views. When this option is selected, the animator will keep recycling the same window while stepping through different source files. Old KB# 1610
Problem: Is it possible to create a CISAM file with the record size is 50,000 . In the documentation , the record size is 62Ko for all file organizations. Resolution: At the moment with Server Express 5.0 , the limit of size of the record for a CISAM file is 32767 ( 32Ko) . By default, the indexed file with fixed length records is created into CISAM format Old KB# 2068#RMCOBOL#AcuCobol#ServerExpress#netexpress#COBOL
Problem: Object Cobol Developer Suite support's relatively large key sizes in small index nodes. Object Cobol Developer Suite allows a maximum of 248 byte keys in a 1024 byte node. This is not normal behaviour but can be enabled. Server Express, the maximum key size for a 1024 byte node is 100, but this can be overridden up to a size of 220 bytes. Resolution: Using keys greater than 100 bytes in a node of 1024 bytes. Change the EXTFH configuration file from: nodesize=1024 to nodesize=1024 force This overrides the internal fielhandler logic for allocating the nodes. This could result in the file having only 4 keys per node and giving a maximum of 65536 records. Also note that this has a negative effect on performance. Old KB# 2035#RMCOBOL#COBOL#AcuCobol#ServerExpress#netexpress
Problem: We are compiling under Server Express, using cob -iv, and idy files are being created. These are filling up our temp directory, and we do not use them. How can we without creating the .idy files? Resolution: These files are created at compile time. To stop these from being created, you can set the NOCSI directive. N.B - this directive is only included in Server Express products from 4.0 onwards, for backwards compatibility, as described in the documentation: CSI This directive is reserved for internal use by this COBOL system. Because it might appear in the list of settings, it is included for completeness. It is not intended for your use, and its setting should not be changed. Syntax: >>-.---.-.----.--CSI----------------------->< -/- -NO- Parameters: None Properties: Default: CSI Phase: Syntax check $SET: Initial Dependencies: CSI sets ANIM at
Problem: Only, if the XP style (Visual style) is enabled on a Vista or XP windows: When Visual Studio is used to create a WinForms application, the painter shows the objects like push button in Visual XP style, e.g. with round edges. When running the application, the old standard style is used. Resolution: The Visual Style has to be enabled, e.g. by adding an invoke to "EnableVisualStyles" in the "main" method of the application: set mainForm to Class-Main-Form::"New"() invoke S-Windows-Forms-Application::"EnableVisualStyles" *> added invoke S-Windows-Forms-Application::"Run"(mainForm) Old KB# 1598
Problem: Which directives take precedence over which ones? Resolution: The Compiler processes the directives in the following order, and if a directive is specified more than once, the Compiler uses the last setting: 1. Directives set in project properties 2. System-wide directives file, i.e. COBOL.DIR 3. $SET statements in the source code 4. User directives file, i.e. USE(aFile.DIR) From the command line, the order is a follows: 1. System-wide directives file, i.e. COBOL.DIR 2. $SET statements in the source code 3. User directives file (i.e. USE"aFile.DIR") or inline directives If for example ANIM is defined in UserDefined.DIR and the command line is done as follows: COBOL Program1.CBL USE(UserDefined.DIR) NOANIM; The last specified directive will be used by the compiler, i.e. NOANIM, so no IDY file will be produced. If the order of USE and NOANIM are switched, then the ANIM in the directive will be used by the compiler. Note:
Problem: Columns 73 are grey while editing COBOL in Visual Studio. How can you control this behavour ? Resolution: This is controled by the project properties. In project properties there is an option for "SourceFormat" under the general tab. If "Fixed" is selected then the Visual Studio editor will gray out the text after column 72 in line with COBOL Syntax rules. If you switch this option to "variable" then the Editor (and compiler) removes this column 72 restriction. Old KB# 1550
Problem: is there a way to run mfsupportinfo without the box popping up at the end? Tied cobsw=-L1 still pops up Resolution: Type MFSUPPORTINFO /? there will be 2 options listed. /R and /S are the two options listed: /R, will create a registry dump of HKLM/Software/Micro Focus in the resulting log file. /S, will cause the pop-up box not to be displayed. A third one, not listed is /L, which will redirect the log file to an alternate location. Old KB# 1541
Problem: Hyphens specified in the frist eight characters of a program-id are changed to zeros when the program is compiled. The documentation says this should only be the case if OSVS compiler directive is specified. Resolution: The documentation is incorrect. Hyphens in a program-id will always be changed to zeros. Old KB# 2008
Problem: On the MSMQ Receive is it possible to specify a timeout ? Resolution: The timeout is actually the 4th parameter to the receive call. To specify just the tmeout you can mark the other parameters as "ommited", The relevant code for this call is:- *> Receive message (using defaults) move low-values to v move VT-ERROR to VARIANTARG-varType of v invoke OleVariant "newWithData" using v
Problem: Trying to animate a core file from a COBOL application sent from another location. Resolution: When trying to animate a core file on a server different from where it was created requires an exact copy of the executable that generated the core as well as exact copies of any shared libraries and callable shared objects that were loaded at the time of the fault. copies of any .int and .gnt and the associated .idy and source files for all of the above. The operating system must also be at exact same level. The Server Express product must also be identical. In all, it's usually easiest to animate a core file on the machine that the core file was produced on. Old KB# 2078
Problem: The customer was attempting to use the SORTSPACE by setting it as a compiler directive in the source code: $set SORTSPACE=512M Sort space set to 1MB Received the folowing error: Set compiler directive SORTSPACE = 512M "invalid, not allowed here COBCH0053S" Resolution: SORTSPACE is not a directive that can be set within a source program. It is an environment variable that needs to be set at the system level or by setting it within a projects properties for Application settings. Old KB# 1575
Problem: When running the script $COBDIR/bin/cobsje the following error is displayed bin/cobconvstrtest: error while loading shared libraries: libstdc .so.5: cannot open shared object file: No such file or directory Resolution: The error occurs because the script looks for the gcc version 5 libraries located in /usr/lib. The solution is to download and install the correct version of gcc. Old KB# 2016
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.