Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This demo shows how to make a Dialog System entry field blink by alternating the background color of the field. Resolution: INTRODUCTION ========== This demo shows how to make a Dialog System entry field blink by alternating the background color of the field. It uses the Dialog System TIMEOUT function to intermittently execute a procedure in the window dialog that alternates the background color (using the SET-COLOR function) of the entry field between yellow and the default color. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- dsblink.app Net Express project dsblink.cbl Main COBOL source code dsblink.cpb Dialog System datablock copyfile dsblink.g
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 you can use a HTML Link (A HREF) to call a COBOL CGI passing parameters Resolution: ========================================================== Keywords: demonstration, sample, example, demo, web programming, links.zip demo.ex demo.ne demo.se Attachments: links.zip Old KB# 4205
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: 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: In the Net EXpress IDE you may have accidently made the toolbar disappear - how can you make it reappear? Resolution: Select View > Dockable Windows and then check the toolbar option. It will reappear as 'floating' - but then you can dock it if required. Old KB# 4211
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: Version 4.0 If you have installed the Net Express 4.0 All Websync WrapPack 4.0.007 (all07n40.exe) and try to view an EBCDIC data file in the Data File Editor, you may not be able to switch from ANSI to EBCDIC to view EBCDIC data. This will occur if you have the "Find Text" toolbar open. This toolbar is visible if you choose the "Search" and "Find Text" menus when a source file is open in the editor. Resolution: Changes to the Text Find and Replace have caused the problem in all07n40. The workaround is to right-click on the Text Find toolbar and choose Hide from the popup menu before you open an EBCDIC file in the Data File Editor. The problem should be fixed in all fixpack releases and versions of Net Express after this fixpack. Old KB# 4257
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 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: 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: 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 example illustrates how to turn controls on tab pages off (disable-object). You cannot disable a tab page. You can, however, disable the controls on a tab page. Resolution: INTRODUCTION ========== This example illustrates how to turn controls on tab pages off (disable-object). You cannot disable a tab page. You can, however, disable the controls on a tab page. SOURCE FILES: ========== Program Files Description -------------------- ----------------------------------------------------------- NewSet.cbl Generated Dialog System program with additional initialization of a data block &n
Problem: Release 4.0: MFSORT - A file with ORG LS F 420 is read in and data is sorted with output in more than one file but the data in all the output files is truncated by the last 20 Bytes (all spaces) for each line. I don't want to truncate any trailing spaces. Resolution: 1) To prevent trailing spaces truncated at the end of each line you should add a configuration file extfh.cfg related to the Micro Focus File Handler. This extfh.cfg file is a text file edited by e.g. Windows Notepad ending with Enter (x'0d0a') for each line. In that case you write down this as follows: [XFH-DEFAULT] STRIPSPACE=OFF This configuration option STRIPSPACE=OFF (default: ON) ensures that for all line-sequential files you have addressed in MFSORT trailing spaces are present for each line. If you want to address a file (MYFILE.DAT) only you have to point this .cfg file as follows: [XFH-DEFAULT] [MYFILE.DAT] STRIPSPACE=OFF 2) Changing to the Net Express com
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: 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: This demo shows how to do an "ITEM-UNSELECTED" in a Dialog System list box Resolution: How to do an "ITEM-UNSELECTED" for DS list box? Here's also a simple project to illustrate this alternative. Note that the Cobol program doesn't actually do anything than to load the screenset and stop only when the user clicks on the 'X' button. There are 2 events that relate specifically to List Box: 1. ITEM-SELECTED, invoked upon a mouse click on list box item 2. ITEM-ACCEPTED, invoked upon a mouse double click on list box item (or enter key pressed) The ITEM-SELECTED event can be defined to take actions when the user clicked on a list box item. This will also result to have that item highlighted or selected. If the user clicked on the same item which is already selected, it doesn't do anything. The item remains selected, and there is no event to be invoked. That is, the ITEM-SELECTED event doesn't
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: 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: 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: A customer in Brazil had a Character Dialog screen set with a field that converted automatically to upper case. However the characters 'áéíóú' were converted to 'áéí??' (the last two characters are box-drawing ones that do not display correctly with this software). Why did this happen? Resolution: The Windows API used by the runtime system in CBL_TOUPPER uses the Windows (ANSI) character set rather than OEM by default. In order to get the required conversion the customer needs to call PC_WIN_SET_CHARSET to get an OEM conversion. Details of this API are in the Net Express documentation. Old KB# 4227
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: Applications using the standard DOS character user interface use the DOS subsystem to display output text and data. In DOS the OEM character set is usually in place. Consequently some country specific chars will not be displayed correctly, especially the German Umlaute äöü. Resolution: You need to turn on the ANSI Input Mode. This can be achieved in the Application Environment of the Project Properties. The results of DISPLAY will then appear correctly in the Application Output Window of Net Express. If the application is to bel be executed in a runtime only environment, the appropriate Runtime Tunable can be set. The option ANSI_INPUT_MODE must be set to TRUE. The Tunables are defined in a Runtime Configuration File. An environment variable must be created to specify the configuration: SET COBCONFIG_=d:\\path\\rtsconfig.cfg This method must be used in a Command Prompt before executing a RUNW. Old KB# 4
Problem: How do I resolve an error compiling my SQL application? How do I resolve an error compiling my DB2 application? How do I resolve an error compiling my XDB application? Compiling with Cobsql returns CSQL-F-016: Unix error Compiling with Cobsql returns CSQL-F-015: Dos error Compiling with Cobsql returns CSQL-F-014: Windows error Note that this article applies to both Net Express and Server Express. Resolution: Note that this article applies to both Net Express and Server Express. If using either Cobsql or compiling with the DB2 directive -- i.e. to use the DB2 ECM -- and your application doesn't compile, in order to isolate whether the problem lies with either Micro Focus software or the RDBMS precompiler, we suggest that you precompile the application using the Database vendors' command-line precompiler, i.e. * IBM DB2 : db2 prep ... * Oracle : procob ... * Infor
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.