Final answer:
Option b is true: A change in LAST.Gender sets LAST.JobCode to 1, due to the nature of 'BY' group processing in SAS, where FIRST. and LAST. variables are affected by changes in the grouping variables.
Step-by-step explanation:
The statement that is true about the following program in SAS is option b: A change in the value of LAST.Gender causes the value of LAST.JobCode to be set to 1. In SAS, when using a BY statement with a SET statement, two temporary variables are created for each variable in the BY statement: FIRST. and LAST..
The FIRST. variable is 1 when the value of is the first in the BY group, and LAST. is 1 when the value of is the last in the BY group. Since Gender is the first BY variable, when the Gender value changes, indicating a new group, SAS automatically sets LAST.Gender to 1 and resets FIRST.JobCode for the new Gender group, which effectively sets LAST.JobCode to 1 at the beginning of each new Gender group.