Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This demo shows the use of animate from the command line when passing a command line parameter Resolution: This demo demonstrate how to accept and use parameters from a command execution SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------- animparm.cbl Sample program Other Files: -------------------- ----------------------------------------------- compile.bat Batch file to compile the program runit.bat Batch file to run program passing parameters OPERATION: ======== From a
Problem: The customer wanted a list of XML file status codes: he looked under 'XML' and 'file' in Net Express help, but found nothing. Resolution: The XML error codes are detailed in the Net Express help, but they're difficult to find. They're on the 'Contents' tab -> Reference -> COBOL Language -> Additional Topics -> XML Syntax Extensions -> XML File Status. That returns the following list: Return Code Meaning > 0 After a successful READ action, the ordinal number of the record read is returned as the status code. 0 Success. The XML I/O action is performed without problem. -1 The XML I/O action is trying to access an XML stream that is not opened. -2 This is an invalid XML I/O action. -3 Invalid mode is specified in the OPEN statement. -4 The XML stream cannot be opened. -5 The XML I/O action is attempting to access an internal DOM (Document Object Model) representation whi
Problem: CLU08ALL.EXE and ALL06N40.EXE are available at the Micro Focus SupportLine site for Net Express 4.0. Resolution: CLU08ALL.EXE is the License Protection System FixPack, and it is already part of the All WebSync WrapPack ALL06N40.EXE. It is then not necessary (and it does not hurt) to apply clu08all.exe after all06n40.exe. Old KB# 3942
Problem: In a DataGridView object from the .Net Framework V2 and above. How can you change the background colour of "row" programatically? Resolution: You can use the "DefaultCellStyle" on the row to acheive this:- set datagridview1::"Rows"::"Item"(ls-count)::"DefaultCellStyle"::"BackColor" to cColor::"LimeGreen" This sets the background colour to Lime Green. Old KB# 3922
Problem: mfextmap not working in an Net Express application. Resolution: The application needed to be linked with the Shared Runtime system (-f swtich to CBLLINK) and also the COBCONFIG_ environment variable needed to point to the location of the runtime tunable file with:- SET environment_mapper=TRUE Old KB# 3980
Problem: An ASP file is displayed okay from a Cobol DISPLAY statement except nothing is shown for simple ASP functions, such as current date and time. However, the same ASP file gets displayed properly by IIS server. [cobol] working-storage section. 1 OutASPForm is external-form identified by ASPFileName. 77 ASPFileName pic x(256) value "TestASP.asp". procedure division. display OutASPForm stop run. [TestASP.asp] <HTML> <HR width=80% size=4 color="green"> This is a test of ASP showing the date = <%=
Problem: Does Micro Focus support the MS SCCI standard for version control systems? Resolution: In both Net Express 4.0 and Mainframe Express 3.0 we provide support for what is called Microsoft Source Control Common Interface (MSSCCI). Old KB# 3915
Problem: If you have a checked listbox how can you add items into the listbox and control their state? Resolution: You can add items to a CheckedListBox using code such as:- invoke checkedListBox1::"Items"::"Add"("Item 2",cCheckState::"Checked") invoke checkedListBox1::"Items"::"Add"("Item 3",cCheckState::"Unchecked") invoke checkedListBox1::"Items"::"Add"("Item 4",cCheckState::"Checked") invoke checkedListBox1::"Items"::"Add"("Item 5",cCheckState::"Unchecked") cCheckState is the System.Windows.Forms.CheckStat
Problem: Rebuilding an Object-Oriented Cobol program in a Net Express 4.0 project fails with "Rebuild complete with errors", but nothing more is shown in the Output window. If the same program is compiled and linked from the Net Express Command Prompt, the following error message is then displayed: * 013-R Illegal intermediate code (at 0X101 in seg 0) ERROR: (9) Program indicated failure Resolution: This has been fixed since All WebSync WrapPack v4.0.005 (all05n40.exe). Old KB# 3972
Problem: Error creating a new COBOL project "The application for project 'C:\\Documents and Settings\\default\\local settings\\temp\\5dgjbw2p.cpx\\temp\\classlibrary2.cblproj' is not installed.' Make sure the application for the project type (.cblproj) is installed. Resolution: Open a Visual Studio 2005 command prompt. Go to the Mico Focus\\Studio 5.0\\Packages directory and enter the following: regsvr32 cblprj.dll then press enter then enter the following and press enter: devenv /setup Old KB# 3938
Problem: When you use the "System.Net.Mail" classes in .Net to send an email using smtp how can you specify the logon details to the server. Resolution: To do this you can use the "System.Net.NetworkCredential" .Net Class. Some example COBOL that uses this is:- $set sourceformat"variable" program-id. Program1 as "SMTP.Program1". environment division. configuration section. repository. class cMailMessage as "System.Net.Mail.MailMessage" class cMailAddress as "System.Net.Mail.MailAddress&q
Problem: Which database products are certified for use with Server Express ? Which database products are certified for use with Net Express ? Which database products are certified for use with OCDS ? Which database products are certified for use with Workbench ? Is OpenESQL available on my platform? Is ODBC support available on my platform? Is DB2 support available on my platform? Is Cobsql available on my platform? Why do I get an 18-U Preprocessor error on initialization error using Cobsql? Resolution: 1. If you are using the COBOL precompiler as provided by a database vendor, e.g. Oracle Pro*COBOL, Informix ESQL/COBOL, Sybase cobpre (or are using Cobsql), or IBM's precompiler (or are compiling with the DB2 compiler directive), the responsibility of certifying the precompiler against Micro Focus COBOL products lies with the database vendor themselves : Oracle users with a valid MetaLink account, can access Oracle's document detailing certifi
Problem: This error was encountered in Release 3.1, but may be relevant to later versions of Net Express: Testing an ODBC environment: It runs ok under the Net Express development environment however running this in a Net Express runtime environment it fails and returns the error: The procedure entry point mF_xe_odbc_load could not be located in the dynamic link library cblrtss.dll What does this mean? Resolution: There is a difference between the development and run time environment versions. You should synchronize the versions - you should make sure the version of Net Express and Application Server (or Micro Focus Server in later versions) are the same. You can get the latest Application Server files and Net Express development environment files by logging on to the Supportline Website and then checking the following - For the Net Express development environment: 'Product Updates' -> and then under the heading 'Net
Problem: How can I pass a null terminates string to .Net so that the null is retained in the string being passed? The calling program is Unmanaged COBOL and it will be using COM Interop to call the .Net assembly. Resolution: You need to use a chararray to pass this data across as you can specify the size of the chararray when you create it. Some example code that does this is:- *> This is required for OLE applications $set ooctrl( P) program-id. testnet. special-names. call-convention 66 is winapi. *> Non Litlinked apis class-control. *> OLE automation classes &n
Problem: How is it possible to set the SQL directive CURSOR_CLOSE_ON_COMMIT from COBOL? Resolution: Only specific SET statements can be executed through the static form of the exec sql statement - such as the ones specifically identified in the Net Express documentation i.e. set autocommit, set connection, set concurrency, set scrolloption etc. All other set statements need to be handled by the EXECUTE IMMEDIATE statement as follows: MOVE "SET CURSOR_CLOSE_ON_COMMIT ON" TO WS-MYSQL EXEC SQL EXECUTE IMMEDIATE :WS-MYSQL END-EXEC where ws-mysql is declared as a character string. Alternatively using the same method as described above, you could set the SQL directive ANSI_DEFAULTS. When enabled (ON), this option enables the following SQL-92 settings: SET ANSI_NULLS SET CURSOR_CLOSE_ON_COMMIT SET ANSI_NULL
Problem: The following line fails with "912-S Internal error - Dictionary invalid r/w 00000000" in Net Express 4.0 with All WebSync WrapPack v4.0.005 (all05n40.exe): DISPLAY FUNCTION WHEN-COMPILED(7:2) AT LINE 25 COL 09. The above however does not fail in any of the previous version of WrapPacks, even with previous versions of Net Express. Resolution: This has been fixed since All WebSync WrapPack v4.0.006 (all06n40.exe). Old KB# 3971
Problem: When I exit Net Express I get a prompt asking if I want to stop the XDB local server. It seems that this server automatically starts up, but I don't need to use it - is it possible to stop this happening? Resolution: You need to stop the XDB service from starting up when you boot up. If you go to Windows Control Panel, and select Administrative Tools, you will see an option entitled Services. Open this and scroll down the list of services - you will see "Micro Focus XDB Server for NX n.n" and/or "Micro Focus XDB Server for MFE n.n" if you have MFE installed. If you right click on that name, and select Stop, the service will be stopped - however, this will only apply to your current session. If you do not want this service to run every time you start up up the system, right click on the XBD entry again, and select Properties. In the window that appears, you will see a pull
Problem: Release 4.0: Zielsystem BS2000: Der Net Express Compiler akzeptiert auch syntaktisch sehr rudimentäre Programme. Wesentliche Bestandteile eines Cobol Programmes können fehlen, ohne dass ein Fehler gemeldet wird. In diesem Fall fehlte die 'DATA DIVISION'. Auf dem Zielsystem BS2000 ist jedoch eine vollständige Programmstruktur gefragt. Mit welcher Directive kann man das in NE erzwingen ? BS2000 und ANS85 helfen nicht. Resolution: Nehmen Sie bitte die folgende Direktivenzeile mit auf: $set DIALECT"BS2000" FLAG"BS2000" Während der Umwandlung des Quelltextes wird das Fehlen der 'DATA DIVISION' vom Compiler bemerkt und als Fehler dargestellt. Old KB# 3930
Problem: This demo returns information about the operating system environment via the library call CBL_GET_OS_INFO. Resolution: This demo also demonstrate the usage of the Library Routine Type Definitions and Call Prototypes. Net Express contains two copyfiles; one contains data items used by the library routines specified as type definitions, or TYPEDEFs, while the other contains call prototypes for the library routines. These can be used in your COBOL programs to enable the Compiler to validate all calls to these routines. SOURCE FILES: ========== Program Files Description --------------------- --------------------------------------------------------- GetOSInfo.cbl Sample program used for the demo Copy Files --------------------- --------------------------------------------------------- CBLPROTO.CPY Located in your Net Express\\base\\source folder CBLTYPES.CPY Located in your Net Express\\base\\source
Problem: Customer is running a Net Express 4.0 application that uses the OpenESQL embedded SQL support to access a DB2 database on the mainframe. The ODBC driver that they are using is the NEON (now DataDirect) Shadow Direct ODBC driver for DB2. The application was running fine until they had to change some column descriptions in their tables from DECIMAL 2,2 to DECIMAL 3,3 which creates a host variable of PIC SV999 COMP-3. After recompiling their applications with the new description any SELECT statement that accessed one of these modifed columns would cause an abend in the OpenESQL run-time of either a stack overflow or a memory write protection error. Resolution: After quite a bit of testing we found that their were two completely different issues that when used together would cause the run-time error to occur. First, we tested this against other ODBC drivers including DB2 Connect from IBM and the error did not occur so we isolated the error to the
Problem: If I have a .Net class and I was to pass a null reference to it from Unmanaged COBOL. How can I do it ? This is going via .Net COM Interop. Resolution: To get this worked as expected you need to pass a COM Variant object with the type set to DISP-E-PARAMNOTFOUND. This denotes to COM that it is a missing parameters and the .Net Class is given a null object. The COBOL code to do this is:- invoke oleVariant "new" returning mynull invoke mynull "getVariantAddress" returning ws-ptr set address of lnk-var to ws-ptr move DISP-E-PARAMNOTFOUND t
Problem: This program demonstrates how to use Microsoft ADO (ActiveX DataObjects). Resolution: INTRODUCTION ========== This program demonstrates how to use Microsoft ADO (ActiveX DataObjects). SOURCE FILES ========= Program Files Description -------------------- ----------------------------------------------- ne3ado.cbl REQUIREMENTS ========== The source of the data is a Microsoft Access Database file sample.mdb located in your NetExpress\\base\\demo\\Smpldata\\ Access directory. There should also be a DSN entry viewable in the ODBC Data Source Administrator for "NetExpress Sample2". This program is set up to use ADO Recordset Objects as specified in the class-control paragraph. You can look for the entry ADODB.Recordset in the Windows system registry(using regedit.exe) within HKEY_CLASSES_ROOT.
Problem: The following error message occurs in Net Express 4.0 when the Internet Application Wizard attempts to generate a CGI program: ---------------- Object Code error : file 'splithtm' error code :153, pc=0, call=1, seg=0 153 Subscript out of range (in E:\\BUILD\\EHTM\\splithtm.cbl, line 225) ---------------- This problem occurs when All WebSync WrapPack v4.0.006 (all06n40.exe) was applied. The previous version did not have this problem. Resolution: This has been fixed since All WebSync WrapPack v4.0.007 (all07n40.exe). Old KB# 3970
Problem: A COBOL .NET application fails to use Fileshare. Resolution: You cannot have a COBOL .NET application to use Fileshare directly. An unmanaged (non-.NET) Cobol application compiled with $SET CALLFH"FHREDIR" can however be used with Fileshare and called by a .NET application. Therefore, you can consider one of the following options: create the Cobol application that uses Fileshare as a COM object, add a reference to your managed code project, and invoke the COM object OR create it as a Windows DLL, add it as a reference in a managed COBOL .NET project, and use platform invoke to call it. You could then have your .NET (e.g. VB .NET) project call the managed COBOL project that will call the unmanaged COBOL that uses Fileshare. There is an example of using pinvoke in the .NET examples (C:\\Program Files\\Micro Focus\\Net Express with .NET\\Examples\\Pinvoke) Old KB# 3940#COBOL#AcuCobol#RMCOBOL#netexpress#ServerExpress
Problem: How to trap exception in COBOL .NET? Resolution: You can find documentation on how to handle exceptions using the TRY statement from the Net Express with .NET Help. Just follow the steps below: 1. Click on Help > Index 2. Make sure "Micro Focus Net Express with .NET" is selected from the "Filtered by" drop-down list 3. Type in "exception" from the "Look for field" 4. Double-click on "structured", which is right below "exception handling" in the list of topics That will lead you to the page where it addresses about structured exception handling and the usage of the TRY/CATCH/FINALLY/END-TRY control structure. It also refers to an existing sample, which is in Net Express with .NET\\Examples\\LRM Samples\\Exceptions folder. Old KB# 3944
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.