Create the $SkillTest. format. The $SKILL. format prints each employee's identification number and the skills test that they have been assigned. Employees must take either TEST A, TEST B, or TEST C, depending on their last name. The exclusion operator (<) excludes the last value in the range. Thus, the first range includes employees whose last name begins with any letter from A through D, and the second range includes employees whose last name begins with any letter from E through M. The tilde (~) in the last range is necessary to include an entire string that begins with the letter Z.


   value $skilltest  'a'-<'e','A'-<'E'='Test A'
                 'e'-<'m','E'-<'M'='Test B'
                 'm'-'z~','M'-'Z~'='Test C';
run;