Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: When setting the switch A, the display is working differently in that it sends some blank lines after the execution/animation. Without A the comman line immediately returns after the last Display. For Example with A there are some empty lines after the execution between the last dispay and when the command line returns: Display 1 Display 2 Display 4 /home/support/test Resolution: After the user exits animator, the shell command prompt appears about 15 lines below the remnants of the program's DISPLAY output. For customers who don't want the program's output to be upset by Animator in any way, recommend cross-session animation, like so: Log in as the user that will run the program and cd to the directory from where the program will be run, then type "cobanimsrv". In a separate window, log in as the same user and cd to the same directory, then execute the program normally, as t
Problem: Is there an easy way of telling whether we have Application Server, Enterprise Server or the Development System set up in the environment? Resolution: You can recognize the product from the second character of the PRN. This is the number we use to identify the product versions for each platform. You can see the PRN by typing cob -V. The possible values for the second character are : X for Server Express, 1 for Application Server B for Enterprise Server So, the PRN will look similar to these examples: PRN=RXCTH/AAM:9i.T4.40.01 - development product PRN=R1CTH/AAD:9i.T4.40.01 - application server PRN=RBCTH/AAC:9i.T4.40.01 - enterprise server You can also cat the $COBDIR/etc/cobver file for this information. Old KB# 2032
Problem: Whenever an event is triggered on an ASP.NET Web page, the run-time system will automatically invoke the associated COBOL event handler method while also passing the required event handling parameters within the call. Resolution: The actual parameters that will be passed depend on the type of the event but in most cases the event handling method will be generated as follows: method-id. "Page_Load" is private. local-storage section. linkage section. 01 param-sender class-sysobject. 01 param-e class-eventargs. procedure division using by value param-sender param-e. There are two parameters that are passed to the Page_Load event. The first one is "param-sender" which will contain the object that fired the event. This could reference a Button control on the current page. The second parameter is "param-e" which will contain an instance of the "System.EventArg&quo
Problem: Changing the date format stored in COBOL register from MMDDYY to DDMMYY. Resolution: The compiler directive CURRENT-DATE specifies the format stored in the CURRENT-DATE special register. The syntax is CURRENT-DATE "date-format" "date-format" is either DDMMYY or MMDDYY Setting CURRENT-DATE to DDMMYY causes CURRENT-DATE to be stored in European format. The parameter can be specified in either upper case or lower case. Old KB# 2003
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: Going to Tools | Options | Micro Focus COBOL Tools | OpenESQL Assistant shows the following message on the Options page: ----- This dialog should display an Options page added through extensibility. However, the control to display here could not be loaded. Please re-install the Add-in that displays this page. ----- Resolution: 1) Uninstall current WrapPack 2) Uninstall the Net Express support for .NET a. Go to Add or Remove Programs b. Select Micro Focus Net Express 5.0 c. Click on Change d. Click on Next e. Make sure Modify is selected f. Click on Next g. Click on the drop-down list of Net Express support for .NET h. Select "This feature will not be available." i. Click on Next j. Cick on Install 3) Repair Net Express installation a. G
Problem: Animating programs located in one folder location off the \\DEBUG folder (i.e., "FOLDER1\\DEBUG") which call .gnt's from a different folder off the \\DEBUG folder (i.e., "FOLDER2\\DEBUG") generates an "ERROR 173: Called program not found in drive/directory"). Resolution: Within the NetExpress IDE, do the following: 1.) Open a NEW project 2.) Pull down the "Project" menu and select "Properties". The "Properties Window" will appear. 3.) Click on the "IDE" button located in the "Environment" section of the window. 4.) A window will pop up with the title "Configure IDE environment". Change or set environment variables for the environment within that window. For example, to change the environment variable COBDIR: enter COBDIR as the "Variable" name. &nbs
Problem: When attempting to animate a program, the screen goes blank and then control returns, that is, nothing apparently happens. This occurs both when compiling from the command line, or when using 'F4 Animate' from within SDE/Toolbox. Alternatively, when attempting to animate from within SDE/Toolbox, a message appears: ERROR: File incompatibility Resolution: The solution is that the program for which animation is being attempted is a .gnt, but it has not been compiled for animation. By default a .gnt will be found in preference to an .int, so if both exist, the .int will not be used, *unless the extension is explicitly specified*, which can be done both from the command line, or by filling in the complete filename from within SDE/Toolbox, as seen below: Animate****************************Non-Threaded**************Ins*Caps*Num*Scroll F1=help F2=dir F3=switches F4=threads &nb
Problem: After performing a REWRITE in a COBOL program, a grep of the file written to may show the record twice. This does not happen with Object COBOL Developer Suite. Resolution: The Server Express file handler attempts to write new data to a file as quickly and as securely as possible. It achieves this by writing a new copy of the record in a different place on the file and marking the 'old' record for deletion. Thus even if there is a crash before the index is updated, reading the file will give the correct information. Records marked for deletion will show up in a 'rebuild -f' as Type 2 records. A proper rebuild will remove them. The only downside to this way of working is that a grep of the file while Type 2 records still exist on there will show them as apparently present. This is potentially confusing, but the advantages of working in this way outweigh the disadvantages (old records can after all never be accessed). Old KB# 2052
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: I have a line sequential file, with the following file structure: 01 lsfile 05 ACCOUNT PIC 9(9) COMP. 05 MOREINFO PIC X(20). I want to rebuild this file to IDX8 format, using ACCOUNT as the key. Can I use a COMP field as an index, if so, how can I do this? Resolution: The size of a PIC 9(9) COMP is 4 bytes so, in this case, the total record size is 24 bytes. For the lsfile example: 01 a pic 9(9) comp. 01 b pic x(20). $ rebuild lsfile, ifile -r:f24 -o:lseq,ind -t:mf8 -k:1 4 $ rebuild ifile -n File : ifile
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: 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: DECIMAL-POINT IS COMMA is a clause which is used in the IDENTIFICATION DIVISION of a COBOL program which changes the thousand separator (comma) and decimal point (point), which are the default settings, to thousand separator (point) and decimal point (comma). Naturally, if using this clause, the program is compiled and ultimately run to use this format. This is not always desirable and can be resolved at runtime when running the program. Resolution: To change the format during execution the NLS compiler directive must be used. At compile time the checker must know which symbol is used for the decimal point in the program source code itself; for example, in PIC clauses. Then there is the value that is used at run time; for example, the value which is ultimately displayed and written to data files. Normally these are the same. However, if you compile the program with the checker directive NLS then the runti
Problem: The "DE-EDIT" directive specifies the results how a de-editing move from one numeric-edited data-item to another numeric-edited item or to a numeric item. Resolution: The syntax for the "DE-EDIT" directive is: DE-EDIT "[1 or 2]" Specifying integer 1 - will behave as in earlier versions of this compiler. It ignores the Picture clause of the sending field. Specifying integer 2 - will de-edit according to the Picture clause of the sending field. This provides ANSI '85' conformance. The default is 2. Example: 01 a pic 909V99 value "30456". 01 b pic 9(5). ... move a to b With DE-EDIT"1", b contains 30456. With DE-EDIT"2", b contains 00034; the 0 after the 3 is dropped because it corresponds to the insertion character
Problem: Documented as follows: The configuration parameter MOUSE-ENABLE adds mouse support. Clicking the left mouse button anywhere within the current input field causes the cursor to relocate to that position. You do not need to add new dialog code: the behavior is instantly available on existing screensets when this parameter is set. Syntax: [NO]MOUSE-ENABLE Properties: Default: No mouse support. Resolution: Enable Mouse Support has no effect on UNIX but will work on the DSCHAR port to Net Express. This can be seen by viewing the Dialog runtime config file $COBDIR/dialog/dsdef.cfg * [NO]GOF-TO-OUTFIELD [No] Allow cursor to GOF into output field * IGNORE-NUMERIC-SETCUR Ignore SETCUR value on entry to numeric fields * MOUSE-ENABLE &nb
Problem: The ability of a COBOL program to store and retrieve the values of certain data items and objects from within any Web page of an application that will also maintain its state between multiple client requests is essential in ASP.NET development. Resolution: The following code will create a new session variable called "MyName" which will be associated with the value of the "Text" property of the wsName object. Session variables are always stored as a name/value pair where "value" can refer to anything from a simple string to a complex COBOL object instance. The actual location where Session variables will be stored is dependent upon the Session state configuration options set within the applications Web.config file. The default storage location is "InProc" which means that the Session data will be stored within the memory space of the ASP.NET worker process "aspnet_wp.exe". invoke self::"Session&
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 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 programs were moved from one machine to another, programs that had been producing standard record sequential files now created files with a hex(0A) at the end of each record, that is, line sequential files were produced by default. The version of Server Express was different, but this did not seem relevant. Resolution: The compiler directive SEQUENTIAL determines the default type of sequential file produced. The default is RECORD (SEQUENTIAL"RECORD"), the four values possible are ADVANCING - RECORD SEQUENTIAL with LINE ADVANCING. ANSI - ANSI-conforming RECORD SEQUENTIAL. LINE - LINE SEQUENTIAL. RECORD - RECORD SEQUENTIAL (a standard SEQUENTIAL file). On the new machine, a cobol.dir line contained the phrase SEQUENTIAL"LINE" (though no one admitted to having entered that text). N.B. This directive can be set "invisibly" because of another directive being used: NORM or RM"ANSI" will set this to SEQUENTIAL"RECORD" RM will
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: MFSupportInfo has been part of Net Express since version 5.0, and the file can be found in the BIN directory. It however does not produce the log file when it is executed. A black screen just flashes by. Resolution: User Account Control (UAC) is a new feature in Windows Vista to prevent malicious programs from damaging a system. One of its tasks is to protect system settings from being changed without the user's knowledge. UAC then prompts the user when certain activities are about to occur, such as installing or uninstalling a program, configuring Automatic Updates, copying or moving files into the Program Files directory or Windows directory, etc. MFSupportInfo is designed to produce a log file in the current folder, and since Net Express is installed by default in the Program Files directory where UAC has under guard, the log file cannot be produced. This problem does not occur if Net Express is installed in a different location other than Progra
Problem: Is there a log file created when installing Net Express 5.0 or 5.1 and Server 5.0 and 5.1? Resolution: The log file is created in %TEMP%, e.g. C:\\Documents and Settings\\UserID\\Local Settings\\Temp or C:\\Users\\UserID\\AppData\\Local\\Temp The log file for Net Express is called NXP32MSILOG.TXT while the one for Micro Focus Server is SRP32MISLOG.TXT. Old KB# 1615
Problem: You may have installed Server Express and are trying to have cobol and Java working together. However, when you try to run one of the test programs you get the error: Sorry unable to load libcobjvm_java2 Resolution: If libcobjvm_java2 is on shared library PATH, then ensure 'libjava' and 'java' are found on the PATH/<Shared Library> PATH. Check to see that COBJVM is set. Below is an extract from the online manuals: COBJVM Specifies which Java Virtual Machine (JVM) to load. Syntax: COBJVM=platform_nnn export COBJVM Parameters: platform_nnn platform is a three-character code that indicates the platform on which you are running Server Express, for example: ibm IBM AIX unx SCO UnixWare sun Sun SPARC nnn indicates the version of the JVM, for example: 122 Version 1.2.2 130 Version 1.3.0 Comments: You might need to set COBJVM if you are developing distributed applications wit
Problem: ======== FOR INDexed files, You can get the number of records using the FCD-RELATIVE-KEY of the structure File Control Description (FCD). You can have the FCD on-line in your prog: or assigning the FCD in your program using the FCDREG compiler directive or using the EXTFH function x"0006" == File Information ======== For Line Sequential files, you can use the UNIX command wc-l , using a PIPE to retrieve the output of this command ======== Resolution: The content of the File Control Description (FCD) is documented in Micro Focus products ......................... The program RCCOUNT.cbl uses the FCDREG compiler directive and assigns the FCD for a file . ......................... The program EXTFHINFO uses -- the EXTFH function FileInformation function x"0006" to retrieve various informations for a specific file ( INDexed and SEQUENTIAL Variable Length )... --the UNIX command wc -l to retrieve the number of records of a Line Sequential fi
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.