Introduction to Programming (COBOL) CIS12
Sample Programs


Sample programs Link to retrieve
Introduction
SAMPLE1.CBL
xsample1.html This is the program to view and download following the download instructions.
sample1.cbl This is the program in .cbl format
c12first.dat This is the data file for sample1 and sample2.
Headers
SAMPLE2.CBL
TOYS1.CBL
xsample2.html This is the program with headers to view and download following the download instructions. Use data file used in sample1.
sample2.cbl This is the program in .cbl format.
Numeric (headers with numeric also included) xtoys1.html This is another example of a program with headers. The data file to use is called c12toys.dat
toys1.cbl This is the program in .cbl format
c12toys.datThis is the data file for the toys programs
toysmath.cbl This includes some math statements
toysmath.html The HTML version of the program with math statements.
Programs with final total lines xtoys2.html This is an example of a program with a total line.
toys2.cbl This is the program in .cbl format
xtoys3.html This is another example of a program with a total line.
toys3.cbl This is the other program in .cbl format
gro1ftio.html This program can be run - it includes the input and output as comments.
gro1fint.cbl This is the final total program above but in .cbl format.
inven.dat This is the data file used by gro1ftio.html and gro1fint.cbl
Programs with IF statements, level 88 and case structure xmathif.html This is an example of a program with if statements and calculations
mathif.cbl This is an example of a program with if statements and calculations - in .cbl format
mathif.dat This is the data file to use with the program mathif.cbl or xmathif.html
The following is a series of programs with IF and level 88. There are minor differences in the first four programs - the last three use evaluate:
    First of if88 group (.cbl)
    First of if88 group (.html)
    Second of if88 group (.cbl)
    Second of if88 group (.html)
    Third of if88 group (.cbl)
    Third of if88 group (.html)
    Fourth of if88 group (.cbl)
    Fourth of if88 group (.html)
    Fifth of if88 group - uses evaluate (.cbl)
    Fifth of if88 group - uses evaluate (.html)
    Sixth of if88 group - uses evaluate (.cbl)
    Sixth of if88 group - uses evaluate (.html)
    Seventh of if88 group - uses evaluate (.cbl)
    Seventh of if88 group - uses evaluate (.html)
    Data file for in88 programs
Editing data payedit.cbl Edit program with a .cbl extension
payedit.html Edit program with .html extension - includes sample input and output
Data file for the payedit.cbl program
payedit1.cbl Edit program with a .cbl extension - edit routine broken down
payedit1.html Edit program with .html extension - includes sample input and output - edit routine broken down
Tables/arrays tabldept.html Program with a table - .html extension
tabldept.cbl Program with a table - .cbl extension
depttabl.dat Data file to go with tabldept.cbl
tabldpt1.html Program with one dimensional table containing three items per occur
tabldpt1.cbl COBOL version of program with three items per occurs
twodim.html Program using two dimension table - .html extension
twodim.cbl Program using two dimension table - .cbl extension
twodim.dat Data file for two dimension table program
Screen processing scr1afrm.html Displaying data on a screen with .html extension
scr1afrm.cbl Displaying data on a screen with .cbl extension
scr1from.html Another example of displaying data on a screen with .html extension
scr1from.cbl Another example of displaying data on a screen with .cbl extension
scr1.dat Data for to screen programs display data from a file (above)
scr1to.html Entering data on a screen with .html extension
scr1to.cbl Entering data on a screen with .cbl extension
scr2to.html Entering data by fields/groups on a screen with .html extension
scr2to.cbl Entering data by fields/groups on a screen with .cbl extension
scr1use.html Updating records on a file through screen input - .html extension
scr1use.cbl Updating records on a file through screen input - .cbl extension
scr2.dat Data for scr1use.cbl
tablescr.html Screen and table program with .html extension
tablescr.cbl Screen and table program with .cbl extension
Break processing minor.html Minor total program with data and output - .html extension
minor.cbl Minor program - . cbl extension
major.dat Data file for minor total program and major total program.
major.html Minor, intermediate and major total program with data and output - .html extension
major.cbl Minor, intermediate and major total program with data and output - .cbl extension
majorgp.html Group print with .html extension
majorgp.cbl Group print with .cbl extension
majorgr.html Group indicate with .html extension
majorgr.cbl Group indicate with .cbl extension


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

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