Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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
Problem: I have an index file that I would like to know more information about it. Resolution: Rebuild -i <file-name> Displays information about the input and output files, including record lengths, file type and key structure. If you only want to see the information and do not want to perform any other operation, use the -n option instead. Old KB# 2090#netexpress#ServerExpress#COBOL#RMCOBOL#AcuCobol
Problem: A index file that works fine on windows gets a 9 error when running on a UNIX system. looking up the hex tables 9 means actually a corrupted file. Resolution: The problem is that on UNIX the idx file had another ending. Neukue.idx should really be neukue.dat.idx. 9 means a corrupt file there is a Compiler Direktive: IDXNAMETYPE The IDXNAMETYPE option specifies the format of the filename type for both the data file and, if present, the index file. Syntax: IDXNAMETYPE={0|1|2} Parameters: 0 Leave the filename of the data file the same. For the index file, discard any extension and add the extension .idx. 1 Leave the filename of the data file the same. For the index file, add the extension .idx.. 2 For the data file, add the extension .dat. For the index file, add the extension .idx. Properties: Default: 1 Comments: The name of the index file (if present) is derived from that of the data file. For example, if the data f
Problem: A window containing a toolbar war pushed/used several times by dialog system. After a while the icons in the toolbar get black and a few cycles later the program was stopped by a runtime error. The program ran out of memory. Resolution: This problem was caused by a missing finalize for the object "buttonImageList" in the "OnDestroyed"-Section of the toolbar control program which was generated some years ago when creating the screen set. The object "buttonImageList" needs to be finalized like: IF buttonImageList NOT = NULL INVOKE buttonImageList "finalize" RETUR
Problem: When creating a new mapping for a Web Service from existing COBOL code, you may find in doing so that the case of the COBOL code is lost - for example all converted to lowercase. This may cause you a problem if you have a requirement for the case to be as in the original code, for example (lower-) CamelCase. Resolution: Specify the PRESERVECASE directive in your program program: $SET PRESERVECASE This will then ensure that the original case is preserved as required.Old KB# 1620
Problem: Is it possible to rebuild C-ISAM file without IDX file ? Resolution: With Server Express 5.0 the following command can be used rebuild OLDECDOS -k:1 16:17 7d -o:ind -r:F140 Old KB# 2056#AcuCobol#RMCOBOL#ServerExpress#netexpress#COBOL
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.