Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This demo contains a number of Dialog System screensets togther with COBOL programs to illustrate how to apply DATA VALIDATION Resolution: How do I validate fields as soon as they lose focus? The most common problem with field-by-field validation is that an application can end up in an infinite loop of validation errors. For example, if an entry field loses focus and is validated, and the validation fails, then focus is returned to the enrty field. However, this causes another control to lose focus, and if that control is also validated, then an infinite loop can result. Another problem is that you may sometimes not want to validate a field, for example if a user clicks the Cancel or Help buttons on a dialog box, or switches to a different application. This screenset illustrates one way to implement field-by-field validation which avoids the infinite looping problems, and allows the implementation of Cancel and Help buttons: Define the followi
Problem: Release 4.0: When trying to debug some Cobol programs called by one VB6 application. This is what happens: a. perform a 'Rebuild All' for the Cobol .APP project. This seems to produce the required .IDY and .INT files for all Cobol programs in the application. b. set some breakpoints in Cobol programs which get called. c. select 'Start Animating...', which starts up VB6. d. load the relevant VB application into the VB IDE, set a breakpoint where the VB app calls into Cobol, then start the VB app. e. When the VB app gets to it's breakpoint, continue execution (both F8 'Step into' and F5 'Run' produce the same result...) f. T
Problem: This demo shows the use of the Dialog System extension DSMOVSZ to query and restore the window's position and size. Resolution: INTRODUCTION ========== This demo shows the use of the Dialog System extension DSMOVSZ to query and restore the window's position and size. First, the COBOL program verifies if SaveWinSize.ini exists. If it does, it will read in the window size and position and will use DSMOVSZ to restore the window. Each time the user is exiting the screenset, the window's position and size are queried using DSMOVSZ, and the Cobol program will write them to SaveWinSize.ini. SOURCE FILES: ========= Program Files Description ---------------------------- ----------------------------------------------------------- SaveWinSizeNX31.APP Net
Problem: This demo is a simple application which shows Net Express working with XML Resolution: INTRODUCTION ========== This example demonstrates the use of the Extensible Markup Language (XML) within a Net Express Web application. XML code can be output via EXEC HTML language extensions provided by Net Express. Extensible Style Language (XSL) documents can also be used to translate the XML into HTML for output. In this example a simple HTML input form will be displayed allowing the user to select one of three methods in which the XML page should be output. It can be displayed without a style sheet (only the bare XML code will be displayed) or with one of the two style sheets provided. It uses embedded SQL to access the Net Express sample database "NetExpress Sample1" which will be stored in the NetExpress\\base\\ demo\\smpldata\\access directory as Demo.mdb. It accesses the table "Staff" within this data source. It uses the data wit
Problem: This shows how to use the MOUSE-OVER event when NLS is present. Resolution: INTRODUCTION ============ This program demonstrates the use of the mouse-over event in dialog system SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- Testnls.cbl This program sets up the coblang environment variable before the call to dialog system Testnls.gs This is the screenset that shows the use of mouse-over. Copy Files: ---------------- ----------------------------------------------------------- testnls.cpb &nb
Problem: This demo shows a Dialog System/COBOL application making MAPI calls to interface to Microsoft Exchange Resolution: INTRODUCTION ========== This project demonstrates how Net Express can be used to send an e-mail using the Messaging Application Programming Interface (MAPI). The demonstration consists of a simple GUI email application which can be used to send e-mails with attachments. It is intended to be a demonstration only and not a fully functional application. Documentation on the API routines used can be found in the Microsoft Win32 Software Development Kit (SDK). A copy of this is supplied with Net Express as standard. The Application Interface has been developed using Dialog System. In addition to MAPI calls this module also shows how an Application can write messages to the NT Application Event Log using Win32 API routines. The demo has only been tested on Windows NT using Microsoft Exchange but should work OK with any MAPI complia
Problem: The following question was received from a customer: On the mainframe, we add 4 bytes to the sorting position for variable length sequential files. It looks like we should NOT do this when we are sorting Microfocus variable length sequential files. Can you confirm that this is the case? Resolution: Yes, this is the case. The file characteristics are deduced from the file itself for variable length and indexed files, so there is no need to add the 4 extra bytes. Old KB# 4259#RMCOBOL#netexpress#AcuCobol#COBOL#ServerExpress
Problem: The sample is used to demonstrate how create transparent dialog boxes in Dialog System Resolution: INTRODUCTION ========== The project file Layered.APP is used to demonstrate how create transparent Dialog Boxes in Dialog System. To do this the demo uses the Layered Window API that was introduced in Windows 2000. RESTRICTIONS ========= Support for Layered Windows was added in introduced in Windows 2000. Transparent windows using this technique will therefore work only on 2000/ME/XP/2003. It will not work on Win9x systems. ========================================================== Keywords: demonstration, sample, example, demo, Dialog System, layered.zip demo.ex demo.ne Attachments: Layered.zip Old KB# 4231
Problem: This demo shows how to create icons in a Dialog System Pulldown-Menu Resolution: INTRODUCTION ========== This Demo shows you how to create Icon's in a Dialog System Pulldown-Menu. In Dialog System we have no functionality for this. In this Demo we can show how you can do this via WinApi system calls. kind Regards Andre Beuth & Dieter Petz SOURCE FILES ========= Program Files Description ------------------ ----------------------------------------------------------- Menueitem.cbl Main Program Menueitem.gs Dialog System Screenset *.bmp Bitmaps used in the Pull-down-Menue Copy Files ------------------ -------------------------------
Problem: Scenario: I need to create a Cobol based DLL, which can be called from Visual Basic 6 as a function. I have found vb-call-cobol.zip demo program in the Net Express Samples & Utilities section of the Micro Focus SupportLine. I am using that approach. I set up my VB program and compiled the Cobol module in Net Express. However, when I run VB, I'm getting run time error 53 - 'ccsvallt not found' ('ccsvallt.dll is my DLL). Resolution: Error 53 is reported in Visual Basic when it can't load the DLL. The most likely cause is that a Win32 DLL is being used rather than via OLE. What's likely happening is that VB found the COBOL DLL but its failing to load because it cannot find the runtime. You can try the following:- - Use the Build Settings in the IDE (under the 'Project' menu) to set the Dynamic Option on the 'link' tab.
Problem: This application demonstrates a method of using both Dialog System GUI screensets and character based console screens within the same application. Resolution: INTRODUCTION ========== This application demonstrates a method of using both Dialog System GUI screensets and character based console screens within the same application. The program PROG1.EXE is the main executable which is linked as a character based application. (Look in IDE/Project/Build Settings/Link/ General). The program SHOWCONSOLE is a subprogram whose .OBJ file is linked into both PROG1.EXE and PROG2.DLL. It contains the following callable entry points: - "hideconsole": hide the console window which is created when PROG1.EXE is started. Everytime this entry point is called the window will be hidden. - "showconsole": make the console windo
Problem: This demo shows how to create a splash screen window for your Dialog System application. Resolution: INTRODUCTION ========== This demo shows how to create a splash screen window for your Dialog System application. A 16-color bitmap was used on a dialog box as the splash screen. The bitmap is stored in a resource dll (bmp.dll). See the Dialog System Help, Contents tab, "Bitmaps, Icons and Mouse Pointers", "Adding Your Own Bitmaps" section to see how to do this. 256-color bitmaps cannot be placed within a dll and used by Dialog System. However, you can load the bitmap into Microsoft Paint and do a "Save As", where you can change the "Save as type" to 16-color bitmap. Dialog System is able to use the bitmap by way of the resource dll through the use of a bitmap/icon sidefile. This is a text file that you can create and specify in the Dialog System Options menu, Resource files...,Icon/Bitmap file. Be sure not to speci
Problem: It may happen that an ISAM file is corrupted and needs to be rebuilt, but when the rebuild utility runs not all records are returned. Resolution: This could be caused by a physical corruption in the data (.dat) portion of the file. A "rebuild MyFile.dat" only builds a new IDX file and keeps the DAT file unchanged. Use the rebuild with InFile and OutFile and the option /d to rebuild a corrupted data file: REBUILD.EXE Infile,Outfile /d Old KB# 4247#netexpress#ServerExpress#RMCOBOL#AcuCobol#COBOL
Problem: This demo shows the use of drop down menus, submit, check marks, radio buttons, and how to insert an input image. It also is an asymmetric application so when you hit the submit button, another page is returned. Resolution: INTRODUCTION ========== This project shows how to use drop down selects, check marks, radio buttons, submit buttons, and server-side text. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- WebDemo.APP NetExpress project file WebDemo.CBL COBOL source code (CGI source) Copy Files: ------------------- ----------------------------------------------------------- WebDemo.CPF Copybook (generated by Form Designer) WebDemo.CPY &
Problem: This demo shows how to parse XML Resolution: INTRODUCTION ========== This example demonstrates the use of the Microsoft XML classes for manipulating Extensible Markup Language (XML) files. This example will show how to use the methods within these OLE classes to parse an XML document into its various components. The file sample.xml contains the document used in this example. The document describes a list of musical compact discs divided into title, artist, tracks, price and track information. This program will extract tag information from the XML object and will display the parsed data. It will also call the subprogram GetCDData using the XML object as a parameter and this program will further parse the document based on the values of certain tags. This example also demonstrates the use of recursion within COBOL as the XML object is in a tree structure and the subprogram to extract data calls itself until the tree data is exhausted. SOURCE F
Problem: This demo shows how to use the paint method for a window created by Dialog System Resolution: INTRODUCTION ========== Example of creating a window and trapping the paint method. SOURCE FILES: ========== Program Files Description --------------------- ----------------------------------------------------------- PaintMe.cbl PaintMe is just the trigger program that creates aPaintWindow. MakePaintWin.cbl Program makes a paint window. Although no local-storage is used, this section is needed to allow EntryCallback
Problem: This demo shows how to place the cursor at the end of a Dialog System entry field. Resolution: INTRODUCTION ========== This demo shows how to place the cursor at the end of a Dialog System entry field. By default the cursor appears at the beginning. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- TEST1.CBL Dialog System control program. DSCSRPOS.CBL Utility program that moves the entry field cursor. Copy Files: ------------------- ----------------------------------------------------------- TEST1.CPB Example Dialog System screenset Datablock copybook. Form Files:
Problem: This demo shows how to prevent users from using the mouse right-click to go "back" to previous page for example Resolution: INTRODUCTION ========== How to prevent users from using the mouse right-click to go "back" to previous page for example? This has to be done with JavaScript. Please bear in mind that this is NOT fool-proof! ****** This script is *NOT* fool-proof. People can disable JavaScript support in their browser, use a browser which doesn't support JavaScript, or use a browser to link directly to the image that you want to protect. Also the pages and images are normally stored in the user's browser cache (for viewing later whilst offline) - with a little bit of work, the thief could find your image in their cache. It also doesn't stop users accessing the source of your page from the toolbar menus (View | Page Source). You could attempt to load your page into a window without toolbars - but again this isn'
Problem: This example illustrates how to use dsdir.obj/.gnt in your COBOL Dialog System application. Buttons defined within the File menu are used to collect and return Resolution: INTRODUCTION ============ This example illustrates how to use dsdir.obj/.gnt in your COBOL Dialog System application. Buttons defined within the File menu are used to collect and return information to the main program. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- NewSet.cbl Example program using File menu buttons. Open and Save to collect filenames for file processing. OPERATION: ========== When I started Dialog System to create a n
Problem: You might be using dsrunner with more than one ScreenSet. When you minimize the second one, and try to reactivate it by the dsrunner function "SWCH", the minimized ScreenSet does not get reactivated and remains in the task bar. Resolution: It is possible to get back a minimized window by a USER-EVENT posted from one ScreenSet to the other. Before you can do so, you have to transfer the WINDOW-HANDLE via a DSRUNNER shared memory area. The ScreenSet receiving the USER-EVENT, can do a RESTORE-WINDOW and a SET-FOCUS. The attached sample is a modified version of the DDESAMPL provied with Net Express The followng modifications were made: --------------------------- In every ScreenSet: - Add to the data blocks, immediately after the last DSRUNNER variable "DSRUNNER-PARAM-STRING" HWND-SAMPL  
Problem: This sample show how to trap Function Keys events - F3 & F10 in this sample - before Windows does. This is achieved by sub-classing the object (e.g. entry field) where the F10 or F3 should be intercepted. ***This demo can also be used to trap any keys, not only Function keys. Resolution: INTRODUCTION ========== Pressing the F10 function key activates the menu and F3 function key to exit screen in Windows. This sample show how to trap these events before Windows does. This is achieved by sub-classing the object (e.g. entry field) where the F10 or F3 should be intercepted. ***This demo can also be used to trap any keys, not only Function keys. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- NewSet.cbl Prog
Problem: How to facilitate migrating DB2 tables to MS Excel Resolution: To migrate DB2 tables to MS Excel use the 'export' feature in the SQL wizard. To achieve this, do the following: - Create a new project within Net Express IDE and add your source file(s). - Make sure XDB server is up and running. If not, go to Tools | SQL for DB2 | Start Server menu option. - Select Tools | SQL for DB2 | SQL Wizard menu option from within the IDE window - Open up a table in your database - Select File| New | Export within the SQL Wizard window - Change the 'File name' of the 'Target File Information' on the 'Export' window to have the extension .csv - Select the 'Format' option on the 'Export' window as 'ASCII delimited' via the drop down menu. - In the 'Fld Delim' field of the 'Export window' type a comma (ie ",") - Click on the 'run' icon on the SQL Wiz
Problem: In some versions of COBOL (namely AS/400) calling an array and setting the table index to zero works. However, in Micro Focus COBOL this returns an error ("153 subscript out of range") as the default value is set to one. In order to maintain compatability with other mainframe dialiect it is possible to modify the default setting to zero. Resolution: A program would compile correctly with the default directives: 1 ind-2 usage index. 1 t1 occurs 10 indexed by ind-1. 3 pic xxxx comp-5. set ind-1 to 0 set ind-2 to 0 Old KB# 4269
Problem: This Dialog System example illustrates how to get a button press returned to the COBOL program. Resolution: INTRODUCTION ============ This Dialog System example illustrates how to get a button press returned to the COBOL program. SOURCE FILES: ============= Program Files Description ----------------- ----------------------------------------------------------- NewSet.cbl Modified generated COBOL program that processes buttons in a dialog. Copy Files: ======= Newset.cpb Generated copy book for screenset. OPERATION: ========== To learn how this example was created edit NewSet.gs. You may have to open the file with Dialog System in order to do this. Click Screenset (menu), Data block... (button). Two data items were added. MY-OK-BUTTON&nbs
Problem: The Dialog System "Color Selection" dialog box for setting colors of controls has a very limited selection of colors to choose from. To get a more varied selection of color choices, you can use the Micro Focus GUI Class Library. This means that you will have to add extra Dialog code for each control that you want to color by way of the class library. Resolution: INTRODUCTION ========== The Dialog System "Color Selection" dialog box for setting colors of controls has a very limited selection of colors to choose from. To get a more varied selection of color choices, you will have to make use of the Micro Focus GUI Class Library. This means that you will have to add extra Dialog code for each control that you want to color by way of the class library. To enable use of the class library from within Dialog System, add the following code to the SCREENSET-INITIALIZED event in Screenset...Global Dialog: CLEAR-CALLOUT-PARAMETERS $NUL
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.