Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: COM WORD: Open existing document in ReadOnly mode Resolution: ______________________________________________________________________________ Word Object Model [Word 2003 VBA Language Reference] <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd11/html/woobjDialogs1_HV05210511.asp> ---> Open Method: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd11/html/womthOpen1_HV03076944.asp ....Open method as it applies to the Documents object. ______________________________________________________________________________ Demo attached: ... *>========================================================= *> Create an instance of Word invoke wordapp "new" returning wordServer &nbs
Problem: Unmanaged Cobol class has a method returning "pic x" data. Unmanaged Cobol class is compiled to dll and registered (regsvr32) regarding to rules "to use rcw to call unmanaged Cobol". A VB.NET application invokes the Cobol class (added to vb.net application references as COM) and succesfully receives the returning "pic x" data. In Unmanaged Cobol, method's returning data type is changed to "pic x(4) comp-5" to return integer value to vb.net app. Cobol app is rebuilt, unregistered and registered again. Cobol COM is removed from vb.net app references and added again to expose returning value data type change to vb.net. But returning value data type change doesnot expose to vb.net app, vb.net app still recognises the data type as string not integer. What may cause such behavior? Resolution: This behaviour is caused by the way that COM describes its interfaces. When you change the ret
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: If you're html code contains a colon, the HTML preprocessor will treat the charaters that follow as a variable. When you go to build, you will get an error message saying operand not declared Resolution: For Example, if you are using an html tag like the following: <html xmlns="http://www.w3.org/19999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> you will get the following build errors: Operand V not declared Operand SCHEMAS-MICROSOFT-COM not declared Operand VML not declared To get around this, you would need to add code like the following to your COBOL program: ..... Working-Storage. ..... 01 temp1 pic x(2). 01 temp2 pic x(22) 01 temp3 pic x(4) ..... PROCEDURE DIVISION. ..... move ":v" to temp1. move ":schemas-microsoft-com" to temp2. move ":vml" to temp3. ..... You would then right click on your html file and select edit as text and instead o
Problem: Release 4.0: The problem is caused when a COBOL program encounters a problem and a STOP RUN is made then consequently the Java runtime is terminated. How can you prevent STOP RUN from doing this? Resolution: The use of SRV_CTL_NOSTOPRUN does prevent the JVM from terminating when using RuntimeSystem.cobcall. Old KB# 3929
Problem: When running a Dialog System application that has a dialog box with a push button, you are unable to see the underlining on push-buttons. However you are able to see the underlining in the screen designer/painter mode. Resolution: This is an OS issue that usually is apparant in XP\\Windows 2000. To see the underlining you need to go to the Windows Control Panel and then click on the Display icon. From here click on the appearance tab, and then on the effects button. Remove the tick from the "Hide underlined letter for keyboard navigation until I press the ALT key" and then save the new settings. If you then close down Net Express and then open it to re-run the application you'll now see the underlining in the dialog box when running the application. Old KB# 3974
Problem: Hitting backspace in a Screen Section restores a value instead of replacing with a space. Resolution: 1. Open the Net Express Command Prompt 2. Change directory at the location of the application's ADISCTRL file 3. Execute ADISCF 4. Press F2=Alter 5. Press F3=Accept/Display Options 6. Press F3=Individual Options 7. Press Down Arrow key to go to 12 (Auto-restore during backspace in replacement editing mode) 8. Press Enter to edit the option #12 9. Change the value from 1, which is the default, to 2 Here are the options for Auto-Restore: 1: Auto-Restore. The characters overtyped are automatically restored as characters are deleted. 2: Auto-Restore disabled. Deleted characters are replaced by the filler characters. Old KB# 3959
Problem: If you are processing a Timer event and it takes a while processing then when the event is finished the next timer event is immediately fired. How can you stop event while processing another? Resolution: In the event you can switch off a time and then start it at the end of the event. Some example code for this is:- method-id. "timer1_Tick" final private. linkage section. 01 sender System-Object. 01 e System-EventArgs. procedure division using by value sender e. invoke timer1::"Stop"() &n
Problem: CALL "CBL_READ_FILE" using .... returns a RETURN-CODE = 12592 What does it mean? Resolution: It is a 2 bytes file status code in decimal representation. 12592 decimal = x"3130" in hex. x"3130" are the ASCII-Codes of "1" and "0". 12592 means FS: 1/0 = no next logical record exists. ------------------------------------------- Also extended file status codes might be returned from CBL_-routines. If you recieve e.g. 14657 = x"3941", it means ASCII "9" followed by a binary "41" = decimal 65. 14657 means FS: 9/65 = file locked Old KB# 3956#ServerExpress#COBOL#AcuCobol#netexpress#RMCOBOL
Problem: The Find function under Net Express retains the values from previous finds, which can be deleted or reduced. Resolution: Go to regedit and looks under: (HKEY_CURRENT_USER/Software/Micro Focus/NetExpress/nn/IDE/FindHistory) You can remove the old values under "FindHistory". You can also limit the number of values kept in storage by selecting the "size" name under FindHistory and change the value to a lesser number. Old KB# 3968
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: 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: Net Express 5.0 supports "COPY" but many of our COBOL programs use -INC to include copybooks which throws a compiler error . Is there any directive we can use so that Net Express supports this? Resolution: The directive you require is LIBRARIAN. The full directive detail is included below: LIBRARIAN Allows -INC statements in your program. Syntax: >>-.---.-.---------LIBRARIAN--"integer"-.----->< -/- -.----.--LIBRARIAN------------ -NO- Parameters: integer The level of support required. 1 -INC statements are ignored; that is, no error message is generated. 2 -INC statements are processed. Properties: Default: NOLIBRARIAN Phase: Syntax check $SET: Any Comments: The -INC statement specifies a file for inclusion in the source program
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: In COBOL, how can I monitor a directory for the existance of a file. Resolution: There are a number of ways you could do this:- - "X"91" function 69" - .Net directory class if your using the .Net COBOL Compiler - FileSystemWatcher control if your using Studio which has WinForms Support. X"91" demo is at http://downloads.microfocus.com/examplesandutilities/general/dirlist.zip Old KB# 3926
Problem: Net Express 4.0 Client found that when compiling a COBOL program in Vistual Studio they got the the following error(s): Failed to find the system program EXTSM Failed to find the system program EXTFH Resolution: Net Express was installed first. Then the latest wrappack for Net Express was installed. Then Net Express with .NET was installed from the installation CD. Applying the latest wrappack for Net Express with .NET fixed the problem. Old KB# 3924
Problem: Example of how to implement a COBOL Callback method that is called from C Resolution: 2 example programs are shown below: callbacks.cbl identification division. program-id. callbacks. data division. working-storage section. 01 pptr-callback1 procedure-pointer. 01 pptr-callback2 procedure-pointer. 01 pptr-C-DLL procedure-pointer value null. 01 callback-id pic 9(9) comp-5. &n
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: The demo attached contains 3 programs One Java program which does SQL I-Os thru JDBC One OO COBOL program which invokes the Java program above ( this OO COBOL program is a 'stub' between procedural COBOL and JAVA ) One procedural COBOL program which invokes the OO COBOL program above. Resolution: ======================= INTRODUCTION_1: since the JAVA program does SQL I-Os using JDBC using an ODBC layer, you need a DSN (Data Source Name ) called 'NetExpress Sample2' pointing to an ACCESS DataBase named SAMPLE.MDB ( delivered with .ZIP attached with this demo ) --> Config Panel->Administration tools->ODBC data sources IF the DSN 'NetExpress Sample2' does'nt exist, create it using an ACCESS Driver pointing to ACCESS DataBase named SAMPLE.MDB ======================= INTRODUCTION_2: As described above, the
Problem: File routines, such as CBL_DELETE_FILE, CBL_RENAME_FILE, and CBL_COPY_FILE, in Net Express 4.0 fails to find filenames that are prefixed with a dash "-", e.g. -TEST.TXT These CBL_ routines fail with a non-zero return code, which can be interpreted as the routines were unable to find -TEST.TXT. Resolution: This problem has been fixed since All WebSync WrapPack v4.0.007 (all07n40.exe). Old KB# 3969
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: 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
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.