REJECT

Purpose

Creates a file of selected input variables from records not used to update a table.

Syntax

REJECT vlist {; {TO fname} {CSV | TAB | FS char | EPIHEADER | FREE |       FORMAT fstr } {NONAMES}  {EDITNOEDIT} {FIRST nrec} {ALL}

 @

Arguments and Subcommands

vlist

The variables to be written to the reject file. This list is required. If subcommands are given, this list must be terminated with a semicolon.

TO fname

Specifies the output file of rejected records. The default output file name is rejects. If fname is given as CON, the reject list will be written to the log file.

CSV

Write data to a comma-separated value text file. Unless the NONAME option is given, the first record will contain a delimited list of variable names and the data will be written with one record containing all of the data used for each table update This is the default format.  The default output file extension in this case is .csv

TAB

Write data to a tab-delimited text file.  Unless the NONAME option is given, the first record will contain a delimited list of variable names and the data will be written with one record containing all of the data used for each table update.  The default output file extension in this case is .tab

FS char

Write data to a text file in which fields are separated by the indicated character.   Unless the NONAME option is given, the first record will contain a delimited list of variable names and the data will be written with one record containing all of the data used for each table update.  The default output file extension in this case is .out

EPIHEADER             

Write a text file with header records containing commands to read the data into an EPICURE program. The default output file extension in this case is .out

 

FREE

Write data to a text file with fields separated by blanks and no variable name header.  The default output file extension in this case is .out

FORMAT fstr

Write the data using the specified FORTRAN-like format string. The default output file extension in this case is .out

EDIT

Indicates that records rejected by DELETE transformations in the input edits are to be included in the reject file. This is the default condition.

NOEDIT

Indicates that records rejected by DELETE transformations in the input edits are to be excluded in the reject file.

FIRST nrec

Only the first nrec records are to be written to the reject file. If nrec is 0 then no records will be written to the reject file, while if nrec is less than zero all rejected records will be written. The default is to write the first 100 rejected records.

ALL

Write all rejected records to the reject file. If the NOEDIT option has been specified, records rejected as a result of DELETE transformations will not be written to the reject file.

Remarks

Whenever a table is created, the input summary is written to the standard output unit and the log file includes information on the number of rejected records and provides some information on the reasons for these rejections. In particular, the standard summary notes how many records were rejected in user-defined edits, how many were rejected because they were out of range on at least one of the fixed category variables, and how many were rejected because they were out of range on one or more time scales or the entry date was after the exit date. Occasionally, it is useful to have more detailed information on the rejected records. The REJECT command can be used to obtain such information.

The list of variables to be written may include any variable read from the input file as well as variables created in user transformations (including time dependent transformations defined with the TTRAN command) or dynamic variables created by DATAB for time and calendar scales. The values written to the reject file will be the values of the variables at the time when it was rejected. Only those records which are not used to update any cell in the table are written to the reject file.

Although this command is most useful when creating tables, it can also be used to produce a reject file when the program is being used in transformation mode.

Examples

a)  To create a reject file containing the variables agex, yrin, mnin, dyin, yrout, mnout, and dyout. The file is to be written to the default reject file and will contain one record for each of the first 100 rejected records. Both records rejected in table creation and records rejected in user edits will be included in the reject file.  The output will be a CSV file called rejects.csv.

REJECT agex yrin mnin dyin yrout mnout dyout @

b)  To create a tab-delimtied reject file which includes the same variables used in the first example, but specify the filename as table.rjt, and limit records in the file to those rejected in table creation. All of these records will be written to the file.

REJECT agex yrin mnin dyin yrout mnout dyout; TAB

NOEDIT ALL TO table.rjt @