Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
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: 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 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: 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: Net Express 4.0 How to set the font size of a COBOL Text Window that has the System menu disabled: Scenario - a character-based program that is built with the graphical link option (cbllink -G), but has disabled the System menu, that allows you to set the font and size, by way of a call to the Win32 API SetWindowLong function. When this program is deployed to other machines, the user won't be able to select the System menu to set the font size. Resolution: The solution here is to enable the System menu by commenting out the call to SetWindowLong and then rebuild and run the program. Now, you should be able to select the System menu (in the upper left) of the COBOL Text Window, select the "Font Size..." menu, and select a font and size. Then select the "Settings..." menu and check on "Save font size on exit". Stop the program and run the Windows regedit.exe utility. The font settings will have been sa
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
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 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: 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: 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
Problem: This demo shows how to swap the focus from a Dialog System window to a COBOL text window. Resolution: INTRODUCTION ========== This demo shows how to swap the focus from a Dialog System window to the COBOL text window. This is important when you have an application which is made up from a mixture of GUI and character forms. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- TEST1.CBL Main program which calls Dialog System. SPROG1.CBL Example sub-program 1. SPROG2.CBL Example sub-program 2. TEST1.GS Dialog System screenset. Copy Files: ---------------- ------------------------------
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: 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: 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 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: 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: ----
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.