Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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 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: 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: 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: 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: 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: 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: 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: 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 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: 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 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 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: 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 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: 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: 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: 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 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 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: 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: Can the Acrobat reader be launched for a PDR file from Net Express COBOL? Resolution: Yes - use the WinApi ShellExecute. A demo for ShellExecute can be found at our samples page in the Internet: http://supportline.microfocus.com/examplesandutilities/nesamp.asp#Win32API It demonstrates how to launch the Internet Browser for an HTML-file. Changing the name of the HTML-file to the name of the PDF-file will start the Acrobat reader. The ShellExecute expects a zero-terminated filename, e.g. by z" ". Old KB# 4052
Problem: With Unix filenames/sourcenames are case-sensitive. With Net Express you could write: CALL "Great" and GREat.int will be found How does this work on Server Express? Is there a directive you can use to have the same behaviour? Resolution: On a UNIX system one can only have upper or lower case. A 'mixed' name in upper & lower case letters will not work. e.g.: GREat.int. This is related to the Operating System. Windows can handle this without problem but not UNIX. There is a directive FOLD-CALL-NAME (FOLDCALLNAME without hyphen works as well). This compiler directive allows lower- or upper case. But not a mixture. Old KB# 4108
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.