Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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: 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: The sample demonstrates how to create a Dialog System screenset which uses the Themed Controls of the XP Visual Style. Resolution: INTRODUCTION ============ This application demonstrates a method of using the Visual Style (XP-Style) controls in a Dialog System Application. REQUIREMENTS: ============= The APP requires Net Express 4.0 or a higher version. The demo should run on all Win 32 systems but will show the visual style only on Windows XP and later systems, where the visual style layout is activated. The Visual Style requires an EXE build of the start program, because the resource file must be linked in. I.e. it will not show the visual style in an INT or GNT build. OPERATION: ======== The Visual Style: -------------------- The same base name has to be used for the .RC resource file and for the EXE. The resource file can be edited using a text editor like notepad. Refer to the manifest file within the resource file. The NoBorder
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: NLS DS demonstration Resolution: INTRODUCTION ========== This example program demonstrates how to use the National Language Support (NLS) features provided by Net Express and Dialog System. This allows you to create Dialog System screenset files whose text fields will automatically be converted at run-time between 2 or more different languages, i.e., English, French, Spanish, etc. This is done by creating the screenset using a default language, such as English, and then saving all the screenset text to a NLS file where it can then be translated into other languages. The NLS files are standard ASCII text files that store each different text string within the screenset as a separately numbered line with the text string stored between quotes. Example: $set 1 1 "DS NLS Support" *> Text for Window title. 2 &nbs
Problem: This demo shows you how can you place a bitmap as a background on your windows. This demo uses bitmaps of 16 colours, 256 colours and 24 bits colours. Resolution: INTRODUCTION ========== This demo shows you how can you place a bitmap as a background on your windows. This demo uses bitmaps of 16 colours, 256 colours and 24 bits colours. SOURCE FILES: ========= Program Files Description --------------------- ----------------------------------------------------------- bitmapdemo.cbl Simple COBOL program that loads bitmapdemo.gs Copy Files: --------------------- ----------------------------------------------------------- bitmapdemo.cpb copy file generated with Dialog System. Resource Files: ----------
Problem: This demo shows how to Get, Set and Redraw a Dialog System window using Win APIs Resolution: INTRODUCTION ========== This sample demonstrates how to change the attributes of a Dialog System dialog box...in this case, to make the dialog box sizeable by changing the window style. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- sizedlg.cbl Main program source file. sc.cbl Subprogram that changes the attributes of the window passed to it. Copy Files: ---------------- ----------------------------------------------------------- ds-cntrl.mf Dialog System control block. si
Problem: Error codes delivered by CBL_ routines: Byte-stream File Routines: CBL_CLOSE_FILE, CBL_CREATE_FILE, CBL_FLUSH_FILE, CBL_FREE_RECORD_LOCK, CBL_GET_RECORD_LOCK, CBL_OPEN_FILE, CBL_READ_FILE, CBL_TEST_RECORD_LOCK, CBL_WRITE_FILE File and Filename Routines: CBL_CHANGE_DIR, CBL_CHECK_FILE_EXIST, CBL_COPY_FILE, CBL_CREATE_DIR, CBL_DELETE_DIR, CBL_DELETE_FILE, CBL_DIR_SCAN_BEGIN, CBL_DIR_SCAN_END, CBL_DIR_SCAN_READ, CBL_GET_CURRENT_DIR, CBL_JOIN_FILENAME, CBL_RENAME_FILE, CBL_SPLIT_FILENAME, PC_FIND_DRIVES, PC_READ_DRIVE, PC_SET_DRIVE ... Resolution: Customers sometime ask SupportLine, what does this "14-thousand-somewhat"-RETURN-CODE or status mean, which is delivered by a CBL_Routine. This knowledge base article should be found by the Google search when a status like "14657" is entered. ----------------------------------------------------------------------------- For all these routines, if the routine is successful
Problem: The default stack allocation for Windows programs is 1MB. How can this be increased? Resolution: If you want to increase that for your executable program (if, say, it has a very large local-storage section) you can set the LINK environment variable before linking and the linker will set the appropriate property: SET LINK="/stack:10000000" If you need to increase stack allocation for a program that's already linked you can use the Windows editbin utility: editbin /STACK:10000000 myprog.exe Old KB# 4253
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 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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.