Technical data
8.6 STOOL Program Parts Breakdown Report—Sample Run
This is the report output by the STOOL program in Example 8–5.
Enter PARTID> (SAMP1
RET
+-----------------------------------+
| Parts Bill of Materials Explosion |
| (COBOL Version) |
| Part-id: SAMP1 |
+-----------------------------------+
SAMP1 - STOOL
SAMP3 - STOOL LEGS
SAMP2 - STOOL SEAT
Enter PARTID>
ctrl/z
End of Job
8.7 Creating New Record Relationships
The PERSONNEL-UPDATE program in Example 8–6 creates the records and
implements the relationships described in Section 5.9.2.3. It directly contains
two other programs: PROMOTION-UPDATE and PERSONNEL-REPORT.
PROMOTION-UPDATE is directly contained by PERSONNEL-UPDATE.
It changes the record relationships created by PERSONNEL-UPDATE.
PERSONNEL-REPORT is also directly contained by PERSONNEL-UPDATE.
It generates one report showing the record relationships just after creation
by PERSONNEL-UPDATE and another report showing the new record
relationships. PERSONNEL-REPORT is a Report Writer program. Section 8.7.1
and Section 8.7.2 each contain a report generated by the PERSONNEL-UPDATE
program.
Example 8–6 Creating New Record Relationships
IDENTIFICATION DIVISION.
PROGRAM-ID. PERSONNEL-UPDATE.
DATA DIVISION.
SUB-SCHEMA SECTION.
DB PARTSS1 WITHIN PARTS FOR "NEW.ROO".
LD KEEPSUPER.
LD KEEP-EMPLOYEE.
WORKING-STORAGE SECTION.
01 ANSWER PIC X.
(continued on next page)
8–22 Database Programming Examples