Getting Started with TRANSACT (32247-90007)

18 Chapter1
Getting Started
Reporting From a Dataset
street-addr:
city-state:
zipcode;
A statement is terminated with a semicolon. Within the statement, item
names are separated by colons.
3 The OUTPUT verb sets up a data retrieval and reporting loop; the
(SERIAL) option specifies that the customer set be read serially and that
each item of each record be retrieved and reported.
The output from this program might look like the report below.
Figure 1-3. Report from a Single Dataset
Transact recognizes that our output is going to a terminal screen which can hold 24 lines,
each 80 characters long. Since the output is wider then 80 characters, the last column of
the report is on a second line.
If we had directed Transact to send our output to a 132 column printer, then all the data
would appear on a single line. After a full screen of the report is displayed on the terminal,
Transact pauses, waiting for us to tell it to continue. If we direct output to a printer, the
report is generated without any pauses between pages. Also, the report page length is
adjusted to the length of a page on the printer.
From the above example, we can see that Transact provides a simple format by default.
First, Transact reserves a column for each of the data elements in our report. It makes the
column either the width of the name of the data element or the actual element length,
whichever is longer. It adds one blank space between the columns. It makes up column
headings by using the names of the data elements.
Later on we will see examples of how we can control the format ourselves.
CUST-NO: NAME: STREET-ADDR: CITY-STATE: ZIPCODE:
1 Able-1 Answering 2775 Park Av San Jose, Ca 95111
2 Grand Depression 27 E Main Santa Clara, Ca 95122
3 Rummage Palace 410 N 10th South Bend, Ind. 49146
4 Victorian Antiques 476 S 1st San Francisco, Ca. 94123
5 Vinicator Corp 1092 Steward Drive San Jose, Ca 95144
7 Frank Leary Racing 590 Laurelwood Mountain View, Ca. 92123
8 Professor Muldoon's 123 Main Street Balloon City, Md 12465
9 Bayliner Boats 1548 Maple San Jose, Ca. 95144
20 Natkin & Co 807 Aldo Av Redwood City, Ca. 93144
CONTINUE(Y/N)> N