Data Build Manual

Field Conversion
Customizing Data Build
6–2 099331 Tandem Computers Incorporated
A detailed example follows. Note that this example is for a conversion to Enscribe.
For a conversion to NonStop SQL, the changes are functionally the same. These
examples are based on the sample data provided with Data Build but with RECDEF03
not used and RECDEF02 changed to redefine RECDEF01. A listing of the Enscribe
Conversion Program for the sample data can be found in Appendix B. Although the
listing does not exactly match this example, it can be useful as a reference.
1. Describe each record format in a separate Source Record Descriptions file.
Here are source record descriptions for two formats in the same file:
01 DEMO01.
02 DEM1-STATE PIC X(2).
02 DEM1-ZIPCODE PIC X(6).
File 02 DEM1-PHONE PIC S9(10) COMP3.
RECDEF01 02 DEM1-NAME PIC X(25).
02 DEM1-ADDRESS PIC X(25).
02 DEM1-CITY PIC X(18).
02 DEM1-CODE PIC X(14).
01 DEMO01A.
02 DEM1A-STATE PIC X(2).
File 02 DEM1A-ZIPCODE PIC X(6).
RECDEF02 02 DEM1A-PHONE PIC S9(10) COMP-3.
02 DEM1A-COMMENTS PIC X(82).
2. Perform the CONFIGURE (F1), BUILD DDL (F2), GENERATE (F3), and CREATE
(F4) steps as usual. The generated conversion program will convert two input
files.
3. Use an editor to modify the generated conversion program ZZPROGM.
a. Comment out all select statements except for the main file.
SELECT F-IN-DEMO01
RESERVE 2 AREAS
ASSIGN TO "=DATAIN01".
SELECT F-OUT-DEMO01
RESERVE 2 AREAS
ASSIGN TO "=DATAOT01".
*SELECT F-IN-DEMO01A
* RESERVE 2 AREAS
* ASSIGN TO "=DATAIN02".
*SELECT F-OUT-DEMO01A
* RESERVE 2 AREAS
* ASSIGN TO "=DATAOT02".