KEY Subcommand (POINT command)

KEY specifies the variable whose value will be used as the file key for determining where sequential retrieval by DATA LIST will begin or resume. This variable must be a string variable, and it must already exist as the result of a prior DATA LIST, KEYED DATA LIST, or transformation command.

  • KEY is required. Its only specification is a single variable. The variable can be a permanent variable or a scratch variable.
  • Although the keys on a file are inherently numbers, such as social security numbers, the STRING function can be used to convert the numeric variable to a string. See the topic String/numeric conversion functions for more information.

Example

FILE HANDLE DRIVERS/ file specifications.
POINT FILE=DRIVERS /KEY=#NXTCASE.
  • KEY indicates that the value of the existing scratch variable #FRSTAGE will be used as the key to reading each record.
  • Variable #FRSTAGE must be an existing string variable.