Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: 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: 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: 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: 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: 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: Is possible to join together three files into only one file? Resolution: Yes, using x"91" funtion 35. Example program: 01 result pic x comp-x. 01 function-code pic x comp-x value 35. 01 parameter. 03 name-len pic x comp-x. 03 progname pic x(99). procedure division. move "COPY a b c d" to progname move length of progname to name-len c
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 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: 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: 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: 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: 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: 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: 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
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.