Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This show removing the Close Button from the COBOL Text Window Resolution: INTRODUCTION ========== Removing Close Button from the COBOL Text Window. This demo shows how to remove the "x" close button from the COBOL TEXT WINDOW title bar. It uses Windows Styles and API calls to acheive this. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- test1.cbl Copy Files: ---------------- ----------------------------------------------------------- minwin.cpy winbase.cpy winclass.cpy winerror.cpy wingdi.cpy winnls.cpy wintypes.cpy winuser.cpy Resource Files: ---------------- ----------------------------------------------------------- runit.bat OPERATION: ======== To run the demo unzip to a directory and run "runi
Problem: This is a Web demo which demonstrates the use of COBOL to validate FORM input fields and uses JavaScript to display an error message place focus on the filed in error. Resolution: INTRODUCTION ============ This Web program demonstrates the use of a COBOL CGI program to do validation of the form input fields. If an error is encountered, a message box (alert) is displayed thru the web page and focus is placed on the input field in error. To do this, three hidden input fields are used on the web page: one (errors) that will be toggled between "y" or "n" to denote if an error exists, one (msg) that contains the error message to be displayed, and one (focusfld) to contain the name of the input field to place the focus on. The COBOL program populates the three hidden fields. Javascipt is used to check if the errors field is "y" and displays an alert message if true. Notice the onload parameter of the BODY tag in the html. I
Problem: This is a sample page whichs shows how to: add items to the ActiveX list box, add items to the ActiveX selection box, add tabs to the ActiveX tab strip control, and show/hide controls when a tab change is made on the tab strip control Resolution: INTRODUCTION ========== This HTML form illustrates the use of JavaScript on some ActiveX controls. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- JSandActX.APP NetExpress project file Form Files: ------------------- ----------------------------------------------------------- HTMLPage.htm HTML form with embedded JavaScript and ActiveX controls OPERATION: ======== This project does not contain a CGI since the process is done
Problem: Every time a COM registered component was created there was a slight delay. This leads to a performance issue when componants are consistantly being created. Resolution: This was due to a "wins" server being specified in TCPIP setting. The wins setting should not have been specifed as the site was using a dns server. Old KB# 4193
Problem: This example demonstrates the use of the two Win32 API functions WNetGetUser to retrieve the name of the user who is currently logged on, and WNetAddConnection2 to verify a specified password against a network servers password file for the current user. Resolution: INTRODUCTION ========== This example demonstrates the use of the two Win32 API functions WNetGetUser in order to retrieve the name of the user who is currently logged on, and WNetAddConnection2 in order to verify a specified password against a network servers password file for the current user. These routines allow you to use the Networks password authentication routines so that you can use the same network user names and passwords as security to your own application. You pass a network machine name, a username and a password to the WNetAddConnection2 function and it will attempt to log the specified user on to the network machine name provided. A return code is returned which indicates
Problem: This demo illustrates using Win32 API function Winexec to start Notepad Resolution: INTRODUCTION ========== The program illustrates the use of the Windows API WinExec. This function runs the specified application. In this example, it runs Notepad.exe. This function is provided for compatibility with earlier versions of Windows. For Win32-based applications, use the CreateProcess function. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- WinExec.APP NetExpress project file WinExe.CBL COBOL source code Help Files: ---------------- ----------------------------------------------------------- Readme.TXT This file OPERATION: ======== Consider the following steps: 1. Lo
Problem: WSDL syntax ( WSDL tutorial: http://www.w3schools.com/wsdl/default.asp ) allows a WSDL file to have more than one WSDL tag <port > and <binding > and <portype > . Unfortunately, at the time this article was written, the Micro Focus tool ( Net Express menu bar->Service->Generate Client->using WSDL), Our Web Service Client 'generator' , only uses one port (the first one) and includes all operations within the binding for that port. How to you create, in the Cobol Web Service Client, ALL THE OPERATIONS defined in the .WSDL which has multiple <port > & ...? You'll have to modify the .WSDL so it just uses ONE <port > and <binding > and <portype > tags. Enhancement request have been raised so the MF tool, our Web Service Client 'generator', can consume WSDLs using multiple <port > and <binding > and <portype > tags. These should be included
Problem: This demo shows how to use the usage of the GetFileAttributes and SetFileAttributes APIs. This sample will set a file as Read-Only. Resolution: INTRODUCTION ========== This demo show how to use the usage of the GetFileAttributes and SetFileAttributes APIs. This sample will set a file as Read-Only. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- fileattribute.cbl OPERATION: ======== Rebuild and animate program. ========================================================== Keywords: demonstration, sample, example, demo, win32 api, attrib.zip demo.ex demo.me demo.ne Attachments: attrib.zip Old KB# 4159
Problem: GetSystemMetrics is an API that can be used to collect details from Windows. In this example it is collecting the resolution currently in use. Resolution: INTRODUCTION ========== GetSystemMetrics is an Api that can be used to collect details from Windows. In this example it is collecting the resolution currently in use. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- GSM.CBL Copy Files: ---------------- ----------------------------------------------------------- GSM.CPY REQUIREMENTS: ========== Ensure that the USER32.LIB is linked with the EXE. NOTE: ==== For details on the parameters that can be retrieved by this call go to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/sysinfo_8fjn.asp ==================================================
Problem: This example demonstrates the use of the Win32 SDK function FormatMessage to receive an error message text associated with a specified error number. Normally this would be used in conjunction with the GetLastError function in order to receive the error message text associated with an error returned by the last Win32 SDK function call. This example will simply display the error message text for the first 20 system errors numbered 0 through 19. This example also demonstrates the use of COBOL typedefs. Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 SDK function FormatMessage to receive an error message text associated with a specified error number. Normally this would be used in conjunction with the GetLastError function in order to receive the error message text associated with an error returned by the last Win32 SDK function call. This example will simply display the error message text for the first 20 system errors numbered 0 through
Problem: Using Win 32 API to create a new process in COBOL Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 API function call CreateProcess in order to execute a non-COBOL program from within a COBOL program. In this example, the Windows Text Editor NOTEPAD.EXE will be executed. The program will then wait until NOTEPAD has been exited at which point it will also exit. CreateProcess allows you to control how a program is started along with the parameters the environment and the working directory that the new program should use. SOURCE FILES: ========== Program Files Description -------------------- ----------------------------------------------------------- CREATEP.CBL Program that calls the CreateProcess function. WINTYPES.CPY Copy file
Problem: This demo shows how to create and set the properties of a shortcut using the CreateShortcut Win32 API function. Resolution: INTRODUCTION ========== This demo will demonstrate how to create and set the properties of a shortcut using the CreateShortcut method. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- wsshortcut.cbl Application program Copy Files: ------------------- ----------------------------------------------------------- wintypes.cpy Resource Files: ------------------- ----------------------------------------------------------- mflogo.bmp REQUIREMENTS: ========== To be able to run this sample application you will need to modify the source code where indicated. Namely; invoke theshortcu
Problem: Passing arguments from a URL Resolution: INTRODUCTION ========== The cgiraw demo shows how to read in html form data or url data without having to use external-form data items in the COBOL cgi program. The raw data will be output as html. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- cgiraw.cbl COBOL program that reads form data coming from a web server. Form Files: ------------------- ----------------------------------------------------------- HTMLPage.htm The html page that contains form and url data that can be submitted to the  
Problem: This sample program demonstrates how to use the Windows SHFileOperation API in order to send a file to the Recycle Bin when it is deleted. Resolution: INTRODUCTION ========== This sample program will demonstrate how to use the Windows SHFileOperation API in order to send a file to the Recycle Bin when it is deleted. This application will first call the subprogram "SelectFile" which uses the Net Express Class Library in order to display a Windows OpenFileName dialog box so that the user can select the name of a file to delete. The default filter used for the select file is *.tmp within the current directory. A number of temp files with this extension are provided in the project directory. Once a filename is selected and returned, this program will use the SHFileOperation API with the Delete function and the FOF-ALLOWUNDO flag which causes the deleted file to be sent to the Windows Recycle Bin so that it can be restored at a later tim
Problem: Example of using an Indexed file to track multiple executions of the same program Resolution: INTRODUCTION ========== This project uses an indexed file to track multiple executions of the same program. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------------------------- AppNmbrs.APP NetExpress project file Snapa.CBL COBOL source code Snapd.CBL COBOL source code Snapm.CBL COBOL source code Snapq.CBL COBOL source code Copy Files: ------------------- --
Problem: This example illustrates how to use the Windows MessageBox API function to display information for an application user. Four different techniques are described. Eight significant features are demonstrated: - call-convention, - COBOL Call Prototypes, - Constant Compiler directive, - Conditional Compilation, - Level 78 items, - z'literal', - procedure-pointer items, - set ... to entry ... statements. Resolution: INTRODUCTION ========== This example illustrates how to use the Windows MessageBox Api to display information for an application user. Four different techniques are described. Eight significant features are demonstrated, call-convention, COBOL Call Prototypes, Constant Compiler directive, Conditional Compilation, Level 78 items, z'literal', procedure-pointer items, and set ... to entry ... statements. There are five projects in these four directories: - cc66\\Cob32api\\MessageBox66
Problem: COM WORD: Automate Word to Perform a Mail Merge with Access Data ( GetMailMerge, OpenDataSource,... ) The cobol sample pasted below and attached to this KB is a copy & 'COBOL' paste of an example available on Microsoft Web site http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno2kta/html/offaut.asp Automate Word to Perform a Mail Merge with Access Data MFC example //For optional arguments COleVariant vOpt(DISP_E_PARAMNOTFOUND, VT_ERROR); //Start Word _Application oApp; oApp.CreateDispatch("Word.Application"); if(!oApp) { AfxMessageBox("Cannot start Word."); &
Problem: Reading data from the COM port using WIN 32 APIs/Sending data to the COM port using WIN 32 APIs Resolution: INTRODUCTION ========== This example program demonstrates how to access the systems Serial communications ports using Windows API function calls. Two projects are used in this example. SENDCOM wants to send some data to whatever is connected to COM1. It starts by sending a message to the device to get its attention. READCOM then responds with a short "OK" message and then receives (without any response) whatever is sent by SENDCOM. SENDCOM ends the connection by sending a final "finish" message which, when received, causes READCOM to terminate. SENDCOM terminates after sending the finish message. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- SENDCOM .CBL
Problem: This example program demonstrates how to use the Windows SDK functions to read and write to a system .INI file. These functions have been replaced by the Registry functions in 32-bit programs (see COBREG sample) but still exist to maintain compatibility with 16-bit programs. This program will read the WIN.INI file looking for the following entry: [NetExpressApp] NetExpressKey= If it finds the entry it will display the value associated with NetExpressKey. If it does not find the entry it will go ahead and create it and then read it back and display the value associated with NetExpressKey. Resolution: INTRODUCTION ========== This example program demonstrates how to use the Windows SDK functions to read and write to a system .INI file. These functions have been replaced by the Registry functions in 32-bit programs (see COBREG sample) but still exist to main- tain compatibility with 16-bit programs. This program will read the WIN.INI file looking for
Problem: Would like to know how to do old DOS Landscape Print reports in Net Express ? When converting a system that prints 132 character width and 66 lines to a page how can you get this working using Windows. Resolution: You can use the printer redirection runtime tunable to redirect print to the Windows Print spooler. You can also then use the PC_PRINTER routines to switch into Landscape mode and use a suitable monospaced font. An example of this approach is attached. Attachments: redir.zip Old KB# 4202
Problem: This program demonstrates the use of OLE Automation to send messages to objects in another application. This example uses Microsoft Word Resolution: INTRODUCTION ========== This program demonstrates the use of OLE Automation to send messages to objects in another application. This example uses Microsoft Word. This is a modified version of the demo program that is provided by Net Express in the NetExpress\\Base\\Demo\\Oledemos directory. It demonstrates how to change the Page Setup and Font information for a Word document. SOURCE FILES: ========== Program Files Description --------------------- ----------------------------------------------------------- WORDSETUP.CBL Program that calls the MSWord OLE automation functions. REQUIREMENTS: ========== Microsoft Word 97 or above needs to be installed on your system.
Problem: How to find out which version of Enterprise Link is installed? Resolution: To check which version of ELink you have installed, go to the Web Authors site and look towards the bottom of the screen. You should see something like: Micro Focus EnterpriseLink 5.0.6 Build Number 6481 on 04/06/06 19:23:36 for Microsoft Windows Old KB# 4133#EnterpriseLink#Rumba
Problem: Does POWER TERM use SSH? Resolution: PowerTerm supports both SSH-1 and SSH-2 standards (Secure Shell security). For additional information on this 3rd party piece of software you may like to take a look at the Ericom web site. Please note that this is not a MF product; we just package it with Net Express. Old KB# 4114
Problem: This is an extraction from an EL5.05 log file: 2005/05/16 09:19:06 [0x04cc] Process Session(3579): Session Qj0ZUdbFAzpuCpAF processing request http://localhost:80/stscripts/run.stn/onlineIMSA/ 2005/05/16 09:19:06 [0x04cc] SSSession::reload(6996): Reload current URL 2005/05/16 09:19:14 [0x04cc] Process Session(3579): Session w8I21E67VKFieeiq processing request http://localhost:80/stscripts/run.stn/onlineIMSA/ 2005/05/16 09:19:14 [0x04cc] SSSession::reload(6996): Reload current URL What does the message ""SSSession::reload(6996): Reload current URL" mean? Resolution: The "SSSession::reload(6996): Reload current URL" message is indicating that the URL has been reloaded by clicking on the refresh button or pressing F5, etc. Old KB# 4131#Rumba#EnterpriseLink
Problem: Does EnterpriseLink support Sun Solaris 10.0? Resolution: Yes. Solaris 10 is supported. Old KB# 4132#Rumba#EnterpriseLink
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.