Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: This shows how to find free disk space on a drive using Windows API calls Resolution: INTRODUCTION ========== Find Free Disk Space on a Drive using Windows API calls SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- diskinfo.cbl Main program for sample Copy Files: ---------------- ----------------------------------------------------------- miniwin.cpy winerror.cpy wintypes.cpy OPERATION: ======== Open project and rebuild application ========================================================== Keywords: demonstration, sample, example, demo, win32 api, freediskspace.zip demo.ex demo.ne Attachments: freediskspace.zip Old KB# 4170
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: 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: Sample project which highlights the use of hyperlinks in Net Express Resolution: INTRODUCTION ========== This HTML form illustrates the use of anchors (or hyperlinks) to navigate in different areas of the form. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- Anchors.APP NetExpress project file Form Files: ---------------- ----------------------------------------------------------- Main.HTM HTML form OPERATION: ======== This project does not contain a CGI since the process is done from the HTML form using the hyperlinks (or anchors) to get to different areas of the form. The form therefore can be tested directly from a web browser or consider the following steps: (1) Load
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: 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: 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: The SetWindowText Win32 API function can be used in a "Quick Win" or Windows application to change what is displayed by Windows in the Windows "Title Bar." In a Graphical Windows program, as opposed to a character ("Quick Win") program, you would get your Window handle from your CreateWindow Api call rather than the PC_WIN_HANDLE call-by-name routine. Resolution: INTRODUCTION ========== The SetWindowText Api can be used in a character mode program compiled with the Graphical setting or in a graphical application, to change what is displayed in the application's Window "Title Bar." In a graphical Windows program, you would get your Window handle from your CreateWindow Api call rather than the PC_WIN_HANDLE call-by-name routine used in this character mode example program. SOURCE FILES: ========= Program Files Description ----------------- --------
Problem: Example of an Active Server Page (ASP) calling a COBOL COM object Resolution: INTRODUCTION ========== This HTML form illustrates the use of JavaScript on some ActiveX controls. SOURCE FILES: ========== Program Files Description ------------------------ ----------------------------------------------------------- ASPtoCOBOL.APP NetExpress project file aspserver.CBL COBOL source code aspserver Trigger.CBL COBOL source code aspserver Server.REG Registry file Object Files -----------
Problem: MS APIs --> SetSysColors: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getsyscolor.asp --> GetSysColor http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getsyscolor.asp --> Color Table, RGB's values: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/colors/colors.asp Resolution: Paste of COBOL code ( attached to KB ): $set case copy "windows". identification division. special-names. call-convention 74 is STDCALL. working-storage section. 78 RGBlightGrey value x"C0C0C000". &
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: 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: Is it possible to recover source code from int , gnt or executable code ? Resolution: There is no decompiler available for Micro Focus products. Unfortunately there is no tools available to recover COBOL from Micro Focus generated modules. Old KB# 4180
Problem: This program demonstrates how to use the Windows 32-bit Network API functions to obtain a list of available network resources and their associated parameters. It also demonstrates how to map to a network drive and printer from within COBOL. Resolution: INTRODUCTION ========== This program demonstrates how to use the Windows 32-bit Network API functions to obtain a list of available network resources and their associated parameters. It also demonstrates how to map to a network drive and printer from within COBOL. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- ENUMNET.CBL Program that obtains information about all currently connected network drives. MAPNET.CBL Program that will map a l
Problem: This example demonstrates the use of the two Win32 API functions GetVolumeInformation and GetDiskFreeSpaceEx in order to retrieve certain information about a specified disk drive. Resolution: INTRODUCTION ========== This example demonstrates the use of the two Win32 API functions GetVolumeInformation and GetDiskFreeSpaceEx in order to retrieve certain information about a specified disk drive. The GetVolumeInformation will return the volume name, the serial number the system flags and the type of file system for the specified drive. The GetDiskFreeSpaceEx will return the total amount of disk space and the total amount of free disk space available for the specified drive. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- GETDISK.CBL Program that calls the WIN32 API functions. R
Problem: This shows how to get the details of the currently logged on users using Win32 API functions Resolution: INTRODUCTION ========== This program demonstrates using windows api calls to get computer name and user name. Place a brief description of the sample SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- getuser.cbl Program that makes win32 api calls to get the computer name and user name. Copy Files: ---------------- ----------------------------------------------------------- miniwin.cpy copybook needed to use the winapi calls. wintypes.cpy copybook needed to use the winapi calls. REQUIREMENTS: ========== Install the win32 sdk from the netexpress 3.1 cd-2
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: You may have validation defined for your Dailog System screenset, but the messages in the error message file do not appearwhen an invalid value is entered. Resolution: This could be because you have not defined the path of the error message file correctly (this is done by clicking on 'Resource Files' for the screenset and completing the appropriate field). Dialog System does not display an error when the mesage file is not found, it just displays spaces instead of the desired message. Old KB# 4203
Problem: Auf unseren Servern läuft auch ein Teilprogramm einer Kassenapplikation, welches mit Dialog System geschrieben ist. Das Programm überträgt timergesteuert Daten von der lokalen Datenbank in die zentrale DB2-Datenbank. Dieses Programm wurde bisher bei der automatischen Anmeldung des Servers im Rahmen der Anmeldeprozedur automatisch angestartet. Nun müssen wir dieses Programm als Windows Service starten lassen. Wir haben mittels des Windows Programmes "instsrv.exe" nun einen ausführbaren Windows Dienst erstellt. Dieser kann zwar angestartet werden und der Prozeß des Dialog System Programm erscheint im Prozeß Manager, dass Programm funktioniert aber nicht korrekt, es werden keine Daten übertragen. Können sie uns bitte daher Unterstützung geben, wie wir mit dem Dialog System Programm einen ausführbaren Windows Dienst erstellen können. Resolution: Es liegen derzeit bei Micro Focu
Problem: This example demonstrates how to create a link to an FTP site and also how to create an E-mail link from an HTML form designed with Form Designer. The input form is from an imaginary company and allows you to connect to an FTP site which is actually the Microsoft ftp site at Microsoft.com. The HTML document ftplinks.htm will be displayed in your browser. When the exit submit button is pressed, the CGI program FTP0501.EXE will be run which will display the output form ftplinks-out.htm. This form simply outputs a "Thank You" message to the user and offers a link back to the main page. Resolution: INTRODUCTION ========== This example demonstrates how to create a link to an FTP site and also how to create an E-mail link from an HTML form designed with Form Designer. The input form is from an imaginary company and allows you to connect to an FTP site which is actually the Microsoft ftp site at Microsoft.com. The HTML document ftplinks.htm will b
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 illustrates GetSystemTime and GetLocalTime. It also uses CBL_ALLOC_MEM and CBL_FREE_MEM to get and free memory for the SYSTEMTIME structure and passes the pointer to the API calls by value rather than by reference. Resolution: INTRODUCTION ========== The program illustrates the use of the Windows API GetSystemTime and GetLocalTime. It also uses CBL_ALLOC_MEM and CBL_FREE_MEM to get and free memory for the SYSTEMTIME structure and passes the pointer to the API calls by value rather than by reference. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- GST.APP Net Express project file GST.CBL COBOL source code Help Files: ---------------- &n
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.
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.