Sample programs | Link to retrieve |
---|---|
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 |