Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: If you use the ESQL Assistant to create host variable declarations and then compile with the DB2(...) directive then you will get syntax errors on the SQL TYPE IS clauses on the variable declarations. Resolution: The SQL TYPE IS syntax is designed for OpenESQL (ODBC) precompiler and is not compatible with the IBM DB2 precompiler. In Net Express you can use the menu option Options / Embedded SQL. On this dialog there is a checkbox to disable the use of SQL TYPE declarations. If you use this the code should compile with the DB2(..) directive. Old KB# 1352
Problem: How to see all variables on current line while debugging in Visual Studio ? Is it possible to do this without explicitly adding them to a watch window ? Resolution: The "autos" window while debugging performs this functionality. If the window is not visible by default in Visual Studio it should be added to the system using the "Debug \\ Windows \\ Autos" menu option or by using Control-Alt-V A shortcut. Old KB# 1286
Problem: How can you convert numeric data coming in from a csv into COBOL numerical values ? If you have a CSV file then the numeric data is in text format. These need to be converted in COBOL data items such as s9(9)v99. Resolution: You can write routines to perform the conversion but there is also a Intrinsic function numval (and numval-c) that will perform this conversion. Some example code that does this is:- special-names. class decimalchar is "0" through "9" " " "-" "." . working-storage section. 01 ws-text1 pic x(20) value "-123.34
Problem: Doing a statement: ACCEPT MAIN-MENU ON ESCAPE GO TO 20-CK-FUNCTION. This allows PF keys to be depress for different answers. But every time hitting a PF key for the answer the screens states: THAT KEYSTROKE HAS NO MEANING HERE. The older version (workbench) worked just fine. Resolution: First check the old system for this file --> ADISCTRL and place it in the directory with the .EXE If it does not exist to create a new one using the utility ADISCF, to find this in help, on the index tab type in adiscf Then to manually link in these modules if using static linking for the .EXE: Highlight the exe, go to build settings, go to the link tab change the category from "general" to "advanced" and on the line that says link with these objs list these modules; adis,adisinit,adiskey,adisdyna Old KB# 1291
Problem: A problem has been encountered when attempting to install NetExpress 3.1 on a machine running Windows 2000. (However, this may occur with other versions of the product and operating systems). Despite there being more than sufficient disk space available, the system reports that there is insufficient space and so the installation aborts. Resolution: To overcome this problem, carry out the following steps: 1) First, log on as Administrator 2) Enter into the registy and open the following keys: HKEY_LOCAL_MACHINE SOFTWARE Micro Focus delete the "Micro Focus" key and close Regedit. 3) Empty the contents of the environment variables TEMP and TMP and then ensure that they point to C:\\Temp 4) Disactivate any AntiVirus software 5) Ensure that there are no other installations of Application Server x NetExpress on the machine in question. 6) Attemp
Problem: How can you validate numerics in a .Net Winforms TextBox control. Resolution: The keypress event in .Net allows you to trap when a key is pressed on the keyboard and interpret what key was pressed. This allows you ensure that only digits , "." , " " and "-" are entered. More complex checking can also be performed on the TextChanged Event. This is fired when the Text in a textbox is changed and allows you to check the full text that is in the control. Some examples of using these events to handle numeric checking is:- method-id. "textBox1_KeyPress" final private. linkage section. 01 sender object. 01 e S-W-Forms-KeyPressEventArgs. procedure division using by value sender e. &n
Problem: Releases 4.0 5.0: As part of the execution of an application it might be neccessary to force the application to re-read the File handler Configuration Parameters file. For more details on how to use the File Handler configuration file check the File Handler programming guide, chapter 6. Resolution: To accomplish this you can use the CBL_CFGREAD_EXTFH call. The call forces the File Handler to reread its configuration file. Syntax: call "CBL_CFGREAD_EXTFH" using filename returning status-code Parameters: filename pic x(n). status-code See Key On Entry: filename The file to look for. The name can contain a path, and must be terminated by a space. If the filename is null (x"00"), the File Handler looks for the file using the standard search order (see the topic Searching Conventi
Problem: How can the e-mail program be determined which is installed on the Windows PC Resolution: Please have a look into the registry. Step1: Directly under \\\\HKEY_CLASSES_ROOT the entries for the e-mail protocols pop and smtp can be found. The subentry PROTO HANDLER shows a (different) CLSID for each of used protocols. Step 2: This CLSID references its own entry under \\\\HKEY_CLASSES_ROOT\\CLSID. Open the subentry belonging the CLSID found in step 1. There, on the next level, the subentry InprocServer32 shows the DLL which handles the actual protocol for the search started in step 1. Old KB# 1394
Problem: Catalog shows the VSAM Attribute as Non-Unique even if it is unique Resolution: This is a bug in the base release of NetExpress v5.0/Server Express v5.0, this is fixed in v5.0 WrapPack 4 Old KB# 1372
Problem: Was working fine in SQL Server 2000, but now, cannot see the locks. Resolution: Since the SET CONCURRENCY statement is not supported by all ODBC drivers try the (WITH UPDLOCK) hint as follows: SELECT col1, col2 FROM MyTable WITH(UPDLOCK)WHERE (Col = 'Predicate1') This worked in SQL Server 2005. Old KB# 1303
Problem: Trying to compile a program and it will not accept the $set that is in the program Resolution: The compiler directive dialect "entcobol" was being used. This is a mainframe dialect and does not accept $set within programs (this is for PC dialect) The workaround is to use the MF directive which will allow pc code in the mainframe program or set directives in a directives file. Old KB# 1327
Problem: Sometimes when executing a Cobol program under a deployment environment you may encounter an Application Server for Net Express Semaphore error. Resolution: One way that this can be accomplished would be to use a BAT file to drive the execution of the program. An example would be as follows; @echo off rem 0001 The license database for Net Express Application Server does not exist rem 0002 ASLM: No license database header rem 0003 The license database for Net Express Application Server cannot be opened rem 0004 The license database for Net Express Application Server has been moved from its original location or removed and recreated rem 0005 A checksum has failed in the license database for Net Express Application Server rem 0026 No App Server License available for CGI rem 0027 No license is installed for Net Express Application Server rem 0028 All number Application Server Licenses are in use rem 0044 ASLM: Semaphore failure.
Problem: Net Express with .NET Calling a user-created file handler in .NET gives error message when compiling: " Failed to find system program "aUserfh" " The CALLFH(aUserfh) directive is set and the file handler is in the project directory. The call to the file handler works if the DLL for the file handler is referenced in the project. However, what if there is the need to compile the source from a script with the directives in a .DIR file? Resolution: Make sure the ILREF"<your assembly name>" directive is also set or included in the .DIR file. This does the equivalent of adding a reference in the Visual Studio IDE. Old KB# 1266#COBOL#netexpress#ServerExpress#RMCOBOL#AcuCobol
Problem: A COBOL record layout is similar to a C structure containing arrays of characters. When the Compiler assigns a COBOL record layout, it does not take into account the alignment of binary or pointer data items, or byte ordering of binary (COMP-X) data items, required by any specific hardware platform; because of this, COBOL applications are extremely portable. However, this portability can cause problems in mixed-language applications. C structure layout is not as rigidly defined as COBOL record layout and varies quite widely from operating system to operating system. Resolution: For example, in COBOL the structure: 01 mystruct is typedef. 05 mystruct-key-1 pic x occurs 2. 05 mystruct-bin-1 pic x(4) comp-5. is six bytes long, no matter what platform it is compiled on. However, with the C compilers provided on mos
Problem: Visual Studio 2005 How to convert a character string of numeric digits into its equivalent numeric value - not as simple as moving the value of an alphanumeric data-item to a numeric (floating-point) data-item, as the decimal point may be lost. Resolution: Attached is a structured COBOL approach to converting the string to its numeric decimal equivalent. It splits the string on the decimal point into its integer and fractional parts; then performs a COMPUTE to work out the numeric decimal equivalent and store it in a numeric data item. This is just one approach. Attachments: testStrtoDec.cbl Old KB# 1263
Problem: Solution is only to have on-line the LINK.exe Version 8 thru PATH environment variable and the link Version 8 libraries thru LIB environment variable... These ressources having to be invoked firtsly before the ones delivered under Net Express ( ie: [NetxInstallDIR]\\base\\bin\\link.exe & [NetxInstallDIR]\\base\\lib\\user32.lib & kernel32.lib & advapi32.lib & msvcrt.lib & gdi32.lib & advapi32.lib LINK.exe version 6 is delivered with Net Express... Resolution: Working in a DOS command prompt and manage so Net Express uses MS LINK.exe Version 8 ================= 1) ---> Launch Visual Studio 2005 Command Prompt this shortcut launches ... %comspec% /k ""C:\\Program Files\\Microsoft Visual Studio 8\\VC\\vcvarsall.bat"" x86 which correctly sets PATH & LIB envt vars so MS LINK.exe Version 8 can be used .... ====> You c
Problem: A Net Express application is occassionally getting a File status error 9/199 returned when reading a sequential file. This is associated with messages in the Event Log - GetLastError() returned 64. Resolution: A 9/199 message indicates that the filehandler has received a message from the operating system that it does not understand. As we know, the Windows Event Log has indicated that Windows has issued an error message - GetLastError() returned 64 - which looks to be the real problem. Taking a look on the references on the Microsoft support site, this would point towards a newtwork traffic issue that is then subsequently throwing a 9/199 Referring to the Microsoft system error codes from this URL: http://msdn2.microsoft.com/fr-fr/library/ms681382.aspx Then seeing that a returned code of 64 = ERROR_NETNAME_DELETED 64 The specified network name is no longer available - meaning the environment has encountered network problems. De
Problem: Both Netexpress 5.0 and 4.0 are on the machine, trying to run a 4.0 exe and getting an error that it cannot find the 4.0 run time: "Runtime dll 'cblrtss, version 4.0 entry pint mf_ld_dynlnk_lib_check not recorded in registry not found or incompatible with requirements of dynamically bound cobol program dynamic binding of rts requires runtime dll, at least version 5.0" Resolution: To ensure that the EXE has been compiled under the 4.0 runtime, the problem is can be that the EXE is calling a DLL - and there is a mix one if not more of the DLLs it is finding has been compiled with the 5.0 version. Assure that all modules being used have been compiled under the same version and that if there are other versions of the same modules from a different version that they cannot be found in the PATHing and COBDIR when running a different version. Old KB# 1325
Problem: Release 5.0: After installing very new this Net Express 5.0 developing environment: (1) How to start an user application developed with NetExpress 5.0 not using the Net Express 5.0 IDE? (2) Is there a need to install a Micro Focus Server (Application Server) on the same machine? Resolution: (1) This can be done starting a Net Express 5.0 command prompt: Start -> All programs -> Micro Focus Net Express 5.0 -> Net Express command prompt (on Vista 64 bit machines there are both Net Express 32-Bit Command Prompt, also Net Express 64-Bit Command Prompt available) and to go to this own .exe to start the user application, it could be necessary to adjust Windows PATH environment variable first if the .exe calls dll's needed for this application. (2) It is not possible and there is no need to install a Micro Focus Server (Application Server) on the same machine having this Net Express 5.0 product already instal
Problem: Is it possible to access MicroFocus ISAM files on a Windows XP 64-bit platform from a NetExpress application running on a Windows 32-bit platform? Resolution: Yes, it is possible to access Micro Focus ISAM files on a 64-bit platform from a Net Express application on a 32-bit machine. Old KB# 1256#netexpress#COBOL#RMCOBOL#AcuCobol#ServerExpress
Problem: getting an ILLOGIC (Eibresp=21, 110) when trying to read a RRDS file. The CFLE program (DFHZDFDM) reads it fine. It is a standard CICS READ. EXEC CICS READ DATASET (WS-DATASET) RIDFLD (WS-RECORDKEY) INTO (WS-RECORDAREA) LENGTH (WS-RECORDLEN) EQUAL NOHANDLE &nb
Problem: The COBOL intrinsic function random generates after each program start the same sequence of numbers again - it is a pseudo-random number. How can a better random number be generated? Resolution: The WinApi UuidCreate computes a unique random number. The probability to get the same number twice on different computers is very low, because UuidCreate uses the Ethernet or token-ring hardware address for this computer to be unique between different computers. Please check, if the UUID computed with the attached demo resolves your requirements. Attachments: UUID.zip Old KB# 1295
Problem: Net Express To run the utility in bulk for multiple data files conversion but unable to figure out how to redirect the output of DFCONV to a log file. For example: @run dfconv CFAB.PRO &gt; loadCFAB.lst The command ran successfully but the output of dfconv was displayed on screen instead of being redirected to the log file loadCFAB.lst. Resolution: To do this from a netexpress commandline: set cobsw=s5 run dfconv xxx > dfconv.txt Running multiple dfconv in one command file and getting all output to go to one file (appending) To do this: set cobsw= s5 run dfconv xxx >> dfconv.txt Old KB# 1296
Problem: Crystal report has a COM Interface (RDC) that allows you to generate reports from an application. How do you call the export method from COBOL? Resolution: The export method is called from VB as follows:- myreport.export false In COBOL you can perform this using:- 01 boolval pic x comp-x value 0. move 0 to boolval *> Sets to false invoke myrdcreport "export" using by value boolval Old KB# 1399
Problem: Are there any general tips on how to inprove file access performance? Often we are asked about buffers, and if there is a way to make read only data read faster? Resolution: Things to consider are: Exclusive access (OPENINPUTSHARED/READSEMA). For a file that is accessed many times, have a consider using the LOADONTOHEAP EXTFH (external file handler) configuration option and/or SEQDATABUG EXTFH configuration option. Each of these is documented in the Net Express help. Also from the Net Express help, under the File Handler help>performance: You can take various steps to improve the performance of the File Handler. These all involve the use of various configuration options. Details are as follows: You can increase the number of indexed file nodes that are cached, as opposed to being held on disk. You specify the number of nodes with the INDEXCOUNT configuration option. We recommend a setting of 32, but you can choose a larger
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.