Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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 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: 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: This demo shows how you can create a Windows control panel application using Net Express and Dialog System. Resolution: INTRODUCTION ========== This demo shows how you can create a Windows control panel application using Net Express. SOURCE FILES: ========== Program Files Description -------------------- ----------------------------------------------------------- CPIApplet.cbl controlpanel.cbl Copy Files: -------------------- ----------------------------------------------------------- commdlg.cpy mfres.cpy minwin.cpy winbase.cpy winclass.cpy winerror.cpy wingdi.cpy winnls.cpy wintypes.cpy winuser.cpy controlpanel.cpb mfres.h DS Screenset: -------------------- ----------------------------------------------------------- controlpanel.gs Resource Files: ----
Problem: Is it possible to send an HTTP Request to a Web Server which contains an XML file as the message to be sent by using Net Express with .Net and the HttpWebRequest and HttpWebResponse .NET Framework classes. Here is an example program written as a COBOL console application: Resolution: $set sourceformat"variable" program-id. Program1 as "testhttppost.Program1". environment division. configuration section. repository. class HttpWebRequest as "System.Net.HttpWebRequest" class HttpWebResponse as "System.Net.HttpWebResponse" &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: Release 4.0: Getting compilation error when using alphabet-clause in a program which uses SET DIRECTIVES with ORACLE * Micro Focus Net Express V4.0 revision 038 Compiler * Copyright (C) 1984-2006 Micro Focus (IP) Limited. URN AXCGG/AA0/00000 * Micro Focus COBSQL Integrated Preprocessor * Net Express V4.0 Copyright (C)1984-2006 Micro Focus (IP) Limited. * URN AAAPA/ZZ0/00065 * CSQL-I-018: Invoking ORACLE8 Precompiler/Translator * CSQL-E-036: Unable to open the precompiler file: "C:\\uphv90.cs9" * CSQL-E-023: File Status 3/ 5 Rebuild complete with errors ------------------------------ When removing the ALPHABET clause the programm compiles without errors Resolution: This was a problem with procob, ORACLE's Pre-Compiler for C
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 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: Supplying an argument or parameter to MFNETX /DEBUGPROJ (e.g. MFNETX /DEBUGPROJ:projectname arg) fails with an error that it cannot find the project. Resolution: Since spacey project names are allowed in Net Express, the MFNETX /DEBUGPROJ command treats the characters following the project name and space as part of the project name. To avoid this to happen, you simply need to quote the project name signifying that the following the closing quote is an argument, i.e. MFNETX /DEBUGPROJ:"projectname" arg Old KB# 4255
Problem: If the following MOVE-OBJECT-HANDLE causes strange behaviour, e.g. for a ListBox: SCREENSET-INITIALIZED ... MOVE-OBJECT-HANDLE WIN-01 SM-HANDLE(1) Resolution: The object WIN-01 is not available at SCREENSET-INITIALIZED. So its handle cannot be moved. Move this code fragment to the WINDOWS-INITIALIZED dialog of WIN-01 and the handle of WIN-01 can be received. Old KB# 4248
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 you can use the SetParent Windows API to dynamically change the parent of a Dialog System window. Resolution: INTRODUCTION ========== This demo shows how you can use the SetParent Windows API to dynamically change the parent of a Dialog System window. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- SetParent.app Mainprog.cbl Copy Files ------------------- ----------------------------------------------------------- screenset1.cpb Screenset Files ------------------- ----------------------------------------------------------- screenset1.gs ========================================================== Keywords: demonstration, sample, example, demo, Dialog System, setparent.zip demo.ex demo.ne
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: Demonstrating the usage of the Dialog System Error Message File Handler, DSERRHAN. Resolution: INTRODUCTION ============ This project demonstrates using dialog system error handler "dserrhan". SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- dseh.cbl Program that loads the dserrh.gs screenset and the Dialog System error handler dserrhan. dserrh.gs screenset that demonstrates the dialog system error handler. Copy Files: ---------------- ----------------
Problem: Linkage parameters are not passed in a project with other CICS programs Resolution: Please check if you have the following directive in your project properties: CICSECM(). This directive should only be used with CICS programs. If the programs where you have this problem are not CICS programs, you should remove the CICSECM() directive when you compile them. CICS uses the linkage in a very particular way. In a CICS program you access to linkage using special CICS calls... so in this case your linkage parameters are there but you would need to use a CICS sentence to access to them. Old KB# 4271
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 demo demonstrate how to invoke some of the basics functions of Microsoft HTML Help via API calls. Resolution: INTRODUCTION ========== This demo demonstrate how to invoke some of the basics functions of Microsoft HTML Help via API calls. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- HTMLDemo.CBL Dialog System/Cobol program DSHTML.CBL COBOL programs using HTMLHelp API calls Copy Files: ------------------- ----------------------------------------------------------- HTMLDemo.CPB Dialog System screen
Problem: This is a sample of how to use UPPER CASE FUNCTION two different ways Resolution: INTRODUCTION ========== This HTML form illustrates the use of JavaScript to convert the string in input fields to uppercase. SOURCE FILES: ========= Program Files Description ---------------------- ----------------------------------------------------------- ToUpperCase.APP NetExpress project file Form Files: ---------------------- ----------------------------------------------------------- HTMLPage.htm HTML form with embedded JavaScript OPERATION: ======== This project does not contain a CGI since the process is done by an embedded JavaScript within the HTML form. This sample shows how to convert string to uppercase by us
Problem: A Cobol program is running under ES/JCL with Connect to UDB through XA. It calls a C (.dll) which includes embedded SQL. How must the C module be compiled and linked ? Resolution: Linking an operational "C" module as a .dll can be achieved through the Net Express Build process. Just add the object code produced by the "C" compiler to the project, and create a package type .dll from the .obj. In order to enable embedded SQL you need to include db2api.lib into the .dll. Please ensure that the CBLLINK utility also creates a .lib library and is exporting the entry points .exp. Old KB# 4268
Problem: What do you do if you cannot do exact placement of objects on a graphical Dialog System screenset window? Resolution: If you add new objects to a graphical screenset window and they seem to have a snap-to-grid behavior where you cannot place them exactly, then select the Dialog System Edit menu, Alignment menu, and notice the values for X axis and Y axis under the Grid increments group. You may need to change these values to 1 if you want exact placement of objects on a window. Old KB# 4258
Problem: Release 4.0: Below is a snippet of code produced by the OpenESQL Assistant. Some lines of code are included beginning with 'MOVE..'....but seem to have have been inserted incorrectly and should not be there: EXEC SQL DECLARE CSR12 CURSOR FOR SELECT "A"."T$CONO" ,"A"."T$PTYP" ,"A"."T$YEAR" ,"A"."T$PRNO" &nbs
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: Client was running an executable that was creating a file. Each time it ran it should have created a new filename - but it kept creating the same filename. Resolution: At one time they had an environment variable for the file name in the project properties under the application button. The solution was to delete the rtecfg_....obj (most likely in working directory) and it take out of link properties in advanced "include objs" Then the EXE was rebuilt It's important that while testing environment variables that may change are only included in the IDE button and NOT the Application button. If they are included in the Application, the variable will be built into the executable. Old KB# 4242
Problem: Bei Anwendungen mit Ausgabe in eine zeichenorientierte Umgebung erscheinen die Umlaute im Allgemeinen falsch dargestellt. Das passiert typischerweise in Befehlszeilen oder in einer DOS box. Die Ursache liegt in der Verwendung des OEM Zeichensatzes im DOS Subsystem. Resolution: Zur Verbesserung der Darstellung kann Net Express in den ANSI Input Mode umgeschaltet werden. Das erreicht man in der Application Environment der Project Properties. Dann erscheinen z.B. die Umlaute eines DISPLAY richtig im Application Output. Läuft die Anwendung in einem Befehlsfenster, dann muss man die Umstellung in den Runtime Tunables vornehmen. Dazu braucht man eine Runtime Configuration File. Diese muss mit Hilfe einer Umgebungsvariablen definiert werden: SET COBCONFIG_=d:\\path\\rtsconfig.cfg Darin wird der Schalter für die Umlaute gesetzt: SET ANSI_INPUT_MODE=TRUE Old KB# 4245
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.