Previous Topic: Demonstration (5): Writing Variable-length RecordsNext Topic: Creating Variable Headings


Demonstration (6): Writing from the Database

Objective

This example creates a sequential data set, consisting of employee ID, employee name, and department name from data stored on the employee database.

Procedure

A conventional file is created from data that resides on the database by coding:

See the chapter Generating Reports From Database Files for information on coding the database parameters and options.

Complete Code

col. 2
▼
DATABASE DICTNAME=DOCUDICT
IN DB SS=EMPSS01,EMPSCHM,100
PATHAA DEPARTMENT EMPLOYEE
01OUT 80 D PS DD=SYS020
01SORT DEPT-NAME-0410  EMP-NAME-0415
01510001 EMP-ID-0415  FZ
01510005 EMP-NAME-0415
01510030 DEPT-NAME-0410