Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Created On: 09 January 2012 Problem: Although there is documentation with the WOW Extensions Designer that discusses the various properties and events available, there isn't a working example of how to read the properties. Resolution: The MonthCal control uses the MONTHCAL-SYSTEMTIMES definition in the Windows.cpy copy file. For example to obtain the selected date you should use the following code:Call WowGetProp using win-return monthcal1-h "date" mc-date1.See the attached example. Incident #2553227 Attachments Calendar.zip Old KB# 35367#WOWCalendar
Created On: 22 December 2011 Problem: In RM COBOL we use the following line of code and it works fine. IF (TEST-FIELD(1:1) IS LIKE CASE-INSENSITIVE “S”) In Visual COBOL this same statement causes an "Invalid Operand" error. Resolution: The UPPER-CASE intrinsic function can be used instead of the CASE-INSENSITIVE of RM.IF FUNCTION UPPER-CASE(TEST-FIELD(1:1)) = "S" Old KB# 35343
Created On: 09 January 2012 Problem: What is the equivalent syntax in Visual COBOL to this fragment of code in C# that declares a property name Message that has a couple of attributes defined? [Category("Data")] [Description("Alert Message")] public string Message { get { return message; } set { message = value; } } Resolution: You can do this in a couple of ways. You will have to add the following namespace import directive to the top of the program or in the project Properties:$set ilusing"System.ComponentModel"Since it is defining a simple property that only sets or gets the value of a field you could do this as follows:01 wsmessage string property as "Message" attribute C
Created On: 12 January 2012 Problem: After installing Visual Cobol for Eclipse update 2 the following error is shown when opening Visual COBOL for Eclipse:An internal error occurred during: "Initializing Java Tooling". Resolution: To resolve this specify another Eclipse workspace location when Eclipse starts up, this should help as old settings contained within the old/original workspace could have interferred with the new update 2, once you are up and running with the new workspace in Eclipse, try reopen Eclipse but use the old workspace this time, it should be able to read the old workspace and you are back to normal. Old KB# 35376
Created On: 16 January 2012 Problem: How does one read a text file using the .NET Framework classes in Visual COBOL? Resolution: You should look at the System.IO namespace and classes like StreamReader and File in order to accomplish the task of reading a text file in a variety of different ways.Example #1: $set ilusing"System.IO" program-id. Program1 as "testreadtext.Program1". data division. working-storage section. 01 sr type StreamReader. 01 wsLine string. 01 wsException type Exception. procedure division. try *> Create an instance of StreamReader to read from a file.
Created On: 14 December 2011 Problem: The application is deployed with version 8.1.3.1 so there is a need to compile for that version but the -Z81 compile option is not available. The -Z80 compile option is there but is not appropriate as there is a fix for an issue with the date entry control that requires compiling for 8.1 or later. Resolution: AcuBench 9.0 is missing the -Z81 compatibility option in the Project Settings, Compiler, Miscellaneous Options, “Program can be run by the version” list. The resolution is to not select “Program can be run by the verion” item. Instead, enter -Z81 in the “Additional Options” box on the Compiler tab. The same is true of the Project Settings, Compiler, Compatibility Options, “Version compatibility mode”, -C81 option. The resolution is the same, add -C81 in “Additional Options”. Old KB# 35326
Created On: 14 December 2011 Problem: After an upgrade to version 9.1.0 the application no longer displays the jpeg images. There are blank spaces where the images should be displayed. Resolution: The image handler, ajpg32.dll, was inadvertantly left out of the 9.1.0 32-bit installation. It should be in the 9.1.0 AcuGT\\bin directory. That is fixed with the 9.1.1 installer. In the meantime the workaround is to copy the ajpg32.dll from a previous installation. Or you may download the one attached to this article. Attachments ajpg32.zip Old KB# 35324
Created On: 22 December 2011 Problem: Customer is converting from RM COBOL to Visual COBOL and runs into the following compatibility issue:In some programs RM / COBOL, we use the word PROGRAM-ID to know the name of the current program. IDENTIFICATION DIVISION. PROGRAM-ID. BASE0006. ... PROCEDURE DIVISION. PROGRAMA SECTION. PROGRAMA-INI. ... DISPLAY "PROGRAM NAME: ", PROGRAM-ID.But in Visual COBOL it gives the error "invalid operand". Why is this? Resolution: Visual COBOL has its own set of Library routines that can be found in the documentation under Reference > Library Routines.An example of how to return program information about the current program and other program in the run-unit is
Created On: 12 January 2012 Problem: When starting Visual COBOL for Eclipse you receive an error saying: "Initalizing: Cannot communicate with Licensing Daemon". Resolution: You should check that your MF CES Daemon service is started/running under Windows Services. If not started, start and make sure it is set to start automatically. Old KB# 35378
Created On: 22 December 2011 Problem: There is a problem when trying to use the INITIALIZE statement with the TO VALUE phrase on a group item whose VALUE clause is specified at the group level instead of at the elementary level.It seems to be ignored by the compiler:Example: working-storage section. 01 TEST-INIT1 VALUE HIGH-VALUES. 03 TEST-FIELD1 PIC X. 03 TEST-FIELD2 PIC X. 01 TEST-INIT2. 03 TEST-FIELD1 PIC X VALUE HIGH-VALUES. 03 TEST-FIELD2 PIC X VALUE HIGH-
Created On: 16 January 2012 Problem: Prior to version 9.0, using Acu4GL Oracle or Acu4GL DB2 on UNIX it was a needed procees to relink the database libraries to the runtime. This process sometimes generated some errors. Resolution: Now, relinking is no longer necessary. For UNIX shared builds, Acu4GL Oracle and Acu4GL DB2 are now shared libraries, so all that needs to be done is to setting the appropriate environment variable (i.e LD_LIBRARY_PATH). Old KB# 35383
Created On: 12 January 2012 Problem: When starting Visual COBOL for Eclipse various plugin / java errors could be seen, indicating corrupted plugin files. Resolution: If plugins get corrupted in Eclipse you can start Eclipse with the -clean option. this rebuild/refreshes all the installed plugins.Sample usage:-Open a command prompt,-Navigate to C:\\Users\\Public\\Micro Focus\\Visual COBOL 2010\\eclipse\\,-Start Eclipse using eclipse -clean Old KB# 35377
Created On: 06 December 2011 Problem: I am using Net Express 5.1 IDE to debug a program. I begin animation by "stepping into" program. Then right-clicked a variable in the procedure code that is defined alphanumeric in working storage with a VALUE clause and selected "Examine" from the context menu. "Examine List" dialog displays with variable name and contents displayed as expected. I clicked "Change" button on "Examine List" dialog and "Change value of" dialog displays with name of variable in Title bar, but no data in pane. I cannot change contents of variable. I clicked "Monitor" button on "Examine List" dialog and it disappears, but no monitor window displays. What could be the problem? Resolution: This looks like an OCX is not registered to Windows so it cannot be used by the product. The product install and update must be performed with Administrator rights
Created On: 04 January 2012 Problem: The following compiler directive has to be set in order to enable the C$Century call (or some other RM/COBOL subroutine like C$DevEnv,...) to return a value:RM "GIVING"But if this compiler directive is used, the Visual COBOL subroutines don't work. For example, the CBL_GET_PROGRAM_INFO subroutine doesn't work; when I use it in a program, it doesn't work correctly or it returns a RTS error 114 on the call.When the compiler directive RM "GIVING" is not used, then the CBL_GET_PROGRAM_INFO subroutine works correctly.I need to use RM/COBOL subroutines and Visual Cobol subroutines in the same program. How can this be done? Resolution: The RM"GIVING" directive changes the default call-convention that is used from Visual COBOL to RM.In order to call Visual COBOL subroutines in a program that has the RM"GIVING" directive on you need to specify a call-convention of 0 when calling the Visual
Created On: 28 December 2011 Problem: How do I set compiler directives for Server Express? How many possible ways are there? Resolution: The Compiler searches for directives in the following sequence of locations: 1. COBOL system default directives in the file cobol.dir. The system will look for this file first in the current directory, then in $COBDIR 2. System default directives contained in cob options in the file $COBDIR/etc/cobopt 3. User default directives contained in cob options in the environment variable COBOPT 4. Compile-time directives contained in cob options on the cob command line (to use this method, the syntax is “cob –C directive”) 5. Program-specific directives in $SET statements in the source code file of each program.You can further customize the Compiler's behavior by creating your own directives file. You can specify the DIRECTIVES on the command line, in a $SET statement
Created On: 21 December 2011 Problem: When reading a TAB separated value text file you need to use a SELECT statement with the ORGANIZATION IS LINE SEQUENTIAL statement else the CR LF characters will not be honoured. The problem then arises that the TAB characters are converted to SPACES. This means that there is no easy way to expand the separated values out to data items using UNSTRING for example. Resolution: The solution is to use a configuration file with the following entry:RUN-SEQ-FILES TAB-STOPS=0This forces the runtime to not convert the TAB characters so that they can then be used to UNSTRING the value.See the attached example code, data file and configuration file. Incident #2551625 Attachments 2551625.zip Old KB# 35339#commadelimitedsequential
Created On: 06 December 2011 Problem: We have a data structure defined as follows: 01 TEST-INIT1 VALUE HIGH-VALUES. 05 TEST-FIELD1 PIC X. 05 TEST-FIELD2 PIC X.In the procedure division we initialize this structure using: INITIALIZE TEST-INIT1 ALL TO VALUE THEN TO DEFAULTThe elementary fields are correctly initialized to HIGH-VALUES at startup (tested in both WORKING and LOCAL-STORAGE) but INITIALIZE reverts the structures back to spaces. How can we re-initialize these structures? Resolution: The problem you are seeing is because the THEN TO DEFAULT phrase is overriding the TO VALUE phrase when the value statement is specified at group level.
Created On: 22 December 2011 Problem: When workeing with Indexed Files in RM COBOL we use the following syntax: START TEST-FILE KEY FIRST KEY-1 or START TEST-FILE KEY LAST KEY-1But it doesn't work with Visual COBOLl. How can the first or last record of a particular key be read in Visual COBOL? Resolution: This syntax is not supported in Visual COBOL. To get the same functionality you would need to do something like the following:MOVE LOW-VALUES TO KEY-1START TEST-FILE KEY >= KEY-1READ TEST-FILE NEXT RECORDMOVE HIGH-VALUES TO KEY-1START TEST-FILE KEY <= KEY-1READ TEST-FILE PREVIOUS RECORD Old KB# 35344#COBOL#netexpress#VisualCOBOL#Enterprise
Created On: 22 December 2011 Problem: This is a general article for help with UNIX License issues. Other KB articles are referred to for more information. Typical issue: License manager not found, not running, or giving an error message. Resolution: During Server Express installation, the lmfinstall script installs the LMF License Manager. However, there is an option not to install. You can execute the lmfinstall script after installation. The script resides in $COBDIR/lmf, (where $COBDIR is the directory in which Server Express is installed). If an older version of the LMF is already installed, make sure the license manager is running (verify this using the 'lmfgetpv' command), so the lmfinstall script will recognize the existing version. Then, when you run lmfinstall, the screen will say:A possibly older version of License Manager than this one is currently running on the system. It is installed in [location] It is recommended that you upgra
Created On: 23 November 2011 Problem: The application runs for a period of time and then encounters a memory access violation on a START operation. The file involved has been used in the same run unit, including START operations, with no errors. Resolution: The application was configured with MAX_FILES setting greater than 255. The MAX_FILES limit was increased in version 6.2. Prior to version 6.2 the MAX_FILES limit was 255. In order to successfully use a MAX_FILES setting of 256 or greater all objects must be version 6.2 or later. Some of the objects within the application were pre-6.2. The resolution was to recompile all of the application's programs. Old KB# 35251
Created On: 29 November 2011 Problem: Main program has data items defined with the EXTERNAL clause as follows:01 FIELD-1 PIC X(10) EXTERNAL.The main program calls a subprogram which has the same data item defined as EXTERNAL. When the main program and subprogram are both .ints or .gnts then this works correctly.When the main program is an .EXE and the subprogram is a .DLL then the EXTERNAL data items are not being shared. The value of the data item in the subprogram is not the same value as the data item defined in the main program. Why is this? Resolution: The problem is most likely that either the main program .EXE or the subprogram .DLL is being linked as static. This causes the programs to each use their own copy of the COBOL run-time system and thus they each have their own copy of EXTERNAL data items.When using EXTERNAL data items all modules must be linked to the Shared run-time system so that they share the same copy of
Created On: 29 November 2011 Problem: Using ACUCOBOL-GT version 8.1.2.1 when pasting text into certain entry fields the Runtime crashes. Before crashing it sometimes repeatedly gives the message “Too many lines”. Resolution: This is a known issue that was fixed in Version 9.0.0. Upgrading to version 9.0.0 or newer will resolve the error. The underlying cause is when a single-line entry field has the MAX-LINES property set. MAX-LINES is intended for use only with multi-line entry fields and should not be used with single-line entry fields. Removing the MAX-LINES property or setting MAX-LINES to 0 will also resolve the error. Old KB# 35284
Created On: 29 November 2011 Problem: The Thin Client application makes use of a COM object which must be invoked entirely on the server to avoid having to also install it on the client PCs. The usual way of instantiating a COM object seems to require the object be present on the client PC. For example: CREATE Application of Excel SERVER-NAME is "MyServer" HANDLE in xl-app. This requires that Excel be installed on the client PC. If not the create statement fails. How can this be accomplished so nothing needs to be present on the client PC? Resolution: Using the “Local:” prefix with the server name will cause the COM object to be wholly instantiated on the server with no requirement of anything being present on the client PC. The CREATE statement from the example above becomes: CREATE Application of Excel SERVER-NAME is "Local:MyServer" H
Created On: 28 November 2011 Problem: The user has noticed an accumulation of hundreds of Runtime log files on the server in the working directory of their Thin Client application. There are no errors noted in any of them, only several lines of what appears to be connection information. Why are the log files there? Is it possible to prevent them from being created? Resolution: When the Runtime detects that it was invoked via Thin Client it automatically creates a trace file in the working directory. Normally, setting “A_REMOVE_EMPTY_ERROR_FILE ON” in the Runtime configuration file causes those automatically generated trace files to be deleted. This prevents the accumulation of zero byte files. However, in Version 8.1.2 there was a bug which caused handshake entries to be written to that trace file and they are not empty as they should be. This is already fixed in version 8.1.3.1, and upgrading is the recommended solution. Make sure to a
Created On: 09 November 2011 Problem: In a managed code Visual COBOL program for .NET you can specify DBMAN=ADO as a directive which will cause ADO commands to be generated for embedded EXEC SQL and EXEC ADO statements in your COBOL application.In Visual COBOL how does one produce a trace file containing all commands that are executed by the Oracle Data Provider for .NET during the run of an application? Resolution: Debug TracingODP.NET provides debug tracing support, which allows logging of all the ODP.NET activities into a trace file. Different levels of tracing are available. The provider can record the following information: Entry and Exit information for the ODP.NET public methods. User provided SQL statements as well as any SQL statements modified by the provider. Connection Pooling statistics such as Enlistment and Delistment. Thread ID (entry and exit). Registry Settings for Tracing Calls The following registry settings should be configured under HKEY_LOC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.