Data Build Manual

Discarding an Input Field
Customizing Data Build
6–10 099331 Tandem Computers Incorporated
The U-OUT-filename-fieldname exits are after the input field has been processed and the
results moved to the output field. This exit can change the results of the standard
code.
The U-USER-ROUTINES exit is a good place to include any PERFORMed user-code
routines, although such routines can be included in any user exit.
For each input file, a P-IN-filename-EXIT paragraph name exists after all record
processing and after the record is sent to the output file or table. A
GO TO P-IN-filename-EXIT statement coded in any field or record level user exit will
cause the current record to be omitted from the output file or table.
Discarding an Input
Field
It is easy to discard an input field from the output. All fields must be accounted for in
the Source Record Descriptions file so that the correct DDL input record is created.
Simply give a field the name “FILLER.” All filler fields are discarded.
Discarding Input Records The following example describes how to discard input records. In this example, the
following is assumed:
Input is EBCDIC data in a flat file, not from DB2 and not in IXF format.
Conversion is to NonStop SQL using the SQL-LOAD or SQL-INSERT option.
All input records are the same length and format.
Some input records are to be discarded (not loaded) based on the contents of a
character field in the input record.
The input field, used to determine if the record should be discarded, is not to be
included in the data inserted in or loaded to NonStop SQL.
In this example a character input field, which is always discarded, must also be
referenced by user code to determine if the record should be discarded; it cannot be
designated FILLER. Further, this field should be converted from EBCDIC to ASCII to
allow it to be easily checked.
Assume the input field to check is named FIELDA and input records are to be
discarded if FIELDA is not equal to “xxx”. You need to do the following:
1. Create the SQL table without FIELDA.
2. Include FIELDA in the Source Record Descriptions File.
3. Perform the BUILD DDL (F2) Step and check the spooler output.
4. Modify the DDL file to delete FIELDA from the output record.
5. Recompile the DDL outside of Data Build using the command below and check
the spooler output.
DDL /IN ZZDDLIN, OUT $S.#DDLMOD/
6. Perform the GENERATE (F3) Step and check the spooler output.