Sample Programs | Click on links to retrieve |
New introduction | hello.html This is
a sample program displaying messages on the screen - it has a .html extension. hello.cbl This is the sample above with a .cbl extension. addda.html This is a sample program displaying messages and a calculation - it has a .html extension. addda.cbl This is the sample above with a .cbl extension. addda1.html This is a sample program with a compute - it has a .html extension. addda1.cbl This is the sample above with a .cbl extension. addda1a.html This is a sample program with a two step compute - it has a .html extension. addda1a.cbl This is the sample above with a .cbl extension. addda1b.html This is a sample program with a compute and parenthesis - it has a .html extension. addda1b.cbl This is the sample above with a .cbl extension. addda2.html This is a sample program with add and multiply - it has a .html extension. addda2.cbl This is the sample above with a .cbl extension. addda2a.html This is a sample program changes to WS - it has a .html extension. addda2a.cbl This is the sample above with a .cbl extension. addda3.html This is a sample program with editing and WS changes - it has a .html extension. addda3.cbl This is the sample above with a .cbl extension. addda4.html This is a sample program with decimals - it has a .html extension. addda4.cbl This is the sample above with a .cbl extension. addda5.html This is a sample program which allows negative answers - it has a .html extension. addda5.cbl This is the sample above with a .cbl extension. addda6.html This is a sample program which allows negative input - it has a .html extension. addda6.cbl This is the sample above with a .cbl extension. |
Looping, creating, and reading with screens |
adddalp.html This is
a sample program displaying and looping - it has a .html extension. adddalp.cbl This is the sample above with a .cbl extension. create1.html This is a sample program that loops and creates a file - it has a .html extension create1.cbl This is the sample above with a .cbl extension. read1.html This is a sample program that loops and reads the file created in create1.cbl read1.cbl This is the sample above with a .cbl extension. pay.dat File created by create1 and read by read1 |
Conditions and totals with screens |
readif1.html This is
a sample if program with no else and END-IF - it has a .html extension. readif1.cbl This is a sample if program with no else and END-IF - it has a .cbl extension. readif1a.html This is a sample if program with no else and a period - it has a .html extension. readif1a.cbl This is a sample if program with no else and a period - it has a .cbl extension. readif1b.html This is a sample if program with a separate procedure/paragraph - it has a .html extension. readif1b.cbl This is a sample if program with a separate procedure/paragraph - it has a .cbl extension. readif2.html This is a sample if program with a ELSE - it has a .html extension. readif2.cbl This is a sample if program with a ELSE - it has a .cbl extension. rdifand.html This is a sample if program with 2 conditions in an AND relationship - it has a .html extension. rdifand.cbl This is a sample if program with 2 conditions in an AND relationship - it has a .cbl extension. rdifand2.html This is a sample if program with 2 conditions in an AND relationship with ELSE - it has a .html extension. rdifand2.cbl This is a sample if program with 2 conditions in an AND relationship with ELSE - it has a .cbl extension. rdifand3.html This is a sample if program with 2 conditions in a compound AND relationship - it has a .html extension. rdifand3.cbl This is a sample if program with 2 conditions in a compound AND relationship - it has a .cbl extension. rdifor.html This is a sample if program with an OR relationship - it has a .html extension. rdifor.cbl This is a sample if program with an OR relationship - it has a .cbl extension. rdifor2.html This is another sample if program with an OR relationship - it has a .html extension. rdifor2.cbl This is another sample if program with an OR relationship - it has a .cbl extension. readtot.html This is a sample program with final totals readtot.cbl This is the sample above with a .cbl extension. pay.dat File created by create1 and used in these programs |
Full 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 |
Introduction SAMPLE1.CBL traditional report |
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 |
New programs with total lines - results written to the screen: readtot.html This is a sample program with final totals readtot.cbl This is the sample above with a .cbl extension. Regular programs with final total lines - results are reports: 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 fintot.html Sample program used as basis for ones below. fintot1.html Minor changes to a program with a total line. fintot2.html Different style for writing a total line. fintot3.html Final total program with calculation on detail line. fintot4.html Final total program with detail line set up in WORKING-STORAGE |
Programs with IF statements |
New programs using IF statements - written to screen: toysif1.html This is a sample program using a simple IF statement toysif1.cbl This is the sample above with a .cbl extension toysif2.html This is a sample program using IF statement and AND toysif2.cbl This is the sample above with a .cbl extension toysif3.html This is a sample program using IF statements and OR toysif3.cbl This is the sample above with a .cbl extension toysif4.html This is a sample program using a AND and calculations toysif4.cbl This is the sample above with a .cbl extension c12toys.dat The data file used in the programs above. Regular programs with IF statements - create reports: 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 |
Programs with level 88 and case structure | 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 If88scr1.html variation on the first program in this series using screen design concepts If88scr1.cbl .cbl version of the program above |
Screen processing - cont |
mathifsc.html Screen
program with .html extension mathifsc.cbl Screen program with .cbl extension mathif.dat Data for mathifsc.cbl |
Editing data |
scredit1.html Start, no editing scredit1.cbl Start with .cbl extension scredit2.html Screen edit scredit2.cbl Screen edit with .cbl extension 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 |
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 |
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 tablescr.html Screen and table program with .html extension tablescr.cbl Screen and table program with .cbl extension |