Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Created On: 19 June 2006 Problem: CBL_GET_PROGRAM_INFO, Example #1: The Main program calls the DLL by name and then uses the call-by-name routine to recover the entry point names in the DLL. The results are displayed on the screen. Resolution: INTRODUCTION ========== The Main program calls the DLL by name and then uses the call-by-name routine to recover the entry point names in the D. The results are displayed to the screen. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- main.cbl Main COBOL program. c2cbldll.cbl COBOL supprogram with many entry points. Copy Files ---------------- ----------------------------------------------------------- gtpgminf.cpy OPERATION: ======= Rebuild program. All of the necessary directives are located at the top of the program. Start animating the MAIN and then say run. The Animator application window will display the entry points contained in c2cbldll. In
Problem: This sample Dialog System application loads a PDF file in a Dialog System screenset and calls differents methods of the ACROBAT READER ActiveX control to action on this activeX Resolution: 1) For further details, please refer to Net Express documentation, mainly: Bookshelf Net Express 4.0 http://supportline.microfocus.com/documentation/books/nx40/nx40indx.htm Dialog System Guide http://supportline.microfocus.com/documentation/books/nx40/dspubb.htm .... Chapter 22: Tutorial - Adding an ActiveX Control ... 2) Fo
Problem: Calling Microsoft Word from Object COBOL Resolution: INTRODUCTION ========== Demonstrates how to invoke Microsoft Word from a COBOL program. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- ooword.cbl COBOL program that invokes MicroSoft WORD. REQUIREMENTS: ========== Microsoft Word. OPERATION: ======== Rebuild program. All of the necessary directives are located at the top of the program. Start animating and step through the program. Microsoft Word is invoked when you execute the statement 'invoke theWord "setVisible" using by value 1' and appears in the background. ========================================================== Keywords: demonstration, sample, example, demo, ooword.zip demo.ex demo.me demo.ne Attac
Problem: OLE demo that calls Microsoft Word and does a find/replace Resolution: INTRODUCTION ========== This demo shows how to write an OLE Automation client to Word 97 in a series of simple stages. DESCRIPTION ========= This demo shows: o How to start and stop Word 97 from COBOL o How to load a document into Word 97, edit and print it. o How to deal with exceptions and events generated by Word 97. There are five versions of the program provided, each showing how to do more with Word 97 from COBOL. SOURCE FILES ========= README.TXT WORD1.CBL WORD2.CBL WORD3.CBL WORD4.CBL WORD5.CBL WORDEVT.CBL WORD97.APP REQUIREMENTS ========== Microsoft Word 97 should be installed. OPERATION ======= The demo comes in the following stages: 1. WORD1.CBL - This first demo shows how to start and stop Word from COBOL. Word will not become visible, so you need to w
Problem: This example shows how to use X'91" function 69 to Scan a directory (Note that these routines have been superceded by a set of CBL_ routines.) Resolution: INTRODUCTION ========== Example of using X'91" function 69 to Scan a directory. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- Dirlist.app Application File Dirlist.cbl Source File Copy Files: ---------------- ----------------------------------------------------------- Shifty.cpy Copy File OPERATION: ======== Open the application file. Rebuild and animate the project. The A
Problem: This is an amended version of the Excel demo from Net Express. It shows how you insert page breaks into an Excel spreadsheet from a COBOL program using OLE Automation. Resolution: ========================================================== Keywords: demonstration, sample, example, demo, excelpage.zip demo.ex demo.me demo.ne Attachments: excelpage.zip Old KB# 4005
Problem: This program displays a list of Run-time error numbers and ERRORLEVEL values. The displays are re-directed to a text file by the OutDD Compiler directive. Resolution: INTRODUCTION ========== SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------------------- ErrLevel.cbl This program displays a list of Run-time error numbers and ERRORLEVEL values. The displays are re-directed to a text file by the OutDD &n
Problem: You may want to know the service pack level you have on Applicaiton Server for Net Express to determine what version of All WebSync WrapPack you want to apply on Net Express. Resolution: One way to determine the level of service pack on Application Server is to look for APSxxAnn.TXT where xx indicates the service pack level and nn indicates the version of Net Express. This text file contains the descriptions of the service pack, and it is copied over during the install of the service pack. If the file is not present, this would indicate there was no service pack applied with Application Server. To make sure this is the case, you can look for CBLRTSS.DLL, right-click on it, click on Properties, click on the Version tab, and see if there is "Special Build Description" in the Item Name list. This item name would specify the RTS WebSync version. If this item name is not listed, this then confirms no service pack was applied for Applcation Server.
Problem: Shows the use of CBL_ALLOC_MEM, CBL_GET_SHMEM_PTR, CBL_PUT_SHMEM_PTR, CBL_EXEC_RUN_UNIT and CBL_FREE_MEM Resolution: INTRODUCTION ========== The Multiple Run Unit (Mru) demo illustrates how you can start multiple, concurrent run units, each with a separate, window display. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- Ru0.cbl Main program that starts and stops the other run units. Ru1.cbl (Subordinate run units that function (once Ru2.cbl -(started) independent of one another and Ru3.cbl &
Problem: This example illustrates how to use two related call-by-name routines CBL_EXIT_PROC and CBL_GET_EXIT_INFO. Resolution: INTRODUCTION ========== This example illustrates how to use two related call-by-name routines CBL_EXIT_PROC and CBL_GET_EXIT_INFO. These routines permit the consolidation of error reporting within a single application procedure. This example also illustrates how to use the x'F5' call-by-number routine. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- Quitter.cbl Example program illustrating the use of CBL_EXIT_PROC and CBL_GET_EXIT_INFO. OPERATION: ======== The Qu
Problem: This demo, "BeforeAdvancing", creates a file using the "Before Advancing" clause that includes carriage return, line feed and form feed characters, (unlike a program using "after positioning".) The print program uses Byte-stream File Routines to read the report file, preserving the PC printer control characters, and providing control of the printer and font used to print the report. Resolution: INTRODUCTION ========== This example illustrates how to use a report file created by a Cobol program using "before advancing" syntax. SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- osvsba.cbl opcw32ba.cbl OPERATION: ======== The example consists of two programs. OSVSBA.CBL is the program that uses &quo
Problem: Net Express documentation regards to File Handler Configuration ---> File Handling: http://supportline.microfocus.com/documentation/books/nx40/fhpubb.htm ... Chapter 6: File Handler Configuration FH option BASENAME: BASENAME=OFF is the default setting BASENAME The BASENAME option determines whether filenames specified in tags can be expressed without pathnames. By default, such filenames have to be expressed with full path information as passed to the File Handler by the calling program. By setting BASENAME=ON, it is possible to specify the filename without the path. Syntax: BASENAME={ON|OFF} Parameters: ON Filename tags can be expressed without path information. OFF All filename tags in the configurati
Problem: In an existing application the "Blink" attribute is used fairly often. Now, having recompiled for use in Windows (with NetExpress), the blink attribute does not work. I have checked through the online manuals and the old Micro Focus manuals and the only references I have seen are to do with Accept and Display, however there is a mention of creating a .ini file with the entry COBBLINK=ON. I have tried this and there is no change. Is there any other way that I will be able to get this to work. This has been tested on Win 98 and Win 2000 Resolution: The BLINK attribute, used in ACCEPT and DISPLAY statements does not work as you would expect on Win32. Nor, indeed, does it work on Windows 3.x or OS/2. On a windowed operating system, blinking the attributes would be very expensive in terms of processor usage so instead the systems provide the ability to apply intensity to the background colours. The
Problem: This example illustrates how character mode screen data can be scrolled using call-by-number routine X"A7", functions 4 and 5. Resolution: INTRODUCTION ========== This example illustrates how character mode screen data can be scrolled using call-by-number routine X"A7", functions 4 and 5. It also illustrates how to use the FileType Compiler directive to create and traverse a truly temporary file (FileType"14"). Neither of these facilities are currently documented in NetExpress documentation. In addition "mode is block" is used to display a record definition that contains "filler" or "unnamed" item definitions. And the User Attribute is used to control the screen colors when the program is executed. SOURCE FILES: ========= Program Files Description ------------------- ----------------------------------------
Problem: This example program demonstrates the use of Exception Handling when working within an OLE environment. Resolution: INTRODUCTION ========== This example program demonstrates the use of Exception Handling when working within an OLE environment. This program contains two entry points. The first entry point is the default Procedure Division for TestException. This is where execution begins. The second entry point is named "MyHandler" and it contains the Exception Handling code which will be called whenever an OLE Exception occurs during the processing of TestException. Two parameters are automatically passed to "MyHandler" by the OLE Exception Handler within the Net Express run-time system. The parameters are defined in the Linkage Section and they are defined as: 01 lnkExceptionObject object reference. &n
Problem: This project illustrates how to use Byte-stream File Routines to access and traverse an indexed file and summarize the records in the file by record code. Routines used: CBL_OPEN_FILE, CBL_CLOSE_FILE, CBL_READ_FILE, CBL_START_FILE Resolution: INTRODUCTION ========== This project illustrates how to use Byte-stream File Routines to access and traverse an indexed file and summarize the records in the file by record code. SOURCE FILES: ============= Program Files Description -------------------- ----------------------------------------------------------- XCreateFIDX.cbl This program creates an indexed file (FLIndex.dat/.idx) containing thirteen &n
Problem: Using display statements to track a COBOL program's activity has been pretty routine for as long as there have been programmers using the COBOL programming language. This example illustrates how you can use display statements in a COBOL DLL program. Resolution: BUILD WITH RELEASE: NetExpress 3.1 SP1, 4.0 all04n40.exe ============== Two Net Express project files, DLLDisplays.APP and DLLDisplays.OLD, are present in the project directory. The DLLDisplays.APP file is a Net Express 4.0 project file. The DLLDisplays.OLD file is a Net Express 3.1, SP1 project file. If you are working with Net Express 3.1 rename the 4.0 project file (DLLDisplays.V40) and change the file extension of the 3.1 project file from "OLD" to "APP". INTRODUCTION ========== Using display statements to track a COBOL programs activity has been pretty routine for as long as there have been programmers using the COBOL programming langu
Created On: 19 June 2006 Problem: This demo returns information about the operating system environment via the library call CBL_GET_OS_INFO. This demo also demonstrate the usage of the Library Routine Type definitions and Call Prototypes. Net Express contains two copyfiles; one contains data items used by the library routines specified as type definitions, or TYPEDEFs, while the other contains call prototypes for the library routines. These can be used in your COBOL programs to enable the Compiler to validate all calls to these routines. Resolution: INTRODUCTION Returns information about the operating system environment via the library call CBL_GET_OS_INFO. This demo also demonstrate the usage of the Library Routine Type Definitions and Call Prototypes. Net Express contains two copyfiles; one contains data items used by the library routines specified as type definitions, or TYPEDEFs, while the oth
Problem: Release 4.0: Compiling source code and receiving the error: COBCH0187S Program is nested in a program defined with the "RECURSIVE" attribute : C:\\WORK\\Cobol\\z0axd026.cob(3284,21) What does this mean? I have not used the RECURSIVE attribute. Resolution: Basically you have to recode the source: First, check the compiler directives you use to compile this program: a FLAG"COBOL370" directive was set to compile the source using a COBOL370 environment instead, and compiling was being stopped when a very last END PROGRAM statement was reached. Second, check the program structure, here found as follows: identification division. program-id. progA. identification division. program-id. progB. end program progB. identification division. program-id. progC. end program progC. end program progA. <-- COBCH0187S In an 370 environment it is not allowed to nest program sources, s. end program progA. This wil
Problem: How to delete event handler code in a COBOL win/web form. Resolution: If you accidently create an event handler and then want to delete the event handler code you have to do so in design view not in code view because some event handler code is also in the design. To delete event handler code in design view: 1) Switch to design view 2) Click on the control for which you want to delete the event handler 3) In the properties window cick on the event handler icon (looks like a lightening bolt) 4) Find the event handler that you want to delete in the list and just delete its name so that the name is blank Old KB# 3919
Problem: Release 4.0: How to implement this? Resolution: To Publish to Unix from Net Express you need to run SCP as a daemon on the Unix machine. To run SCP as a Daemon, take a look at the following: Net Express Help -> Content -> Using Net Express -> Unix Option -> Unix Option Guide -> Installing Samba and SCP -> Alternative Security Mechanism -> SCP Daemon method Old KB# 3979
Problem: How can you Delete a file in .Net using a .Net class ? Resolution: You can use the System.IO.File class to do this using code such as:- class cFile as "System.IO.File" .... invoke cFile::"Delete"("c:\\myfile.dat") Old KB# 3935
Problem: For example - I have currently Net Express 3.1 and am planning to install 4.0 on the same machine. Will I still get support for 3.1 or just 4.0? Resolution: You can install the new version of Net Express 4.0 on the same machine where you have installed the old version and they will share the same license. However, you will no longer get support for the old version after 90 days after you have upgraded your license to the new version. Please discuss this matter with your sales rep for further details and conditions! Note: Micro Focus no longer provides any fixes for old versions of Net Express regardless of whether you have maintenance contract or not. Old KB# 3941
Problem: DataGridView : How can I pick up the double-click line event in a datagridview in the .Net Framework V2? Resolution: You can detact the hit on a cell by trapping the "CellClickEvent". This event passes in an Event object that contains the "RowIndex". This can then to used to process the whole row using code such as:- set gridRow to dataGridView1::"Rows"::"Item"(e::"RowIndex") set selectedrow to class-string::"Concat"("Selected : ",gridrow::"Cells"::"Item"(0)::"Value"," - ",gridrow::"Cells"::"Item"(1)::"Value", " - ",gridrow::"Cells"::"Item"(2)::"Value") invoke cMessageB
Problem: For example - you might want to set up your own batch file to compile - and then to be able to simply click on the bat file Resolution: Have your bat file call setenv.bat located in the netexpress\\base\\bin directory Old KB# 3964
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.