CASE Subcommand (RECORD TYPE command)
CASE
specifies
the column locations of the case identification variable when that
variable is not in the location defined by the CASE
subcommand on FILE TYPE
.
-
CASE
onRECORD TYPE
applies only to those records specified by thatRECORD TYPE
command. The identifier for record types withoutCASE
onRECORD TYPE
must be in the location specified byCASE
onFILE TYPE
. -
CASE
can be used for nested and grouped files only.CASE
cannot be used for mixed files. -
CASE
can be used onRECORD TYPE
only if aCASE
subcommand is specified onFILE TYPE
. - The format type of the case identification variable
must be the same on all records, and the same format must be assigned
on the
RECORD TYPE
andFILE TYPE
commands. For example, if the case identification variable is defined as a string onFILE TYPE
, it cannot be defined as a numeric variable onRECORD TYPE
.
Example
* Specifying case on the record type command for a grouped file.
FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5.
RECORD TYPE 1.
DATA LIST /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE 2.
DATA LIST /SALARY79 TO SALARY82 6-25
HOURLY81 HOURLY82 40-53 (2)
PROMO81 72 AGE 54-55 RAISE82 66-70.
RECORD TYPE 3 CASE=75-79.
DATA LIST /JOBCAT 6 NAME 25-48 (A).
END FILE TYPE.
-
CASE
onFILE TYPE
indicates that the case identification variable is located in columns 1–5. On the thirdRECORD TYPE
command, theCASE
subcommand overrides the identifier location for type 3 records. For type 3 records, the case identification variable is located in columns 75–79.