PL1TAX

 
holg@earthlink.net
 Overview  Outline overview of PL1TAX functions and capabilities.
 Tutorial  Tutorial walk through of the PL1TAX language.
 Tutorial  Tutorial walk through of the 2200 System.
 Tutorial  Tutorial walk through of the 2200 System Editor - @ED
 Examples  Sample programs demonstrating functions and capabilities of the PL1TAX.
 Documentation  The complete PL1TAX language documentation.
 Challenge  Take the PL1TAX challenge!

What is PL1TAX?

PL1TAX is a programming language used primarily to process flat files to produce cross-tabulations. PL1TAX can also be used to print, report, copy, extract, and/or reformat flat files. PL1TAX reads a single input file, and processes records subject to user commands. PL1TAX is structured in such a way that the user issues NO file OPENS, CLOSES, READS, READ NEXT, or AT END logic. Thus the user only specifies how to process each record.

What are the cross-tabulations that PL1TAX produces?

Cross-tabulations are tables produced by reading an input flat file and crossing the given values of a stub variable, and the given values of a spread variable. Cross-tabulations may consist of 1, 2, or 3 stub variables, and 0 or 1 spread variables, stub being the vertical, and spread being the horizontal axis of a cross-tabulation. A cross-tabulation structure:

 Spread_variable
 
 Stub_variable

 TOTAL

 value_1

 value_2

 ...

 
 TOTAL

 99999

999

999

 ...

 
 value_1

999

999

999

 ...

 value_2

999

999

999

 ...

 ...

 

How does a PL1TAX program produce the cross-tabulations?

The user uses an editor to create a PL1TAX source program. The source syntax consists of statements that define the input file, the variables location in the file, processes done on the variables, and a definition of the cross-tabulation table(s) contents, that is the stub and spread definitions.

A PL1TAX program fragment
...
old file personnel 80
...
sex//9
age//6-7
...
stub sex codes m,f
spread age groups 00-20,21-65,66-99
...
The corresponding output fragment
SEX                     AGE 

         TOTAL       00-20       21-65       66-99  

TOTAL     1000         102         550         348  

M          592          64         320         208  
F          408          38         230         140

 

How does PL1TAX work?

PL1TAX is really a pre-processor that takes source, written in the pseudo language PL1TAX, and produces a target source of pure PL/1 language. That target source is then compiled, linked and executed to produce the desired result.

@add pl1tax   (translates the following program into a proper PL/1 program)

... pl1tax source

@add pl1taxgo (compiles, links, and executes PL/1 program)