Previous Topic: What You Can DoNext Topic: Adding Programming Logic to a Report


Demonstration

Objective

Our next report uses multiple detail lines to produce an employee address list. The employee name, street number, city, state, and zip code appear on three separate lines.

Parameters

0151*010 LAST-NAME
0151*012 FIRST-NAME

1 specifies placement of the last name and first name on the first detail line.

0152*020 STREET

2 specifies placement of the street on the second detail line.

0153*020 CITY
0153*025 STATE
0153*030 ZIP-CODE

3 specifies placement of the city, state, and zip code on the third detail line.

Complete Code

col. 2
▼
IN 200 F 400 PS(TAPE)
REC FIRST-NAME      5   10
REC LAST-NAME      15   15
REC STREET         30   20
REC CITY           50   15
REC STATE          65    2
REC ZIP-CODE       67    5
01OUT 80
013 EMPLOYEE ADDRESS LIST
01SORT LAST-NAME
0151*010 LAST-NAME
0151*012 FIRST-NAME
0152*020 STREET
0153*020 CITY  SZ=10
0153*025 STATE
0153*030 ZIP-CODE

Result

REPORT NO. 01 EMPLOYEE ADDRESS LIST mm/dd/yy PAGE 1 ANGELO MICHAEL 507 CISTINE DR WELLESLEY MA 01568 BABBIT HERBIE 30 HERON AVE KINGSTON NJ 21341 BANK DONTE 45 EAST GROVE DR HANIBAL MA 02415 BLOOMER DUDY 14 ZITHER TERR LEXINGTON MA 01675 BREEZE ALBERT 100 BOARDWALK OCEAN CITY NJ 03461