Company InformationOur COBOL SolutionsCOBOL Services and TrainingSupport for our CustomersAcucorp and COBOL EventsAcucorp's Partners


















Sample Programs

Here we have collected several sample programs that help to illustrate certain concepts integral to developing with ACUCOBOL-85 and ACUCOBOL-GT®. The files are catagorized into the sections below, and are in either text or .ZIP format.

In addition, please visit the recorded Webinars and demonstration section of our Web site. These recordings will provide you with more information on our tools, helping you become a more effective ACUCOBOL-GT® developer.

Filename Description Posted
Reporting.zip This sample program features an AcuBench® Version 7.2 project, containing four sample reports. It demonstrates how to use a Web browser control to display and print HTML reports. It also contains code examples for loading data into a grid and using images in a report table control. Nov. 2006
w$palette.zip This program shows how to use the W$PALETTE library routine to change the background color of a GUI Window. Nov. 2004
multi_select.zip This program demonstrates the use of an ActiveX List-box to allow selecting multiple items. Aug. 2004
AcuODBC_Demo.zip Using AcuODBC WITH VB.NET Jul. 2004
WIN-START-MAX.cbl The purpose of this program is to show how a main application window might be coded to detect the screen resolution and then size itself to fill the entire screen area. Mar. 2004
GetObjectDateTime.zip This program will programmatically run cblutil to get information about itself, redirect the information into a line sequential file, then take the date and time information and display it to the screen. Dec. 2003
GetPrinterResolution.cbl This program illustrates how to determine a printer's DPI using the WIN$PRINTER library routine. Dec. 2003
MSProgressBarControl.zip This sample program demonstrates the use of Microsoft's ProgressBar Control version 6.0 (SP4). Dec. 2003
Threadds.zip This program illustrates how COBOL can provide the user with the ability to switch application screens by clicking on Taskbar buttons. Nov. 2003
Decimal_Chk.zip This is an example of using an ActiveX control with a Cobol program to disallow a decimal point to be entered into an Integer Entry field. Oct. 2003
GetEnvironment
Variable.zip
This program demonstrates how to call the Windows API
function GetEnvironmentVariableA in kernel32.dll to retrieve the value of an environment variable.
Sept. 2003
key_status.zip This program demonstrates how to call the Windows API function GetKeyStatus in user32.dll to check the status of the Cap lock and Num lock keys. Sept. 2003
layoutmgr.zip This program demonstrates various Layout Manager flags Sept. 2003
Media_Player.zip This program demonstrates the use of the Media Player ActiveX Control in a COBOL program. Aug. 2003
scrollbar.zip This program demonstrates logic used by the scroll-bar control to navigate in a list-box Jul. 2003
smssrc.zip extend®6 has a message for you... Jul. 2003
GridTXT
Viewer.zip
This program demonstrates how to use a Paged GRID control to read and display the contents of a line sequential file, which can be used as a Viewer within a graphical application. Jul. 2003
WIN$PLAY
SOUND.zip
This program demonstrates the use of WIN$PLAYSOUND to play different sounds Jul. 2003
treeview_
expansion.zip
This archive contains 2 programs:
Only_one_open.cbl - This program demonstrates how to allow only one branch of the treeview to be expanded at a time. This particularly useful in applications where the branches are very large and expanding more than one branch at a time would force the user to scroll vertically to access the desired branch.
start_full_open.cbl - This program demonstrates how to force all the branches of the treeview to be expanded at the initial display of the screen. This may be useful to allow the user to quickly choose the desired item without having to expand the entire treeview or branch manually.
Jul. 2003
Grid_position.zip Demonstrates grid positioning properites Cursor-X, Cursor-Y, X and Y, how to insert and read hidden data, add or remove column/row heading, create a column/row that the user cannot change data in nor navigate to (category GUI Sample Programs) Feb. 2003
MSemail.zip Shows how to send an email using Microsoft Outlook. Oct. 2002
auto-min-win.zip Demonstrates COBOL caling the Windows API to minimize the application window. When all the records have been processed, the window is restored. Oct. 2002
flash-window.zip Demonstrates COBOL caling the Windows API to have the application window's title bar flash. Oct. 2002
speaking.zip Contains some sample code that may be used to generate the COBOL counterpart of the Windows API LPTSTR. Oct. 2002
pagedgrid.zip Demonstrates the use of a paged grid, as well as the use of the Windows registry to store information on the grid. Aug. 2001
email.exe Demonstrates how a COBOL program can send an email message using the Windows Mapi32.dll
July 2001
activexthin.zip Demonstrates how to access client desktop via ActiveX when running with Thin Client Apr. 2001
clipacu.zip Demonstrates how to call a DLL. In this case, the DLL copies and pastes information to the Windows clipboard. Apr. 2001
dragdrop.zip Demonstrates method for implementing drag and drop capability in an ACUCOBOL-GT GUI program. Apr. 2001
gridex.exe Demonstrates the grid control functionality, and is described in Acucorp News, the newsletter sent to Acucorp customers. Apr. 2001
word_ole.zip This program shows how to use ACUCOBOL-GT as an Automation Controller Apr. 2001
grid2.cbl Sample grid program which is useful for learning to program a grid control. Apr. 2001
grid-calendar.zip Demonstrates one use of the grid control to make a calendar of events. Apr. 2001
gridemo.zip Demonstrates the many features of the grid control. Apr. 2001
printfont.cbl
Demonstrates how to print lines using a different font per line. Program is a modified version of the sample program, showfont.cbl. Apr. 2001
scrollbar.zip Example of using the GUI Scroll Bar control. Also demonstrates animated bitmap, Progress Bar and "Twirl Box" controls. Apr. 2001
CobolMail.zip Demonstrates how to use Microsoft's Messaging Application Programming Interface (MAPI) in conjunction with your ACUCOBOL-GT program to create an e-mail facility within the COBOL application. view sample code Oct. 2000
Scrllprg.zip Contains the COBOL code that solves this sample problem: a screen is too big to be displayed all at once. You don't want to break it up into smaller screens; instead, you want the "Page Up" and "Page Down" keys to work so that your clients won't have to use a mouse to navigate around the screen. view sample code Apr. 2000
Filename Description Posted
ToolsTechniques-2006.zip This file contains a sample program from the 2006 Developers’ Conference presentation, Proven Tools and Techniques to Boost Performance. Aug. 2006
TipsTricks-2006.zip This file contains a sample program from the 2006 Developers’ Conference presentation, ACUCOBOL-GT® Tips and Tricks. Aug. 2006
TipsTricks-2005.zip This file contains sample programs and a handout and is intended as a supplement to the COBOL Tips and Tricks presentation at the 2005 Developers' Conference. Aug. 2005
C$XML.zip This sample program demonstrates how to use C$XML to parse documents in XML format. Mar. 2004
sendmail.cbl Contains the complete source code for the sample program that demonstrates how to send email from any Acucorp-supported platform, as discussed in "Email Anyone?" by Gisle Forseth (Acucorp News, 2004, Issue 1). Feb. 2004
ThinClientReport.zip Contains the complete source code for the sample program that demonstrates how to print graphical reports in thin client, as discussed in "The AcuBench® Report Composer: Printing Reports in a Thin Client Environment" by Bob Cavanagh (Acucorp News, 2004, Issue 1). Feb. 2004
610pseudopiping.zip This program demonstrates the use of Pseudo-piping in Windows, a new feature available in version 6.1.0. Dec. 2003
asqlsp.zip This program uses AcuSQL to connect to a MS SQL Database and execute an existing Store Procedure. Sept. 2003
AltEntry.zip This program demonstrates the use of alternate entry points May 2003
C$REDIRECT.zip This program demonstrates how C$REDIRECT routine is used Apr. 2003
GRID_DEMO.zip This program demonstrates how to enable highlighting of multiple records in a grid Apr. 2003
EditKeys.zip This example program demonstrates the activation of standard Windows Edit keys in an AcuCOBOL-GT program Mar. 2003
sortlist.zip Sortlist.zip shows one way to move an individual item in a list box up or down by shuffling through the adjacent (upper and lower) items Mar. 2003
CB-LBSample.zip how to load a simple combo-box and list-box from a file ordering the entries by any key field - how to capture the user's choice inside the combo-box or list-box to act upon programmatically (in this case, display in an entry-field) Mar. 2003
acusqldemo.zip Adds and retrieves sample data via AcuSQL Feb. 2003
MSemail.zip Shows how to send an email using Microsoft Outlook. Oct. 2002
get-pid.zip Shows how to translate a process ID into a user name under Linux. Oct. 2002
project.zip Contains a sample Acubench® project that demonstrates the techniques discussed in "Batch Processing Under Windows Made Easy" by Nigel Eaton (Acucorp News, 2002, Issue 2). May 2002
testio.cbl Contains the complete source code for the program described in "AcuServer™ Versus Shared Drive Performance" by Randy Zack (Acucorp News, 2002, Issue 2). May 2002
word_ole.zip This program shows how to use ACUCOBOL-GT as an Automation Controller Apr. 2001
unix_email.zip Demonstrates how to send email on a Unix server from an ACUCOBOL-GT program Apr. 2001
collate.zip Demonstrates WIN$PRINTER function used to check if printer supports collating Apr. 2001
activexthin.zip Demonstrates how to access client desktop via ActiveX when running with Thin Client Apr. 2001
helpid.zip Shows how to link ACUCOBOL-GT graphical controls to a Windows help system. Apr. 2001
loadkbd.cbl Demonstrates how to switch between keyboards under Windows. The keyboards must be installed in order for the program to work; this program uses Arabic and US English keyboards to illustrate the technique. Apr. 2001
sendrcv.cbl
Demonstrates how to code ACUCOBOL-GT threads, including sending and receiving thread messages. Apr. 2001
ascii.cbl

Displays all ascii characters (1 thru 255) in non-gui mode. Also demonstrates how to use the DISPLAY LINE verb. Apr. 2001
ansi2term.zip This sample preprocessor converts COBOL source code from ANSI format to terminal format, and can be used with the ACUCOBOL-GT compiler's (version 5.1 and later) general preprocessor interface feature. Apr. 2001
askey.cbl Takes as input a single character, then displays the ASCII numeric equivalent in decimal. Apr. 2001
base.cbl Program to convert data to and from various numeric bases such as Octal, Hex, etc. Apr. 2001
bigprog1.cbl This program attempts to create and open 256 indexed files. Useful test if you have a problem opening a large number of files. Apr. 2001
bintorms.com VAX VMS command file which aids in the conversion of ACUCOBOL-GT Vision files to VAX RMS. Apr. 2001
clock.cbl Displays a clock in a window. This program could be called in a thread to display the time. Apr. 2001
comb.cbl
Example of how to code a COMB sort. Apr. 2001
convert.zip Program and instructions which can be used to convert Vision files to other file systems supported by ACUCOBOL-GT. Apr. 2001
copyfile.cbl Example of how to copy a file from one location and/or name to another. Program is in form of callable generic subroutine. Apr. 2001
ctlkey.cbl Demonstrates exception key handling. Apr. 2001
dcomma.cbl Demonstrates the use of the DECIMAL IS COMMA phrase, as well as illustrates a few edited numeric displays. Apr. 2001
delfile.cbl Subroutine which deletes a file. Apr. 2001
err99cod.cbl Program to test whether or not default record locking is working as expected. Apr. 2001
evaluate.cbl Demonstrates the EVALUATE verb. Apr. 2001
exponent.cbl Example of how to use exponentiation. Apr. 2001
ftestio.cbl Sample file test program which uses I$IO routines. Apr. 2001
geterr.cbl Demonstrates method for retrieving the internal file error status independent of which file status codes being used. Apr. 2001
inpct2.cbl Demonstrates use of INSPECT CONVERTING. Apr. 2001
locktst.zip Two programs to test file and record locking. Apr. 2001
mkdir.cbl Generic subroutine to create a subdirectory. Apr. 2001
prtdec.cbl Example of how to send control sequences to a printer. Note that the exact sequences vary from one printer to another. Apr. 2001
renfile.cbl Subroutine which renames a file from one name to another. Apr. 2001
replac21.cbl Demonstrates use of search and replace using reference modification. Apr. 2001
sum.cbl Creates a file checksum. Apr. 2001
timer.cbl Subroutine useful for timing programs. Call first time to start timer; call second time to return number of seconds and, optionally hours, minutes, seconds and 100ths. Apr. 2001
trig.cbl Calculates various trigonometric functions. Apr. 2001
tolower.cbl Subroutine demonstrating how to use the C$TOUPPER and C$TOLOWER system routines. Apr. 2001
unstrng.cbl Demonstrates the UNSTRING verb. Apr. 2001
walter.zip Demonstrations of the ACUCOBOL-GT I$IO routines that can be used to read a Vision file without an FD or SELECT. Includes README.TXT. Apr. 2001
132_col.cbl Demonstrates how to switch a terminal into 132 column mode. Apr. 2001
bigtext.cbl Subroutine which takes as input a 21 x 77 character array and, without using the screen section, allows you to edit the text, including inserting information, changing data, using the up and down arrows, etc. Apr. 2001
control.cbl Demonstrates the use of the Special Names item, SCREEN CONTROL, to control the cursor inside of the screen section. Logic also valid for GUI screen sections. Apr. 2001
dscreen.cbl Demonstrates Screen Section, and Special Names item, SCREEN CONTROL. Although this program does not use graphical controls, the logic and concepts could be useful for a GUI program as well. Apr. 2001
doscroll.cbl Demonstrates one method for coding scrolling in a non-graphical, non screen section environment. Apr. 2001
frame.cbl Demonstrates how to display Microsoft Windows-type frames in a non-graphical environment. Apr. 2001
getcur.cbl Returns the current cursor row and column. Apr. 2001
query.cbl Accepts terminal input one character at a time and then displays the records which match the data put in so far. While a data file is not included with this program, the program can be used as a template for the concept. Apr. 2001
screen21.cbl Sample character Screen Section program. Useful for learning the Screen Section concepts. Apr. 2001
scroll.cbl Demonstrates one method to code scrolling and highlight a list of items in a character mode program. Apr. 2001
utbargph.cbl Program supplied by an Acucorp customer which draws a bar graph (histogram) from information sent to it in linkage section. Apr. 2001
wkeybuf.cbl Subroutine that demonstrates the basics of using W$KEYBUF to record or playback keystrokes. Apr. 2001
winsize.cbl Demonstrates technique for increasing the font size for character mode programs running under Windows. This increases the size of the window on systems running 600X800 or 768X1024. The font size can be placed in the config file. Apr. 2001
Search.zip Demonstrates how to search a directory for a specific file when you don't know the name of the file. This program appeared in "Do You Speak Windows" by Gisle Forseth (Acucorp News, 2000, Issue 2) - view sample code Apr. 2000

 

 

Contact | Site Map | | Legal | Trademarks | Privacy | Print this page
Acucorp, Inc., 9920 Pacific Heights Blvd., San Diego, CA 92121, +1 858.795.1900
© 1999-2008, Acucorp, Inc. All rights reserved.


Get the most recent Code Updates
Download an Evaluation of ACUCOBOL- GT
View recorded Webinars and demos
Download the latest version of Acucorp News
Find out about the latest Training Opportunities
Language