Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Compiler error "unknown class" when building a .NET project that references classes in another project. Resolution: If you reference a class that exists outside the project you are building, be sure to include the namespace for the class being referenced in the repository. In Net Express with .NET, there is a "Default Namespace" under the "Common Properties"..."General" area. You can see the project properties by right-clicking on the project name in the Solution Explorer window and choosing "Properties" from the pop-up menu. The namespace will default to the project name. If you blank-out this name, you don't have to prefix the class name with a namespace in the repository. As an example, if I defined a class called "MyClass" in the "MyProject" project with a default namespace of "MyProject", then you would reference this class in the repository as: REPO
Problem: To be able to control a ListView via the keyboard you need to set focus on the control. Is there a way of doing this? Resolution: Unfortunately the Dialog System SET-FOCUS function does not work with ListView controls. So, it is necessary to look at the control program and add the following code: ... PROCEDURE DIVISION. ... when "SET-FOCUS" invoke Object-Reference "SetFocus" ... This new function is then called from the screenset via the following code: ... SET OBJECT-REFERENCE(1) LVIEW MOVE "SET-FOCUS" call-function(1) CALLOUT "lviewctl" 3 $NULL ... Functions can also be added for hiding and showing the ListView control if required. Old KB# 7122
Problem: An attempt to do an INSERT into a MS Excel worksheet fails with SQL error code -39 that says "invalid character value for cast specification null." Resolution: Make sure the value to be inserted is allowed in the receiving field. For example, inserting a non-numeric value into a numeric field will fail with the SQL error code -39. To resolve it, either change the receiving field as alpha or make sure the value is numeric before inserting it. Old KB# 7109
Problem: The customer was making a CALL to a subprogram in the form of an external DLL. He was attempting to use the ON EXCEPTION clause of the CALL statement by using ON EXCEPTION CONTINUE. He did not have a NOT ON EXCEPTION phrase nor did he have an END-CALL or a period to end the CALL statement. He could not figure out why none of his statements following the CALL were being executed since he knew that the CALL was being executed successfully. The following is the sytax that he used: 100-TEST. IF WS-TEST-TRUE MOVE "PROG2" TO WS-NEXT-PROG CALL WS-NEXT-PROG USING RFVCODES RETRN-CD ON EXCEPTION CONTINUE CANCEL WS-NEXT-PROG &nbs
Problem: PLS-00422 no PL/SQL translation for the bindtype given for this bind variable Cause: A host variable was passed (by an Oracle Precompiler program, for example) to PL/SQL for binding. However, its datatype is not compatible with any PL/SQL datatype. So, the binding failed. Action: Change the datatype of the host variable to make it compatible with a PL/SQL datatype. Calling a stored procedure with COMP variable. Using Oracle precompiler. Resolution: Ensure that the host variable definitions are suitable for the columns being used. For example, with a host variable defined as PIC S9(13) COMP, this should be changed to either PIC S9(9) COMP for an integer field, or PIC S9(13) COMP-3 for a decimal-type field. Old KB# 7112
Problem: INSERT with ACCESS ODBC gets SQLCODE -106 optional feature not implemented Resolution: Compile the application with the SQL(USECURLIB=YES) compiler directive. Old KB# 7103
Problem: How can I autoconnect to an Oracle database when using procob / COBSQL ? In OpenESQL.ODBC you can by using the SQL(INIT) directive to connect to a database. How can you do this using Oracle and the COBOL Precompiler (procob) ? Resolution: Procob has the AUTO_CONNECT configuration option. Old KB# 7074
Problem: Many developers find that older COBOL applications or those written for other COBOL compilers like WANG or DEC, demonstrate numeric entry that seems simpler than what Micro Focus COBOL expects. Fewer keystrokes are needed to complete the entry and decimal alignment of edited numeric fields doesn't require the entry of a final period (.) in order to complete the ACCEPT command. Here's a trick that works for all versions of Micro Focus COBOL, whether you are using UNIX products like Server Express or Object COBOL Developer Suite or the PC products like Net Express or the older COBOL Workbench. Resolution: Using this short demonstration example: Program-ID. Numtest. WORKING-STORAGE SECTION. 01 MY-NUMBER PIC 9(09).
Problem: Session Recorder enables the recording of all keystrokes and screen images during the execution of a COBOL program. This was available in the old Micro Focus Workbench. Resolution: Session Recorder is not available in Net Express. Note: this feature is however available in the Micro Focus Object Cobol or Micro Focus Server Express on Unix. Old KB# 7123
Problem: The WHEN-COMPILED is a special register that can be used as the subject of a MOVE to a 20 position field. 01 DISPLAY-COMPILE-TIMESTAMP PIC X(20). MOVE WHEN-COMPILED to DISPLAY-COMPILED-TIMESTAMP. Resolution: Old KB# 7066
Problem: Getting truncation of Oracle NUMBER(27,9) column using ODBC Resolution: The host variable definition you need for the Oracle NUMBER(27,9) in COBOL needs to be PIC S9(18)v9(9) comp-3. The directive INTLEVEL(4) is required to compile program. Old KB# 7019
Problem: COBES0100S duplicate CURSOR Resolution: From Net Express 4.0 onwards, OpenESQL requires all cursor names to be unique. This restriction did not exist in earlier versions of Net Express. If the existing source code looked like this : EXEC SQL DECLARE CURSOR-1 CURSOR FOR S1 END-EXEC PERFORM CHECK-SQL-STATUS EXEC SQL PREPARE S1 FROM :SQL-STATEMENT END-EXEC PERFORM CHECK-SQL-STATUS. EXEC SQL DECLARE CURSOR-2 CURSOR FOR S1 END-EXEC PERFORM CHECK-SQL-STATUS EXEC
Problem: Changes to DSDEF.CFG are effective when using the Net Express IDE, but not when using Application Server. Where does it have to be located so that the file is picked up? Resolution: Place the dsdef.cfg file in the current directory of the application OR Set the DSDIR environment variable to the drive and path to where the file is located DSDIR=drive:\\path\\dsdef.cfg Old KB# 7037
Problem: When attempting to generate COBOL calling C#, the regasm command gets error "cannot bind to server <DLL name>" Resolution: The following steps will allow Cobol to call a .net dll. 1. Create a new VS.NET class library and add a simple method that returns a string. 2. Strongly name the assembly Use the sn.exe utility to create a key for the assembly (sn.exe -k TestKey.snk) 3. Add TestKey.snk to the VS.NET project and modify the AssemblyKeyFile attribute in AssemblyInfo.cs to have the filepath to TestKey.snk i.e. (last three lines in the AssemblyInfo.cs) [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile(@"C:\\Net Express\\Base\\DEMO\\omdmap\\TestKey.snk")] &nb
Problem: What are the maximum file limits when using FILEMAXSIZE=8. Resolution: The large file support is as follows: 1) By default, shared files can be up to 1GB, unless you use LOCKTYPE=2. In the latter case, the file size is limited by whether duplicate key compression is used: 4GB if it is not and 2GB if it is. 2) If you want to go beyond this then you can use IDXFORMAT(8) which allows 256TB for the default 48bit pointer form. 3) Some OSs (e.g. 95) will not allow files greater than 2GB and such cases you can use STRIPING which has a maximum of 512GB (256 x 2GB). Please take note of issues with FAT format and mixing environments when using large files on Windows. Old KB# 7063#ServerExpress#AcuCobol#RMCOBOL#COBOL#netexpress
Problem: Do ODBC drivers come with Net Express? Resolution: The only ODBC driver shipped with Net Express 4.0 or later is for use with the Micro Focus SQL Option (XDB). For details on ODBC driver vendors, there is an independent ODBC portal at http://www.sqlsummit.com/ODBCPORT.HTM , which has a link to a list of ODBC driver vendors. Micro Focus does not endorse, recommend, or otherwise suggest that these products either do or do not work with any version of Micro Focus products. Old KB# 7026
Problem: Where is find on field option in Net Express Data File Editor Resolution: Steps for finding a value assoicated with a specific field in a datafile: 1. open the datafile - select file > open 2. open the associated structure (str) - select file > data tools > load record layout 3. from the record layout (structure) click on the field name containing the value to be searched 4. select search > data tools > data file find and replace, a find dialog box is displayed 5. in the dialog box - check hex option 6. after checking hex, Use field option will be available for checking - check Use field note: This will automatically check Within Offsets option displaying the proper value for Left and Right based on field position in record and field length. Left and Right can be changed to isolate a particular range within the specified field if nece
Problem: Is it possible to access multiple databases within a single OpenESQL application? Resolution: Yes. This is easily accomplished using named connections and the SET CONNECTION statement. At the beginning of your program you must connect to each database you wish to access. Each CONNECT statement specifies the AS clause which associates a user-defined name to the database connection. When access to a specific database is required the SET CONNECTION statement is issued specifying the name associated with the desired database connection. All subsequent SQL will access this database connection until another SET CONNECTION statement is issued. Below is a simple program that demonstrates accessing an SQL Server database and a DB2 database. The program opens a cursor on the DB2 database, fetches a row and, based on the value for discount-stor-id, retrieves a row from the DB2 database. Data Division. 01 dsqlcode pic s9(4) comp-5. EXEC SQL INCL
Problem: The same CGI (or any CGI's) runs with previous versions of IIS, but when it is executed on IIS 6.0 of Windows 2003, IIS returns error 404. Resolution: This error is expected, as the default behavior in IIS 6.0 is to prevent any CGI's and ISAPI's applications being executed. Users will have to register each CGI or each ISAPI in IIS to allow it to be executed. To register a CGI or an ISAPI: 1. Start IIS Manager from Administrative Tools 2. Expand (local computer) 3. Click on "Web Service Extensions" 4. Follow the instructions on the right hand pane on how to add a new web service extension Old KB# 7029
Problem: DB2 application returned SQLCODE -1403 on connect statement Resolution: sqlcode =-1403 The username and or/ password supplied is incorrect for DB2 ECM interface if you use the host variables for userid and password in the connect statement and these host variables are longer then actual name and password.To resolve use null termination (Example: Move 'userid' & x'00' to db-userid) to both user nme and password. This should no longer occur with Net Express 3.1 and later. Old KB# 7064
Problem: SQL Server Table not showing up in OpenESQL assistant, though it appears within the SQL Server query analyzer. Resolution: Ensure that the ODBC data source name is configured to use the correct database. Old KB# 7065
Problem: Using Net Express I-O syntax to read an XML document which is in the form: <containing-doc> <childdoc1></childdoc1> <childdoc2></childdoc2> </containing-doc>, where there can be 100,000 or more instances of the <childdocn> element. When this file is opened for input, and a READ filename is executed, the entire document will be read into memory in the form of an XML DOM tree. If the document being read is very large, say 60MB , this READ operation could take up to an hour or so, and it may actually use up all the available virtual memory on your computer. This would result in a Windows error message about the system's Virtual Memory being too low and the program would then crash. Resolution: There are a few ways that you can work around this problem. 1. Increase the amount of Virtual Me
Problem: Use PANELS2 functions or Class library reference's methods. In the code pasted below, the Entry field's handle is set in the data EFhandle of the data-block through the use of the Dialog system function MOVE-OBJECT-HANDLE The MOVE-OBJECT-HANDLE function lets you save the handle of an object in a numeric data item in the Data Block. This ensures the same objects are being referenced by both the Panels V2 and the Dialog System parts of your application. As an example: MOVE-OBJECT-HANDLE RENAME-PB PB-HAND MOVE-OBJECT-HANDLE RENAME-WIN WIND-HAND Resolution: class-control. EntryField is class "txtentry". DATA DIVISION. WORKING-STORAGE SECTION. 78 dialog-system &
Problem: Microsoft have implemented security on MAPI based applications so counter virus threats on desktop applications. MS Oulook when used with MAPI based applications now prompt when an external application attempts to send email. An application may not want this level of security. Using SMTP as a medium for send email may work better for the application. Resolution: There are 2 demoes attached. One is a .Net solutoin that uses .Net classes to send an email. Also there is a Win32 based Net Express demo that shows how to use CDO for Windows2000 ( available with Windows2000/XP/2003). Attachments: cdo.zip Old KB# 7018
Problem: RTS114 error returned on call to Oracle procedure from OpenESQL application COBES0100S Incorrect SQL statement syntax near begin Resolution: When converting Pro*COBOL applications to execute using OpenESQL, note that the syntax for calling Oracle procedures may differ. Specifically : o PL/SQL cannot be used with OpenESQL applications. o Parameters should be followed by the parameter type, i.e. IN, INPUT, INOUT, OUT, OUTPUT. If no type is specified, INPUT is assumed. Whereas under Pro*COBOL, you would code : EXEC SQL EXECUTE BEGIN mySchema.myProc( :param1,
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.