Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: Issue with Greek Characters when ANSI characters are used (on .Net). In a .Net Winforms environment Greek characters are not displayed correctly when passed into a Winform. Resolution: This is caused by conversions taking place between OEM and ANSI character sets and UNICODE. To resolve the problem you need to perform the following code when your application starts:- call "PC_WIN_SET_CHARSET" USING BY VALUE 0 This sets up the COBOL system so that all conversions are ansi based. Old KB# 5731
Problem: Client was getting error COBCH0250S status field is missing or illegal on every compile. This was occurring for every field specified as a FILE STATUS in their SELECT clause. The file status field had been set as follows: pic xx comp-5 Resolution: The first character of the file status field cannot be defined as a comp field. Only the 2nd character can be defined as comp. For example: 01 file-stat. 05 fs-1 pic x. 05 fs-2 pic x comp-x. This format will allow for the extended Micro Focus file status codes to be retrieved. Old KB# 5723
Problem: t:\\NE\\obj\\program.obj cbllds00000714.obj Creating library t:\\NE\\dll\\program.lib and object t:\\NE\\dll\\program.exp CVTRES : fatal error CVT1107: t:\\NE\\dll\\program.exp is corrupt t:\\NE\\dll\\progam.exp : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt link finished with errors T:\\PR\\SRCE> Resolution: cbllink uses Microsoft "link" under the covers the 1123 occurs sporatically for unknown reason when trying to place the linked module onto a mapped lan drive. MicroSofts position on this matter is that they do not support linking over the network Old KB# 5770
Problem: How can I send to a printer connected to a USB port using the standard ASSIGN TO clause in the SELECT statement? Resolution: The way to print via a USB-port and not to LPT1/2 etc is to use the printer_redirection run-time tuneable. The printer_redirection tuneable causes ASSIGN TO PRINTER statements to go to the print spooler rather than LPTn. Therefore, provided the printer attached to the USB has been installed properly there should be no problem printing to it. There is no way to access ports directly in our product because the operating system APIs used for file handling do not handle USB port names. To set the printer_redirection runtime tuneable you need to create a runtime configuration file and then set the run time tuneable in this file. The default filename is 'cobopt.cfg' and this is just a standard text file. However, the file can be any name of your choosing (eg; myconfig.cfg). Then, to have the runtime system access the fil
Problem: How can I get an error when a REDFINES source/target are different lengths? Resolution: This "error" would return an informational message from the checker and is not reported by default (as you have found). If you want to see these errors then you will need to specify the WARNING"3" directive on your compilations. Old KB# 5734
Problem: In .Net Winforms how can a user hide controls when a checkbox is checked ? Resolution: In WinForms there is a CheckedChanged event for a CheckBox. You can use this and the "Checked" property of the checkbox to hide controls as required. The simplest way to hide a control is by setting the "Visible" property of a control to false. Some example code that does this is:- method-id. "cboxHide_CheckedChanged" final private. linkage section. 01 sender System-Object. 01 e System-EventArgs. procedure division using by value sender e. if self::"cboxHide"::"Checked" &
Problem: When we try to run our application on the Net Express development machine we get the following error: ASLM: Semaphore failure. ASLM: Errno 1000 Why is this? Resolution: This indicates that the Net Express runtime license cannot be found. On the development machine please ensure that your application is linked with the dynamic option and/or that PATH/COBDIR are set to point to the location of Net Express. Old KB# 5720
Problem: A standard user is trying to invoke Net Express. Resolution: The user requires full access to the installation path, the demos, and the Micro Focus registry structure. Old KB# 5787
Problem: Release 4.0: Keystroke Ctrl C or Ctrl V does not work as expected with the CommonControl demo "TXTENTRY". What has to be programmed to get these keystrokes? Resolution: To get a Ctrl C or Ctrl V as expected, the method "getHighLightArea" is necessary for the Ctrl C instead of "setHighLightArea" coded in the demo. In the "EfDataKey Section" where the EfDataKey callback event is handled. Please code e.g.: if K-keyAsNum of Keystroke = 3 *> Ctrl C INVOKE aTextEntry "getHighLightArea" USING CursorPos &
Problem: Release 4.0: The knowledge base articles KB: 20942 and KB: 21122 refer to SupportLine Newsletter articles, which show how to use the Windows XP Visual Style controls. The latest version of the sample is now available on the Net Express Examples page. Resolution: The sample demonstrates how to create a Dialog System screenset, which uses the Themed Controls of the XP Visual Style: http://supportline.microfocus.com/examplesandutilities/nesamp.asp#DialogSystem Demo: VisualStyleDemo.zip ---- The method used by the newletter article http://www.microfocus.com/mfnewsletter/technicalarticles/20050701-002.asp mentioned in KB: 20942 shows a purple line in each entry field. The newsletter article http://www.microfocus.com/000/XP-style-21_tcm21-5782.pdf, mentioned in KB: 21122, shows that the NoBorder-method from the class library can be used to get rid of this line. The example VisualStyleDemo.zip from the examples page minimizes the number
Problem: The comp-3 arithmetic should only retain the result equal to the defined pick value not what it can hold. WORKING-STORAGE SECTION. ***************************************************************** 01 PIC-S9X4-COMP-3 pic S9(4) COMP-3 value 5001. 01 PIC-S9X9-COMP-3 pic S9(9) COMP-3 value 5001. 01 WRK-S9X4-COMP-3 pic S9(4) COMP-3 value 0. 01 WRK-S9X9-COMP-3 pic S9(9) CO
Problem: While executing a program this error occurs: Load error : file 'EXTSM' error code: 173, pc=0, call=1, seg=0 173 Called program file not found in drive/directory What must we do to correct this problem? Resolution: There is a simple solution. Use the following command to create a Extsm.dll. cbllink -d -RS -k -v extsm.obj>cbllink.txt<Enter> Place the extsm.dll in the folder where your application is executing. This will make the sort available to all .EXE and .DLL programs. Cbllink.txt will capture all the details published by the "verbose" switch (-v) and the "keep" switch (-k) will retain the module definition file (.def) and the import library (.lib) for the dll. Old KB# 5735
Problem: Problem: The install of Net Express 4.0 on a Window XP professional failed because the Setup reported erroneously an installed Application Server for NE 4.0. Resolution: Workaround: 1. Using regedit, rename the key HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall to Uninstall-temp 2. Start the NX setup. 3. At the setup welcome screen, rename the key back to Uninstall. Old KB# 5769
Problem: How do you setup a Listview so that it is also resized when the hosting winform is resized. Resolution: The Anchor property of the control does this. By default the control is anchored to the top left. If you anchor top / left / bottom /right it should resize as required. Old KB# 5746
Problem: Problem with websphere deploying application gets error Resolution: Added MFCobol.jar in the PATH. Now Websphere will report successful application deployment. Old KB# 5732
Problem: The system has a limit of 100 GDI objects (brushes, colours, fonts, etc.), and this limit can be reached when the same GDI object (e.g. font) is being created repeatedly, leading to the error message "Cannot map any more GDI objects - Internal Limit Reached" Resolution: If you are working with List View, and this error is occurring. This may have been a result of creating the font object over and over. The problem appears to be with the wmgadgetnotify method in the control program. It is actually creating a new font for every prepaint message. You will need to make a small change in the SetFont method of the ...LVIEWITEM.CBL program. You will note there is only one single statement in that method, which is invoke lnkfont "deepcopy" returning itemfont Please comment that statement out, and add instead: move lnkfont to itemfont Old KB# 5789
Problem: You may have a character based screen application that you want to run inder Windows as a full screen display. However, when you run it the screen display may be much smaller than required and you may want to extend the screen to be a full screen making the screen a 25 lines by 80 column screen. Resolution: COBOL doesn't set a 25x80 screen as default for console based applications. Instead, the screen characteristics are set by Windows. When you originally developed your app, 25x80 was probably the standard screen size, although there were some exceptions where 43 and 50 line screens were used. (These subsequently led to the intorduction of the C4 and C5 runtime switches). The only way to get a full screen is by clicking the top left corner of the application screen and selecting 'Properties'. One of the options then available is 'Full Screen'. However this only expands the display to cover the full screen and does not necess
Problem: To pass a structure like this: 01 LINKVARS. 03 VAR1 PIC X(02). 03 VAR2. 05 VAR3 PIC X(10). from COBOL to Java but to also send it as a Byte[] type instead of a string. Is there some way to do this? Resolution: You can't pass a record structure directly from COBOL to a Java method which is expecting a byte array, as there is no mapping for that within the Object COBOL runtime support. However, we do have a means of creating arrays using the jarray class. If you create a one dimensional byte array using the jarray class, the getData/commitData methods can then be used to copy a COBOL buffer into it. That jarray can then be passed to the
Problem: Has one form, wants to be able to click on a button and have a different form popup Resolution: 1) Create a new Cobol, windows form, name the project FormPopup 2) Add another form to the project ( Right click on the project in solution explorer, select Add New Item, Select a Windows Form, name it Form2, click OK) 3) Add a button control to the first Form (Form1). 4) Double Click on the button to create the button click event handler 5) In the repository add this line of code: Class form-form2 as "FormPopup.Form2" 6) Go back to the button click event handler that was created (method button1_Click) 7) Add a working storage section with the following code: 01 newForm object reference form-form2. 8) In the procedure division add the following code: set newForm to form-form2::"New"() invoke newForm::"Show"(). 9) Build and Run (Instead of using the form's Show method you could use the ShowDialog method, but then t
Problem: Enabling a cobol program to recognize a printer plugged into a usb port Resolution: The way to print via a USB-port and not the 'normal' LPT1/2 etc is to use the printer_redirection run-time tuneable. This redirects output on a file defined as ASSIGN TO PRINTER to whatever your default printer is. So, if that is connected via USB it should work. The printer_redirection tuneable causes ASSIGN TO PRINTER statements to go to the print spooler rather than LPTn. Therefore, provided the printer attached to the USB has been installed properly there should be no problem printing to it. There is no way to access ports directly in our product because the operating system APIs used for file handling do not handle USB port names. The printer_redirection mechanism is the only way that accessing a printer connected via USB can be done. To set the printer_redirection runtime tuneable you need to create a runtime configuration file and
Problem: Working with IUnknown pointers in an OLESafeArray. If you have an instance of OLESafeArray which contains the OLE type (determined by invoking "getVarType" on the safe array object) VT-UNKNOWN (value 13 in olesafea.cpy copy file), you can use the OLESafeArray "getElement" method to retrieve the pointer value. You can then use the pointer value as a parameter to the olesup "getCOBOLObject" method to return an object reference which you can then work with. Resolution: Working with IUnknown pointers in an OLESafeArray. If you have an instance of OLESafeArray which contains the OLE type (determined by invoking "getVarType" on the safe array object) VT-UNKNOWN (value 13 in olesafea.cpy copy file), you can use the OLESafeArray "getElement" method to retrieve the pointer value. You can then use the pointer value as a parameter to the olesup "getCOBOLObject" method to return an object reference which y
Problem: 1. Program A calls program B. 2. Program B opens a file, then returns control to program A. 3. Program A calls program B again. 4. Program B accesses the file, assuming it is still open from program A's prior call. This causes an immediate "47" I/O declarative error. Apparently, working-storage variables in program B held state from the previous call but the FILE OPEN state did not - the file has reverted to a closed status without ever being explicitly closed. Again this behavior is different from my 3.0 system. Is this also a compiler directive or runtime setup issue? Resolution: The sub program was using EXIT PROGRAM to return to the calling program which using RM directive will close all open files. Adding "ANSI" to the RM directive will allow the EXIT PROGRAM to keep files open. RM"ANSI" O
Problem: Use the same Net Express IDE settings you have on one machine on the other machines that have the same version of Net Express. This also can be a way to resolve a corrupted Net Express IDE settings. Resolution: 1. Go to Start > Run 2. REGEDIT<enter> 3. Go to HKEY_CURRENT_USER\\software\\Micro Focus\\Net Express\\4.0\\IDE 4. Make sure the IDE key is selected or has the focus on 5. Click on Registry > Export Registry File... from the menu 6. Specify a new name, which will have REG as extension 7. Click on the Save button 8. Take the REG file to the other machine 9. Make sure Net Express is not running 10. Double click on the REG file 11. Click on the Yes button to confirm that you wish to add the information in the REG file to the Windows registry Old KB# 5405
Problem: Is Visual Studio 2005 supported in Net Express 4.0? Resolution: Currently the Net Express 4.0 product works with Visual Studio 2003. The Net Express 5.0 version works with VS 2005. Old KB# 5399
Problem: Changing the current date to test in a project. Resolution: Open the project where you want the date changed. Go to the Project/properties tab. Select Application under Environment. Next choose the Testing tab - here you can change the Year, Month and or day. Old KB# 5428
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.