Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Release: Net Express 5.0.NET and Visual Studio 2005: When the program executes the OPEN INPUT for a file described as: SELECT MyFile ASSING "TheFile.Dat" a file status 3/5 is returned, indicating that the file could not be found. Resolution: In the traditional Micro Focus IDE the file is found in the project's directory. In Visual Studio 2005 the file is expected in the directory of the EXE, e.g. in the bin\\debug directory below the directory of the .cblproj. You can check where the OPEN expects the file if you OPEN a (different) file in OUTPUT mode. Old KB# 1382
Problem: CBL_DELETE_DIR only deletes empty directory by design. How to delete a directory with the files within then? Resolution: You always may delete file by file using CBL_DELETE_FILE or any other methods before using CBL_DELETE_DIR. A quick way to do this is to execute RMDIR or RD command in a x'91' function 35 (or in a WinAPI function CreateProcess). RMDIR and RD stand for Remove Directory. Here is a code using the RD command (RMDIR = RD): $set defaultbyte(00) identification division. program-id. x91fn35. working-storage section. 1 x pic x. 1 result pi
Problem: There is a need to determine what database to connect to at runtime, to override the default set up through the ODBC DSN. Resolution: 1. Using a EXEC SQL USE DATABASE END-EXEC statement to change database, but this cannot be a host variable but is a hardcoded name. 2. Using a connection string (with a named connection is necessary) as specified in Format 6 of Connect syntax Format 6 >>----EXEC SQL---CONNECT USING input_connection----------> >-----.-------------.---.---------------------.----------> --AS db_name- --WITH-.----.-PROMPT- -NO- >-----.------------------------------.------END-EXEC---->< --RET
Problem: Release 4.0: The creation of apslastdir key works for AS service-pack update. Application Server installed to a non-default location using the following command line: setup -s f1Drive:\\FolderName\\NewSetup.ISS For example, setup -s f1C:\\MFAS40\\NewSetup.ISS The concern is that MF AS setup files will be packaged to a seft-extract file for our customer to download. They will probably extract it to a network drive for their users to run MF AS silent install (Setup.Bat in our case). What we will have to ask them to do is to edit Setup.bat to specify where the NewSetup.Iss is located. Also, when distributing MF AS setup files on a CD with Setup.Bat. They cannot run Setup.bat directly from the CD, because they have to update Setup.Bat to specify the location of NewSetup.Iss. Resolution: Here is what is in the batch file to do the silent install using newsetup.iss file from a different location. Application Server
Problem: How to interpret Micro Focus runtime error values. Resolution: BUILD W/RELEASE: Any Micro Focus Cobol product. INTRODUCTION ========== This isn't a programming example, although a program is part of the illustration. What it is about is how COBOL Run-time errors are sometimes mis-handled by application programs. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- Rte.cbl Example COBOL program that creates a list of possible Run-time errors in &nb
Problem: How to perform Implicit Connection to a MS SQL database from a COBOL program in Net Express 4.0? Resolution: 'Database Access' book > 'Part 2: OpenESQL' > '7: OpenESQL' Create an ODBC data source to the MS SQL database and test the connection. Set the SQL directives INIT, DB (name of the ODBC data source) and PASS (username.password to access the database) Example - $set SQL(INIT DB=mydatasource PASS=username.) Micro Focus recommends that rather than using the SQL(INIT) compiler directive, that EXEC SQL CONNECT statements be used instead. Old KB# 1258
Problem: Cbllink executes three other programs: the Cobol Compiler; Cblnames; and Link. The parameter input to Cbllink, consisting of switches and filenames, determines the programs executed, the output files created, the output files retained and the Run time the program produced will utilize. The "Usage" for this program is documented as follows: usage: cbllink [-V] [-S] [-D] [-G] [-L] [-K] [-Boptions] [-Foption] [-Roption] [-Mname] [-Oname] file1 [file2,...] This can be simplified, and adjusted to improve the accuracy, as follows: usage: cbllink [switches] fileName1[.extension] [fileName2[.extension] ...] The switches you specify are actually a combination of Cbllink and Cblnames switches. The switch possibilities are covered in Cbllink & Cblnames Switches. The filename and file extension possibilities are covered in Cbllink File Types. Resolution: Cbllink & Cblnames Switches The following lists the Cbllink and C
Problem: This error was encountered on a machine with Net Express 5.0 with Support for .Net installed. This error was encountered after installing the Micro Focus Net Express 5.0 WrapPack 2, NXP3250020077.msp. After completing the install process they tried to open a .NET COBOL solution and received the following error: Unable to load C:\\Program Files\\Micro Focus\\Net Express 5.0\\Packages\\cblprj.dll Resolution: The wrappack installation notes state that before installing this WrapPack, you must uninstall Net Express support for .NET in Net Express 5.0 if you have it installed. To uninstall the Net Express support for .NET: Go to Add or Remove Programs in Windows Control Panel. Navigate to Micro Focus Net Express 5.0. Click Change. Follow the wizard and choose to uninstall the Net Express support for .NET. You can reinstall the updated Net Express support for .NET after installing the WrapPack using the same procedure as above but choosin
Problem: Passing a non-recognisable or non-existent date to the INTEGER-OF-DATE intrinsic function returns a value of 0. Example; C:\\>type Pro1.cbl DATA DIVISION. WORKING-STORAGE SECTION. 01 RET PIC 9(8). PROCEDURE DIVISION. MOVE FUNCTION INTEGER-OF-DATE(20060229) TO RET. DISPLAY RET. GOBACK. C:\\>runc Pro1 00000000 Is the function defined to return value 0 for any non-existent date? Resolution: Please refer to documentation. A search for 'intrinsic function' in the Index points to: 'Reference > COBOL Language > Part 2: Program Definition >
Problem: Using the DataGridView .Net control it is possible to have cells that contain a Push Button Control. If you do this how can you detect when the button has been pressed ? Resolution: On the DataGridView you need to trap the CellContentClick event. This is generated when the button is pressed on the grid. However this event is also generated on any other cell types as well. You therefore need to check that it is also a button cell type (DataGridViewButtonCell .Net type). You can use the "instance of" operator in .Net COBOL to do this. Some example code to trap a button click would be:- method-id. "dataGridView1_CellContentClick" final private. 01 ls-row cDataGridViewRow. 01 ls-cell object. 01 ls-cellbutton S-W-F-DataG
Problem: A 'Read' on a Fujitsu data file will cause a 039 RTS error. Is it possible to access and read a Fujitsu data file with MF COBOL? Resolution: It is not possible to access a Fujitsu data file as the format will not be recognised. It is recommended to convert first to a Sequential file using Fujitsu tools. Old KB# 1348
Problem: Release 4.0: The 'CBL_ERROR_PROC' COBOL library routine installs or removes an error procedure to be invoked automatically when a runtime system error occurs. ProgA calls the CBL_ERROR_PROC to install the entry point of ProgB as the error procedure. ProgA and ProgB are built as separate .exe executables from the command line as follows: cbllink -fs -s ProgA.cbl cbllink -fs -s ProgB.cbl Differences in behaviour between Net Express 3.0/1 and Net Express 4.0 ---------------------------------------------------------------------------------------- Net Express seems to install the error procedure, while the CBL_ERROR_PROC in Net Express 4.0 returns a 0256 status-code and fails to install the error-handling procedure. "ERROR - Unable to install RTS error trap 0256" Resolution: A separate EXE is a separate process and has its own Run-Time when it executes. There is no way to install an error procedure that will exist in a separa
Problem: Net Express 4.0 with .NET (2003) A C# web service calling a COBOL program built as a DLL causes COBOL exception: Edit 129: The File "D:\\...\\FILENAME.CBL" is marked as read-only. Build tab shows: Generating system database Generating classes... Failed to create database file. Check that existing file is not locked. Attempted to create file : C:\\Documents and Settings\\All Users\\Application Data\\Micro Focus\\NetExpress\\4.0\\SYSTEM.DAT The attempt to create a new system database failed The original database will be restored Resolution: Check that the PATH variable is pointing to the application dlls and the COBOL runtime system Old KB# 1262
Problem: By default the XML GENERATE statement converts data names to upper case to generate XML tags. The following: 01 myXML pic x(1000). 01 myItem1. 05 myItem2 pic x(10) value "my value". ... Xml generate myXML from myItem1 would generate "<MYITEM1><MYITEM2>my value</MYITEM2></MYITEM2>" in myXML Resolution: To preserve the case of data names when XML tags are generated with XML GENERATE it is necessary to use the PRESERVECASE compiler directive, i.e. $SET PRESERVECASE This directive is not documented in Server Express 5.0 but should be documented in Server Express 5.1. After setting PRESERVECASE, the contents of myXML in the example above would be: "<myItem1><myItem2>my value</myItem1></myItem2> Old KB# 1395
Problem: Working Storage of a subroutine is not re-initializing after a CANCEL is done in the calling program. Subsequent calls to the subroutine have the Working Storage items in the same state as after the end of the previous CALL. Resolution: This is caused by the use of the NODYNAM directive. Using this directive causes the CANCEL statements to be ignored. Even if you don't explicitely use the NODYNAM directive, you might have a DIALECT directive that will set it for you. If you do use the DIALECT directive, simply add the DYNAM directive after DIALECT and it will take effect. Old KB# 1362
Problem: After migrating some C code that calls COBOL from UNIX to Windows get the following errors on linking:- myprog.OBJ : error LNK2001: unresolved external symbol _cobprintf myprog.OBJ : error LNK2001: unresolved external symbol _cobgetch myprog.OBJ : error LNK2001: unresolved external symbol _cobclear RELEASE\\myprog.exe : fatal error LNK1120: 3 unresolved externals Resolution: These routines provided by Micro Focus are only supported on UNIX and are not documented or provided on Windows. Solution is to replace these calls to standard C library callls such as printf , _getch and system("cls") Old KB# 1335
Problem: Using ODBC with DB2 and not being the owner of the table, how to specify a qualifer for the table? Resolution: This is specified by the configuration of the DB2 ODBC datasource through the ODBC Data Sources tool. Select the datasource, click on Advanced Settings tab, hit the ADD button Select the CLI\\ODBC parameter of CurrentSchema (or CurrentSQLID) then specify the default qualifier. Old KB# 1252
Problem: If you want to read an XSD file programatically you may want a Schema for the Scheme so that you can generate the COBOL data structures using the cbl2xml wizard. Resolution: The schema for the XML Schemas is a available at:- Schema is http://www.w3.org/2001/XMLSchema.xsd Full details on schemas and a DTD for a schema is available at:- http://www.w3.org/2001/XMLSchema Old KB# 1356
Problem: Release 4.0: Applying websync and get message that dsc00nxx (xx would be version of product) cannot be applied. Resolution: The dialog character component goes with the unix option - The reason the dsy update did not apply is the unix option was not installed. Put the cd in and install the unix option if there is the need to apply this Dialog Character component. Old KB# 1324
Problem: Wie finde ich die Postion meines Cursors beim Animieren wieder nachdem ich im Quellcode geblaetter habe? Resolution: ueber View->Where im Menue oder die Tastenkombination strg w. Old KB# 1365
Problem: The SHA1 is a standard hashing algorithm that given a sting of bytes will produce a hash code for the string. Any changes to the string would result in a very different hash code so it can be used to ensure a message has not been tampered with. How you use this algorithm in .Net COBOL ? Resolution: The .Net Framework contains an implementation the SHA1 algorithm. You can use these classes from COBOL. An example project that does this is attached to this RPI. The program code is:- $set sourceformat"variable" program-id. HashIt as "SHA1Hash.Hashit". environment division. configuration section. repository. class cSHA1Managed as "System.Secu
Problem: What is the meaning of the codes -->01 and -->08? For example: 16/11/2006 14:34:19 RECEIVEALL Error: HPLEVENSRV_P00084 -->08 CCITC32-0008E A response failure has been detected on the given connection. 16/11/2006 14:34:20 RECEIVEALL Error: HPLEVENSRV_P00083 -->08 CCITC32-0008E A response failure has been detected on the given connection. 16/11/2006 14:36:22 RECEIVEALL Error: HPLEVENSRV_P00082 -->08 CCITC32-0008E A response failure has been detected on the given connection. 16/11/2006 14:42:47 TRANSACT Error: HPLEVENSRV_P00036 -->01 CCITC32-0001I A CCITCP call has timed-out. - Processing Continued 16/11/2006 14:43:54 RECEIVEALL Error: HPLEVENSRV_P00081 -->08 CCITC32-0008E A response failure has been detected on the given connection. 16/11/2006 14:45:08 RECEIVEALL Error: HPLE
Problem: What steps needs to be taken to obtain a hard copy of the Net Express manuals Resolution: Manuals can be printed from the online help. For example, if you would like to get the File Handling manual printed you can do so within the online help by going to Contents\\Programming\\File Handling\\ and highlight the File Handling Manual. Then from the menu bar at the top you can select Print or Options/Print and make sure that you select the radio button "Print selected heading and all subtopics". That will print you the entire manual. Old KB# 1251
Problem: Does Oracle OCI Data access via the SQL(TARGETDB=ORACLEOCI) support the PREFETCH directive ? Resolution: This is not currently supported. Old KB# 1298
Problem: Error Edit134 appears when attempting to save an edited source member to a SAMBA drive. Resolution: Incorrect permissions prevented the deletion of temporary file mfeditor.sav. Change permissions to allow deletion from the directory. Old KB# 1342
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.