IN Subcommand (KEYED DATA LIST command)
IN
creates a numeric
variable whose value indicates whether or not the specified record is found.
-
IN
is required. Its only specification is a single numeric variable. The variable can be a permanent variable or a scratch variable. - The value of the variable is 1 if the record is successfully
read or 0 if the record is not found. The
IN
variable can be used to select all cases that have been updated byKEYED DATA LIST
.
Example
FILE HANDLE EMPL/ file specifications.
KEYED DATA LIST FILE=EMPL KEY=#NXTCASE IN=#FOUND
/YRHIRED 1-2 SEX 3 JOBCLASS 4.
-
IN
creates the logical scratch variable #FOUND. The values of #FOUND will be 1 if the record indicated by the key value in #NXTCASE is found or 0 if the record does not exist.