Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This example demonstrates the use of the Win32 SDK ODBC functions to get information about installed ODBC drivers. Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 SDK ODBC functions to get information about installed ODBC drivers. This example uses the direct ODBC function calls instead of using the Net Express OpenESQL preprocessor. This program will display a list of all ODBC drivers installed on your system and will then open a connection to the Net Express Sample1 DSN and display information about it. This sample DSN is installed along with the Net Express demo programs. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- ODBCINFO.CBL Program that calls the ODBC functions. SQLFUNC.CPY &
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 shows how to show the Win32 Platform, Version number, Build number using WIN 32 APIs Resolution: INTRODUCTION ========== Demonstrate how to use the GetVersion API. This version will work on all current version of Windows OS SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- showos.cbl OPERATION: ======== Rebuild project and run or animate. ========================================================== Keywords: demonstration, sample, example, demo, win32 api, showos.zip demo.ex demo.ne Attachments: showos.zip Old KB# 4190
Problem: Returning a short filename from a long file name under COBOL using the Win32 APIs Resolution: SOURCE FILES: ========= Program Files Description ----------------- ----------------------------------------------------------- Longname.cbl The program makes a winapi call to create a short filename Resource files: ---------------- ---------------------------------------------------------- Makes a call cob32api before winapi calls. REQUIREMENTS: ========== OPERATION: ======== Before using the demo... Create a "Long filename" on disk called "My filename" - use: echo "Hello" >"My filename" The program makes a winapi call to get a short pathname Program then checks status code for success or error. NOTE: ==== Set
Problem: This demo shows how to prevent user from submitting the form more than once using JavaScript. Resolution: INTRODUCTION ========== This demo shows how to prevent user from submitting the form more than once using JavaScript. SOURCE FILES: ========== Program Files Description ----------------------- ----------------------------------------------------------- mycgi.cbl CGI program Copy Files: ----------------------- ----------------------------------------------------------- mycgi.cpf Generated by Form Designer mycgi.cpv
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: 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: 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 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: 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: 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: Module-definition (.def) files provide the linker with information about exports, attributes, and other information about the program to be linked. A .def file is most useful when building a DLL. Because there are linker options that can be used instead of module-definition statements, .def files are generally not necessary. Microsoft URL explaining .DEF files: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_module.2d.definition_files.asp If, after compiling your COBOL program, these files ( .exp, .lib, .def ), appear, it is possible to eliminate them. Resolution: The problem is due to the link settings in the Project Build Settings of the DLLs in the project. So for each DLL do the following: 1) Right lick on the DLL and select Project Build Settings. 2) Click on the "Link" tab and then from the drop-down menu, select "Advanced". 3) &nb
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: 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 shows how to disable an html text input field programmatically through the CGI program and JavaScript code Resolution: INTRODUCTION ========== This demo shows how to disable an html text input field programatically through the CGI program and Javascript code. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- disablefield.app project file mycgi.cbl Internet App Wizard generated cgi program Copy Files: ------------------- ----------------------------------------------------------- mycgi.cpf Form fields copyfile mycgi.cpy &nb
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 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: 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 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 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 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: 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: Using Win 32 API functions to get the current user logged on the network Resolution: INTRODUCTION ========== This program demonstrates winapi call to get the network usernames. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- getnuser.cbl program makes the necessary win api calls to get network usernames. Copy Files: ---------------- ----------------------------------------------------------- miniwin.cpy need these copybooks for winapi calls. winerror.cpy winnetwk.cpy wintypes.cpy REQUIREMENTS: ========== Edit the getnuser.cbl and at the top you will notice the compiler Directive intcode(1) that will need to be set for creation of .int intcode is initially set to 1. Chan
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 program demonstrates the use of Win32 API calls SHBrowseForFolder and SHGetPathFromIDList to display a dialog box that will allow the user to select a directory. Resolution: INTRODUCTION ========== This program demonstrates the use of Win32 API calls SHBrowseForFolder and SHGetPathFromIDList to display a dialog box that will allow the user to select a directory. SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------------------- getDirectory.cbl COBOL program with logic to show a folder browser dialog. getDirectory.gs Dialog System screenset. Copy Files: --------------------  
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.