Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: If you have a PictureBox control on a Form with an Image displayed how can you set the picturebox so that it does not display an image? Resolution: This can be achieved by setting the "Image" property in the PictureBox control to null. Code such as:- set PictureBox1::"Image" to null should achieve this. Old KB# 3963
Problem: Release 4.0: How to implement this? Resolution: To Publish to Unix from Net Express you need to run SCP as a daemon on the Unix machine. To run SCP as a Daemon, take a look at the following: Net Express Help -> Content -> Using Net Express -> Unix Option -> Unix Option Guide -> Installing Samba and SCP -> Alternative Security Mechanism -> SCP Daemon method Old KB# 3979
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: In a PictureBix object in WinForms how can you set up the image at runtime from COBOL Code ? Resolution: You can do this by passing in a Bitmap object to the Picture Box. Some example code that does this is:- $set sourceformat(variable) $set preservecase class-id. frmPBox as "MDICOBOL.frmPBox" is partial inherits class-form. environment division. configuration section. repository. class interface-icontainer as "System.ComponentModel.IContainer" class class-f
Problem: How can you Delete a file in .Net using a .Net class ? Resolution: You can use the System.IO.File class to do this using code such as:- class cFile as "System.IO.File" .... invoke cFile::"Delete"("c:\\myfile.dat") Old KB# 3935
Problem: For example - I have currently Net Express 3.1 and am planning to install 4.0 on the same machine. Will I still get support for 3.1 or just 4.0? Resolution: You can install the new version of Net Express 4.0 on the same machine where you have installed the old version and they will share the same license. However, you will no longer get support for the old version after 90 days after you have upgraded your license to the new version. Please discuss this matter with your sales rep for further details and conditions! Note: Micro Focus no longer provides any fixes for old versions of Net Express regardless of whether you have maintenance contract or not. Old KB# 3941
Problem: DataGridView : How can I pick up the double-click line event in a datagridview in the .Net Framework V2? Resolution: You can detact the hit on a cell by trapping the "CellClickEvent". This event passes in an Event object that contains the "RowIndex". This can then to used to process the whole row using code such as:- set gridRow to dataGridView1::"Rows"::"Item"(e::"RowIndex") set selectedrow to class-string::"Concat"("Selected : ",gridrow::"Cells"::"Item"(0)::"Value"," - ",gridrow::"Cells"::"Item"(1)::"Value", " - ",gridrow::"Cells"::"Item"(2)::"Value") invoke cMessageB
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: For example - you might want to set up your own batch file to compile - and then to be able to simply click on the bat file Resolution: Have your bat file call setenv.bat located in the netexpress\\base\\bin directory Old KB# 3964
Problem: Status Key of '9d' (9/100 Invalid file operation) when closing a fileshare file Resolution: If you try to CLOSE a file that is participating in an active transaction, a 9/100 error status is returned and the file remains open. A COMMIT or ROLLBACK needs to be issued before the CLOSE can be executed. For the file to be involved in a transaction, WITH ROLLBACK has to be defined on the file. A transaction will start as soon as an update operation is executed for a file with the WITH ROLLBACK option defined on it. Old KB# 3967#ServerExpress#AcuCobol#COBOL#netexpress#RMCOBOL
Problem: Customer had spent a long time developing a screenset, and one day received an error which indicated that the screenset was corrupt in some way. Resolution: If a screenset gets unexpected corruption of any sort, then it is always worth trying to salvage it by exporting the entire screenset as a .imp file (which is really just a text file). Check the file for any obvious funnies (half-lines, mistyping, or if you know that a particular object is the one causing the trouble, delete all references to it). Then create a new screenset, and delete the only window (select it and press <Delete>). Import the .imp file into the screenset, and say 'OK' when informed that some duplicate global dialog will be renamed. You should then have a more or less working screenset. If you have removed any objects from the .imp file, try adding them to the screenset again. Old KB# 3928
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: How can I get/set the column widths in a DataGridView in a COBOL WinForms application. Resolution: There is a "Width" property on the Column object. Given the datagridview object you can access it using code such as:- set Label2::"Text" to dataGridView1::"Columns"::"Item"(1)::"Width" This code get the width of the second column (zero based index). Old KB# 3955
Problem: Is it possible to have the Tabs on the left or right of the screen? Resolution: You can make the tabs left /right by clicking the right hand mouse button on the tab and going into properties you can select left/right. Old KB# 3946
Problem: When you run CBLCORED from the Net Express Command Prompt, it pops up a window to allow you to select the following options: Disabled (default) Enabled with prompt Enabled with no prompt How to enable this feature without having to select manually from a popup window? Resolution: The runtime tunable core_on_error was introduced in the All WebSync WrapPack v4.0.005 (ALL05N40.EXE) of Net Express v4.0. There is a demo available on the sample site, which shows how to use (http://downloads.microfocus.com/examplesandutilities/utilities/CoreDump.zip) The description below for core_on_error is in the documentation. core_on_error Specifies in what circumstances a core file is produced. Syntax: >>-----set core_on_error=---.-0-.-----------><  
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: You may have set environment variables external to the Net Express IDE. However, you can't see them from within the IDE. How can you see environment variables that have been set externally from within the IDE? Resolution: Go to Project | Properties Click on the IDE button Then click on the 'Import' button and import the current environment by selecting the environment variables you want to view or edit. Old KB# 3931
Problem: The Micro Focus Studio 5.0 setup always comes back to the feature dialog on Windows 2000. Resolution: Make sure Windows 2000 has Service Pack 4 applied. It is a requirement to install Micro Focus Studio 5.0 on Windows 2000. Old KB# 3973
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: How to invoke the defualt web browser from a COBOL program Resolution: you can use ShellExecute to open a webpage EX: call "cob32api" call winapi "ShellExecuteA" using by value 0 size 4 by reference z"open" by reference
Problem: I get an RTE 114 on a GOBACK / EXIT PROGRAM / STOP RUN in EXE mode. The program runs fine in INT. Resolution: When you call a function that should have the CALL-CONVENTION for WinApi set (i.e. 66 or 74) without the CALL-CONVENTION, the stack will be corrupted. A GOBACK / EXIT PROGRAM / STOP RUN pops an invalid return address from the stack, tries to return to this address and a RTE 114 occurs. E.g. if you code call GetShortPathName instead of call WinApi GetShortPathName the stack will be corrupted after the call. This program may run for another million steps but will crash when leaving the program (compile unit), which contains the false WinApi-call. Reason: If you call a WinApi-function and do not set the call-convention, both, the calling and called programs, will remove the parameter from the stack. Old KB# 3962
Problem: Using code how can you make a specific Tab page within a Tab control the current page. Resolution: You can use with the SelectedPage or SelectedIndex property of the TabControl object. Some example code for this would be:- set tabControl1::"SelectedIndex" to 1 *> Its ZERO Indexed so 1 is actual Tab Page 2 *> or set ls-tabpage to tabControl1::"TabPages"::"Item"("tabpage2") set tabControl1::"SelectedTab" to ls-tabpage Old KB# 3914
Problem: When starting Net Express for the first time you are prompted by a welcome box. In this case the customer's welcome box did not have a check box that will allow you to discontinue showing the welcome box at the next startup. Resolution: Open the registry editor. Go to: HKEY_CURRENT_USER Software Micro Focus Net Express 4.0 IDE &
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.