Sample Programs for CIS51 - AdvancedCOBOL

Sample Programs Click on links to retrieve
Direct subscript - 1 & 2 dimension tables TWODIM (html)
TWODIM (cbl)
Data for TWODIM - twodim.dat
Using screens SCR1FROM (html)
SCR1FROM (cbl)
Data for SCR1FROM - scr1.dat
TABLESCR (html)
TABLESCR (cbl)
Indirect subscript - searching a table TABLSOUP (html)
TABLSOUP (cbl)
Data for TABLSOUP - stutran.dat
TABLNIND (html) No indicator
TABLNIND (cbl) No indicator
TABLEMBD (html) Embedded perform
TABLEMBD (cbl) Embedded perform
TABLEEX1 (html) Early exit #1
TABLEEX1 (cbl) Early exit #1
TABLEEX2 (html) Early exit #2
TABLEEX2 (cbl) Early exit #2
LINSRCHX (html) Linear search
LINSRCHX (cbl) Linear search
Fill an empty table and search it Inventory programs with data - examples below
INVFILL (html)
INVFILL (cbl)
INVFILLA (html)
INVFILLA (cbl)
INVFILLB (html)
INVFILLB (cbl)
Data for inventory programs above
TBLSOUP1 (html)
TBLSOUP1 (cbl)
Data for TBLSOUP1 - emptsoup.dat
TBLSOUP2 (html)
TBLSOUP2 (cbl)
TBLSOUP3 (html)
TBLSOUP3 (cbl)
Another data file for TBLSOUP3 - souponly.dat
Binary search BINARY
Using the search verb SEARCHVB (html) - Linear use of search verb
SEARCHVB (cbl) - Linear use of search verb
SEARCHAL (html) - Binary use of search verb - Search All
SEARCHAL (cbl) - Binary use of search verb - Search All
General create program GENCREAT.CBL - General program to use creating a data file - needs to be modified to the file specifications
Editing data MOD11CHK - Coding mod 11 check digits
PAYEDIT - Sample edit program
EDITCHK - Another sample edit program
EDITINTR - And yet another with minor modifications
EDITBTH1 - Batch editing
EDITBTH2 - A second batch editing example
Sorting files SORTVB1 - Basic sort verb
SORTVB2 - Sort verb with input procedure
SORTVB2A - Sort after processing
SORTVB3 - Sort verb with output procedure
Sequential updating MYUPDATE - Sample sequential update program
VSAM Programs CRMSVSAM - Create a VSAM file
SEQREAD - Sequentially read an indexed file
SEQSTART - Sequentially read from a START point
START - Sequentially read from multiple START points
RANKEYRD - Randomly read from a VSAM file
RANKNIRD - Another random read from a VSAM file
CALTVSAM - Create VSAM with alternate key
SEQALTRD - Sequentially read on alternate key path
RANALTRD - Random read using primary and alternate keys
DYNSTART - Reading VSAM file when access is dynamic
MYRANUPD - Random update using disk files
FILESTA - File status with invalid key
FILESTAT - File status only
Some data files MSTRVSAM.DAT     MSTRVSAM.IDX
TRANSN.DAT
COPY and CALL COPYPRG - Program containin COPY statements
CRSDESC - Data division code being copied
ADDROUT - Procedure division code being copied
COPYCALL - Program containing CALL statement
CALLED - Code being called

Sample Programs (extra) Click on links to retrieve
COBOL language elements stringg.cbl Sample program using string and unstring verbs
colonprg.cbl Sample using colon to move characters
Misc. Program with Perform variations - Contains Perform varying from by until and in line perform
Relative files crerela2.cbl
crerela3.cbl
crerela4.cbl
retrvrel.cbl
Screen processing scrntest.cbl Sections within a screen
scrntest.html Sections within a screen
scroccur.cbl Screen with occurs
scroccur.html Screen with occurs
scrmenu.cbl Multi screens with things to consider
scrmenu.html Multi screens with things to consider
scrmenu2.cbl Multi screen with major edited
scrmenu2.html Multi screen with major edited
vsamproj.dat Data for scrmenu.cbl
vsamproj.idx Data for scrmenu.cbl
tablscrx.cbl Full screen using features like color etc.
tablscrx.html Full screen using features like color etc.
scrtest.cbl Not full screen using features like color etc.
scrtest.html Not full screen using features like color etc.
scrtest1.cbl Not full screen using features like color etc. - added 2 edit checks on data
scrtest1.html Not full screen using features like color etc. - added 2 edit checks on data
scrupdt.cbl Screen update with multiple screens
scrupdt.html Screen update with multiple screens
vsamscrf.dat Data file for screen update
vsamscrf.idx Index file for screen update
scrline.cbl Experiments with screens
scrline.html Experiments with screens
scrlinex.cbl Experiments with screens
scrlinex.html Experiments with screens
scrliney.cbl Experiments with screens
scrliney.html Experiments with screens
Variable length records vary1.cbl
vary1.html
vary1.dat
vary2.cbl
vary2.html
vary2.dat
vary3.cbl
vary3.html
vary3.dat
Working with dates convdate.html
convdate.cbl
dayofwk.html
dayofwk.cbl
conv2000.html
conv2000.cbl
Object Oriented Programs pay01cl.cbl
pay01dr.cbl
pay01xdr.cbl
pay02cl.cbl
pay02dr.cbl
pay02ui.cbl
pay02ycl.cbl
pay02ydr.cbl
pay02yui.cbl
pay03cl.cbl
pay03dbi.cbl
pay03dr.cbl
pay03ui.cbl
pay04cl.cbl
pay04dbi.cbl
pay04dr.cbl
pay04ui.cbl
pay4data.dat
pay4data.idx
tax01cl.cbl
tax01dbi.cbl
tax01dr.cbl
tax01ui.cbl

Send e-mail to Mrs. Grocer: pgrocer@bristol.mass.edu

Back to the Top
Return to home page
Return to previous page