Browse all forums dedicated to the Rocket® COBOL product family.
Recently active
Problem: This program demonstrates how to use the Windows 32-bit API function EnumPrinters to obtain a list of available printers and their associated parameters. This demo works on Windows 95, 98 NT, 2000 and XP Resolution: INTRODUCTION ========== This program demonstrates how to use the Windows 32-bit API function EnumPrinters to obtain a list of available printers and their associated parameters. SOURCE FILES: ============= Program Files Description ------------------------- ----------------------------------------------------------- ENUMPRNT.CBL Main program for this demo EnumprintLocal.CBL Program that calls the WINAPI function EnumPrinters to list &nbs
Problem: This Demo reads in the binary data of a .jpg and then writes it to a database 8KB at a time. The .jpg is stored in the database as an Image field. It then reads this Image field 8KB at a time into a memory buffer and then writes it to a file on disk and then opens the file. Resolution: INTRODUCTION ========== This Demo reads in the binary data of a .jpg and then writes it to a database 8KB at a time. The .jpg is stored in the database as an Image field. It then reads this Image field 8KB at a time into a memory buffer and then writes it to a file on disk and then opens the file. SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------------------- BlobDemo.cbl Copy Files: -------------------- -------------------------
Problem: Following the steps in the Resolution below it should be possible to discover which Native Code Generator created a .GNT or .O file. This can be useful if you want to discover which release of Server Express was used. Resolution: Open the GNT/OBJ file with the command: what filename or strings filename | fgrep "@(#)" Seach the contents of the file for @(#) There should be a string which looks like: @(#)Hello 99051015180266 GNR-049060000AC Genesis PowerPC hilo 1.231> or @(#)hello 99051015393162 GNR-054060000AC tcg1di386 1.422> which means: hello - base name of the INT file from which this file was generated. 99051015393162 - date and time when it was generated. GNR-054060000AC - version of checker stamp which comes from the INT file. tcg1di386 - version of the generator used.
Problem: If a calling program calls a program without passing all parameters defined in Linkage section (of called program), then the runtime system may fail with runtime error 114. This will happen when the called program references any LINKAGE SECTION field that has not received a parameter. For example, the following is code in the calling program: CALL "SUBPROG" USING WS-AREA  
Problem: This example program demonstrates how to use the Windows SDK Printing and Spooling functions to print a document which contains embedded printer ESC sequence codes. These codes can control various formatting features of the printer. Resolution: INTRODUCTION ========== This example program demonstrates how to use the Windows SDK Printing and Spooling functions to print a document which contains embedded printer ESC sequence codes. These codes can control various formatting features of the printer. This example demonstrates how this can be accomplished by setting up the printer as a Raw device so as to bypass the print driver and write directly to the printer itself. Printer ESC codes differ between different manufacturers and models so this method is definately not portable. This program was written for an HP LaserJet 5L printer and uses the ESC codes supported by this model and other HP LaserJet printers. You can modify this program for your o
Problem: Deploying an application created with Net Express and running on Application Server for Net Express may sometimes result in a Dynamically Bound RTS Error. NOTE: View the Adobe Acrobat .PDF form of this document via the attachment link at the bottom of this document for the complete document, which includes graphic screen shots of the error message being referred to. Resolution: There are three possible situations that can cause this error to occur: " The first, and most likely, cause of this error is a difference between the Fix Pack levels between the Net Express and Application Server for Net Express packages. The correction for this situation is to insure that both are on similar Fix Pack levels. " The second cause for this error message could be that both products have the correct Fix Pack levels, but there's a problem with the environment settings. i.e.: the Path is set to point to an older or newer version of a CBL
Problem: How to find out the software version of the UNIX product? Resolution: To locate the software version of the cobol unix products installed cat $COBDIR/etc/cobver This will show the software version (see below example: v4.0 SP1) and build version (see below example: 40.03) of the product, as well as any latest fixpack installed (see below example: PTI=Fixpack40.03_10) and if the Enterprise Server Development component is installed (see below example: PTI=ES). For example: cobol v4.0.00-e PRN=RXCTZ/AAA:9h.N3.40.03 PTI=SP1 PTI=ES PTI=Fixpack40.03_10 If you have more than one version of any of the Micro Focus Unix products, then you'll need to know the exact location of where these products are installed to determine the version of these products. Old KB# 4087
Problem: The example program illustrates how to use the CBL_LOCATE_FILE call-by-name routine. Resolution: ============== INTRODUCTION ========== The example program illustrates how to use the CBL_LOCATE_FILE call-by-name routine. SOURCE FILES: ============= Program Files Description ---------------- ----------------------------------------------------------- CblMain.cbl Example program that uses CBL_LOCATE_FILE to locate Mfnetx.exe REQUIREMENTS: ========== This example was created and Animated using NetExpress 3.1, Service Pack 1. OPERATION: ======= Check and Animate the example. Examine the variables returned by the call to the routine. NOTES: ==== "status-code" provides an overall indication of the success or failure of the routine. "exist-flag" indicates whether the file was or was not found. "path-f
Problem: How do you create a MFDEBUG log file? Resolution: The MFDEBUG.LOG is really designed for MF use rather than Customers. It is a dump which shows the state of the machine when a COBOL program crashes. Development can decode this and sometimes use it to help pinpoint problems in the runtime. The log file is created automatically and is copied to the working directory. Old KB# 4020
Problem: This demo demonstrates how you can create a zip file or add to an existing zip file from a COBOL program. Resolution: INTRODUCTION ========== This demo demonstrate how you can create a zip file or add to an existing zip file from a Cobol program. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- zip.cbl Copy Files ---------------- ----------------------------------------------------------- minwin.cpy wintypes.cpy winbase.cpy REQUIREMENTS: ========== This demo uses the Big Speed Zip DLL shareware from BigSpeedSoft. OPERATION: ======== Simply rebuild the application and run or animate NOTE: ==== This demo was originally developped by one of our customers, Mr. Gary Holness. Thanks Gary. ========================================================== Keywords: demo
Problem: Release 4.0: This error appeared when trying to compile any program within Net Express, including the demos provided with Net Express. Resolution: The problem appeared a corruption. A simple deinstall and reinstall didn't work here. Nor cleaning the registry entries. Somehow something on the system completely corrupted the programs within Net Express. The only solution to this problem was to get the backup of the previous week and the corruption disappeared. Old KB# 4040#RMCOBOL#COBOL#ServerExpress#netexpress#AcuCobol
Problem: This example illustrates how to format and use long file names with call-by-name routines. Resolution: =========== INTRODUCTION ========== This example illustrates how to format and use long file names with call-by-name routines. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- Cbnrndlf.cbl Example program that uses call-by-name routines and long file names. OPERATION: ======== Rebuild the example program and then Animate the program. As you step through the program you will see that the text file in the project directory (LongFileName.txt) is copied and assigned the name "CopiedFile.txt". Next, the new file is renamed "RenamedFile.txt". Finally, the new file is deleted. NOTE: ==== The three constants that follow provide three long f
Problem: You may have problem applying Net Express 4.0 wrappack with all07n40.exe hanging during the installation of the IDE fixpack. If you are running source control software (eg 'Perforce' ), this could be causing the wrappack to hang. Resolution: It looks like it is the Source Code Control software on the machine could cause the problem. Go into the registry and look at HKEY_LOCAL_MACHINE\\SOFTWARE\\SourceCodeControlProvider and rename the key ProviderRegKey to something like ProviderRegKeyxxx, then it won't find it and try to make it available. If the NX 4.0 IDE FixPack then goes in ok you should be able to run Net Express. What Source Code Control software do you have installed? Also, you could try uninstalling and reinstalling the SCC software and see if it works. If it doesn't then renaming the key will at least mean they can coexist even if they can't communicate. Renaming the key in the registry should resolv
Problem: Sample that demonstrates how to add a version label to an EXE Resolution: INTRODUCTION ========== The project file VersionNo.APP is used to demonstrate how to add a version label to your executable, EXE or DLL. This is accomplish by using an RC file. To change to content of the RC file simply edit it as Text and modify it appropriatly to reflect your desired values To find out more about the parameters of the RC file please consult the WIN32 SDK documentation. SOURCE FILES ========= Program Files Description ------------------- ----------------------------------------------------------- VersionNo.APP VersionNo.CBL VersionNo.RC ========================================================== Keywords: demonstration, sample, example, demo, versionno.zip demo.ex demo.ne Attachments: versionno.zip Old KB# 4032
Problem: CBL_DEBUGBREAK does not work when COBOL is called from a .Net WebService. In this case the .Net Web Service is C# based and calls COBOL via a Platform Invoke. The COBOL is unmanaged and issues a CBL_DEBUGBREAK call. The debugger never appears. Resolution: At a Net Express Command Prompt you can issue "cblcored -i". This sets up some security setting so that the Service can communicate with the desktop so that the debugger will start. Old KB# 3998
Problem: This project demonstrates the use of an OLE Automation object that returns a variant. Resolution: INTRODUCTION ============ This project demonstrates the use of an OLE Automation object that returns a variant. You can use an object reference as a return type in this case to hold an instance of the OLEVARIANT class. Variant string types will get converted to a character array object so check for that type on the return data. SOURCE FILES: ========= Program Files Description ---------------------------- ---------
Problem: Demonstrates the use of the OpenDialog class from the COBOL GUI class library that shows a File Open Dialog Box and displays the file selected. Resolution: INTRODUCTION: ========== Demonstrates the use of the OpenDialog class from the COBOL GUI class library that shows a File Open Dialog Box and displays the file selected. SOURCE FILES: ========= Program Files Description ---------------------- ----------------------------------------------------------- FileOpenDemo.cbl COBOL source file. REQUIREMENTS: ========== Installation of the GUI class library source files option during NetExpress setup. OPERATION: ======== Run this program to display a File Open dialog box, select a file, and the file name and path will be displayed. Use of the class library requires you to link with the shared cobol runtime
Problem: This demo displays and changes the contents of an environment variable Resolution: INTRODUCTION ========== Displays and changes the contents of an environment variable. SOURCE FILES: ========= Program Files Description -------------------- ----------------------------------------------------------- EnvVar.app Application File EnvVar.cbl Source File OPERATION: ======== Open the application file. Rebuild and animate the project. The Application Output window displays the environment variables from the COBDIR then displays "Variables not found", & "Not there" ========================================================== Keywords: demons
Problem: This sample demonstrate how to control a character-based application screen size using two new tunables, Screen_Lines and Screen_Cols. Resolution: INTRODUCTION ========== This sample demonstrate how to control a character-based application screen size using two new tunables, Screen_Lines and Screen_Cols. SOURCE FILES: ========== Program Files Description ------------------- ----------------------------------------------------------- Screensize.cbl Source program simply performing Accept/Display statements Resource Files: ------------------- ----------------------------------------------------------- runtime.cfg Runtime tunables configuration file REQUIREMENTS: ========== The environment variable COBCONFIG_ needs to be set, pointing to the runtime tunable c
Problem: Extract of Net Express documentation: search on keyword rargument-number Accessing Data on the Command Line There are two main ways in which a program can access data on the command line: ACCEPT data-name FROM COMMAND-LINE. This causes the complete contents of the command line to be moved to data-name. Alternately, you can access individual arguments on the command line, using: DISPLAY ... UPON ARGUMENT-NUMBER ACCEPT ... FROM ARGUMENT-NUMBER Resolution: Code attached to KB: working-storage section. 01 Args-Work-Area. 03 args-num pic x(4) comp-x. 03 args-val&nbs
Problem: Returns all valid drives on a PC using the PC_FIND_DRIVES library routines Resolution: INTRODUCTION ========== Returns all valid drives on a PC. SOURCE FILES: ========= Program Files Description --------------------- ----------------------------------------------------------- PcFindDrives.app Application File DrivinF3.cbl Source File DrivinFo.cbl Source File OPERATION: ======== Open the application file and rebuild the project. Animate the program. The Application Output Window appears showing all available drives on your local machine. ========================================================== Keywords: demonstration, sample, example, demo,
Problem: A series of nested programs demonstrating the use of COBOL Intrinsic functions Resolution: BUILD W/RELEASE: Net Express v3.1 with fixpacks as of 05/2002 ============ INTRODUCTION ========== Series of nested programs demonstrating the use of Cobol Intrinsic functions SOURCE FILES: ========== Program Files Description ---------------- ----------------------------------------------------------- Intrfunc.cbl OPERATION: ======== Simply rebuild project and follow program's instructions NOTE: ==== For more information on the COBOL Intrinsic functions please refer to the COBOL Language Reference. ========================================================== Keywords: demonstration, sample, example, demo, intrfunc.zip demo.ex demo.me demo.ne demo.se Attachments: intrfunc.zip Old KB# 4010
Problem: "COBOL Rocks the World" optional workspace backdrops (wallpaper) for Net Express Resolution: BUILD W/RELEASE: Net Express v3.1 =========== Net Express v4.0 INTRODUCTION ========== These are additional workspace backdrop bitmap files which can be optionally used within the IDE. SOURCE FILES: ========== Program Files Description -------------------- ----------------------------------------------------------- cobolrocks.bmp "COBOL Rocks" workspace backdrop (largest in size) cobolrocks16.bmp "COBOL Rocks" workspace backdrop with 16 colors cobolrocks256.bmp
Problem: COBOL program calling Btrieve Resolution: =========== INTRODUCTION ========== This demo shows how to make calls to Btrieve by directly calling the _btrv module as you would make calls to the Btrieve API instead of using the xfh2btr call conversion module and COBOL file i-o syntax. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- btrvtest.cbl The demo program. Copy Files: ---------------- ----------------------------------------------------------- btconsts.cpy Btrieve operation codes. REQUIREMENTS: ========== This demo was tested using NetExpress 3.1, along with either Btrieve 6.15 or Pervasive SQL 7. OPERATION: ======= The program makes 3 calls to _btrv. A file is created, opened, and
Problem: CBL_GET_PROGRAM_INFO, Example #2: Trace back the Call/Perform Stack Resolution: INTRODUCTION ========== Simple demonstration of call by name routine cbl_get_program_info. SOURCE FILES: ========= Program Files Description ---------------- ----------------------------------------------------------- Main.cbl the trigger program that starts by call SubOne program. Subone.cbl Calls Subtwo program. Subtwo.cbl Calls Subthree program. Subthree.cbl Calls Subfour program. SubFour.cbl Calls Subfive program. Subfive.cbl Makes the call to cbl_Get_program_i
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.