Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: 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 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: 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
Problem: While debuging, if I want to have a look at the contents of a field, I press "q" then followed by "c". However, if I want to have a look at the contents of an array, I am having problems finding the keys that allow me to "scroll" up/down the array contents. Resolution: To view the contents of an array, place your cursor over the group item of the array, by going to the working storage of the array and then press "q" followed by "c". Next press "F5" / "F6" to step down / up through an 'OCCURS' field of a group item. "F8" will take you to the child of that group item, that is, the data element of that level. "F9" will take you to next data element of the same level. "F7" will take you back to the group item of the child. Old KB# 4117
Problem: Following the steps in the Resolution below it should be possible to discover which Native Code Generator created a .GNT or .O file. This can be useful if you want to discover which release of Server Express was used. Resolution: Open the GNT/OBJ file with the command: what filename or strings filename | fgrep "@(#)" Seach the contents of the file for @(#) There should be a string which looks like: @(#)Hello 99051015180266 GNR-049060000AC Genesis PowerPC hilo 1.231> or @(#)hello 99051015393162 GNR-054060000AC tcg1di386 1.422> which means: hello - base name of the INT file from which this file was generated. 99051015393162 - date and time when it was generated. GNR-054060000AC - version of checker stamp which comes from the INT file. tcg1di386 - version of the generator used.
Problem: You may find that this information may be missing in your version of the documentation. The "What is new" section says that the search order has changed since Server Express 2.2, but the search order that is actually taking place hasn't been detailed within the chapters that talk about the file handler configuration. Resolution: Currently (Server Express 4.0 and 5.0) the file handler searches for the configuration file in this order: 1. It checks for an environment variable named EXTFH. If the environment variable value is not equal to a space, it attempts to open that file. 2. Otherwise, it tries to open using "$COBDIR/etc/extfh.cfg". 3. If that fails, it tries to open "extfh.cfg" in the current working directory. 4. Finally, if that fails, it assumes that there is no configuration file and it takes all the default values for each one of the options. Old KB# 4107#netexpress#ServerExpress#COBOL#RMCOBOL#AcuCobo
Problem: Is it possible to design Dialog System windows with different colors? Resolution: It is not possible to design or change Dialog System windows (border and title bar), as they are controlled by the operating system. Here is also the description of "Color" from the Net Express help: -------------------------------------------------------------------------------- Color Color changes the foreground or background colors of a selected object or objects. You cannot change the color of a title bar of a window object. When to use: Use Color to change the colors of selected object(s). You must select an object or group of objects first. Effect: Dialog System displays a dialog box for you to select foreground and background colors. Select Foreground, then click on a color to make it the foreground color. Then select Background and click on a color to make it the background color. Press Apply to color the selected objects. Press Close to
Problem: Are ISO2002 User Defined Funtions supported in Net Express V3.1? Resolution: ISO2002 User Defined Funtions are NOT supported in V3.1 of Net Express. To use this functionality you need to use V4.0 or above. Old KB# 4046
Problem: When writing a customised file handler on OCDS, the file ufhtab.o is provided to give various functions. This file has to be linked in to the runtime system. There seems to be no equivalent to this file in Server Express. Resolution: The cob command line to link an application with a user callable file handler has changed: you no longer need to specify the file handlers for all the different types of files, and the module ufhtab.o is therefore no longer required. It's also recommended that you specify the file handler with the CALLFH compiler directive, rather than using the -m flag. ** This option may be withdrawn in a future release of Server Express. ** Old KB# 4080#ServerExpress#RMCOBOL#COBOL#AcuCobol#netexpress
Problem: All terminals use a temporary storage queue right now. How can we convert all to use a recoverable storage queue? Also, is there a way to set the default to recoverable storage queue in place of the temp as it is now? Resolution: If the existing configuration does not use predefined queues, which is the typical usage, then depending on the queue name it might be possible to use a generic TST definition. When you define a Temporary Storage Table (TST) entry the name can be up to 8 characters long. If you specify less than 8 characters then you can still get a generic match. For example, assuming you have terminals A000 and B000 each running the transaction TEST. If the TS queue name is of the form TESTA000 where the transid is prepended to the termid then you can define a protected TS queue of 'TEST'. All TS queues that start with the prefix TEST will match the generic TST entry and use its configuration. Old KB#
Problem: Deploying an application created with Net Express and running on Application Server for Net Express may sometimes result in a Dynamically Bound RTS Error. NOTE: View the Adobe Acrobat .PDF form of this document via the attachment link at the bottom of this document for the complete document, which includes graphic screen shots of the error message being referred to. Resolution: There are three possible situations that can cause this error to occur: " The first, and most likely, cause of this error is a difference between the Fix Pack levels between the Net Express and Application Server for Net Express packages. The correction for this situation is to insure that both are on similar Fix Pack levels. " The second cause for this error message could be that both products have the correct Fix Pack levels, but there's a problem with the environment settings. i.e.: the Path is set to point to an older or newer version of a CBL
Problem: This Demo reads in the binary data of a .jpg and then writes it to a database 8KB at a time. The .jpg is stored in the database as an Image field. It then reads this Image field 8KB at a time into a memory buffer and then writes it to a file on disk and then opens the file. Resolution: INTRODUCTION ========== This Demo reads in the binary data of a .jpg and then writes it to a database 8KB at a time. The .jpg is stored in the database as an Image field. It then reads this Image field 8KB at a time into a memory buffer and then writes it to a file on disk and then opens the file. SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------------------- BlobDemo.cbl Copy Files: -------------------- -------------------------
Problem: In a .NET Cobol program which creates and prints a Word document, how do I set the ActivePrinter property from within the Cobol program to select the printer I require? Resolution: You can use the OLE Object, e.g. a Word document, to set the printer settings. Have a look at the attached demo for how to get the name of the default printer using the ActivePrinter property. The commented out lines in the code will change the printer name. Attachments: test1_1403.zip Old KB# 4056
Problem: According to the documentation, a fileshare server can be run as a background task using the following command line: fs >server-1.log 2>&1 & However after running this command, the following is displayed on the command line: [1] Stopped fs >server-1.log 2>&1 and an rts32 process is left running while can only be terminated with a kill -9 Resolution: Problem here seems to be that the fileshare password file needs to be available when starting the server as a background task. This is normally configured in the fs.cfg file, however this file does not seem to get automatically picked-up when starting the server as a background task. The following command lines will correctly start the server in background mode: 1. fs < fs.cfg >server-1.log 2>&1 & 2. fs -s
Problem: This example demonstrates how an output file can be redirected to the Win32 Print Spooler using the printer_redirection tunable. Resolution: INTRODUCTION ========== This example demonstrates how an output file can be redirected to the Win32 Print Spooler using the printer_redirection tunable. SOURCE FILES: ========= Program Files Description ---------------------- ----------------------------------------------------------- PRTTUNE.CBL Resource Files: ---------------------- ----------------------------------------------------------- COBCONFIG.CFG REQUIREMENTS: ========== A default printer must be defined and available OPERATION: ======== Simply rebuild and run the Project NOTE: ==== To see how the printer_redirection is set you can look at the file called cobconfig.cfg. The cobconfig.cfg i
Problem: Is this working correctly WS-UNSIGNED PIC 9(15) COMP-5 VALUE ZERO. WS-SIGNED PIC S9(15) COMP-5 VALUE ZERO. WS-BYTES PIC X(20) VALUE '-1380985813' MOVE FUNCTION NUMVAL(WS-BYTES) TO WS-UNSIGNED MOVE FUNCTION NUMVAL(WS-BYTES) TO WS-SIGNED After the above operation was performed: WS-UNSIGNED = 2057592656942123 WS-SIGNED = -0000001380985813 Can this be explained? Resolution: The explanation has to do with the definition of the compiler directive comp-5. COMP-5 compiler directive by default is set to COMP-5"2" COMP-5(2) says that negative numbers are stored in an unsigned COMP-5 item in 2's complement form. This is exactly what is happening. If you want the sign preserved then you need to store the value in a signed data item.
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.