Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: Dialog System ( DSWIN.exe ) : How to do batch processing operations ? Resolution: In the Net Express online help, Search for the keyword DSWIN. You should find an entry titled 'Starting DialogSystem' which documents all the command-line parameters of the command DSWIN.EXE ( Dialog System tool ). Old KB# 4186
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: 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 example illustrates how to use Win32 Api functions to search a directory. File and directory attributes are interpreted and displayed. Resolution: INTRODUCTION ========== This example illustrates how to use Win32 Api functions to search a directory. File and directory attributes are interpreted and displayed. SOURCE FILES: ============= Program Files Description -------------------- ----------------------------------------------------------- FindFile.cbl Application program Win32 Api Functions ============ FindFirstFile FindNextFile FileClose FileTimeToLocalFileTime FileTimeToSystemTime PROGRAMMING: ==========
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: --------------------  
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: 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: 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 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 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: This example program demonstrates how to find the executable program name which is associated with a particular file extension and then use it to open the specified file. It uses the two Win32 API functions FindExecutable and CreateProcess. Resolution: INTRODUCTION ========== This example program demonstrates how to find the executable program name which is associated with a particular file extension and then use it to open the specified file. It uses the two Win32 API functions FindExecutable and CreateProcess. File associations are made in Windows Explorer under the File Types option. This example uses the filename DUMMY.CBL which is associated with Net Express when it is installed. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- FINDEXE.CBL &nb
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: 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: 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 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: Following is an example of how to Play a WAV file under 32-bit windows using the Win 32 API functions and PlaySound (old api) and PlaySound (Current API). The PlaySound API is the recommend way, and the information below relates only to the play sound demo. The zip file constains information about the sndPlaySound demo. Resolution: BUILD W/RELEASE: Net Express 4.0, All04n40.exe and 3.1, SP1 FixPacks ============ Two Net Express project files, "PlaySound.APP" and "PlaySound.OLD" are present in the project directory. The "PlaySound.APP" file is a Net Express 4.0 project file. The "PlaySound.OLD" file is a Net Express 3.1, SP1 project file. If you are working with Net Express 3.1 rename the 4.0 project file ("PlaySound.V40") and change the file extension of the 3.1 project file from "OLD" to "APP". INTRODUCTION ========== The "PlaySound"
Problem: This illustrates accessing the Windows registry with COBOL and writing or reading information from the registry Resolution: INTRODUCTION ========== This example demonstrates the use of the Win32 API function calls to access and create system Registry entries from within a COBOL program. In this example, we will create a new Registry key called "TestKey" which is a subkey of the Windows standard HK_CURRENT_USERS key. It will then create a null terminated string value name for this key and populate it with a value. It will then close the Registry, reopen the key, read the keys value and display the value to the user. You can check this keys existance after running this program by using the Windows program REGEDIT to view the Registry. SOURCE FILES: ========== Program Files Description ----------------- ----------------------------------------------------------- COBREG.CBL&
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: 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: 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: 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". &
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.