IN Subcommand (UPDATE command)

IN creates a new variable in the resulting file that indicates whether a case came from the input file named on the preceding FILE subcommand. IN applies only to the file specified on the immediately preceding FILE subcommand.

  • IN has only one specification, the name of the flag variable.
  • The variable created by IN has the value 1 for every case that came from the associated input file and the value 0 if the case came from a different input file.
  • Variables created by IN are automatically attached to the end of the resulting file and cannot be dropped.

Example

UPDATE  FILE=WEEK10 /FILE=WEEK11 /IN=INWEEK11 /BY=EMPID.
  • IN creates the variable INWEEK11, which has the value 1 for all cases in the resulting file that came from the input file WEEK11 and the value 0 for those cases that were not in file WEEK11.