Variable Created CVC_VET_STATUS--indicates whether the respondent has ever served in the active armed forces, the reserves, or the National Guard. This program uses the military job information from the employer roster to create a variable indicating the respondent's status as a veteran. Variables Used /*Variable Names in the Program Variable Names on the Gator*/ PUBID_1997 'PUBID_1997'n CVC_VET09 'CVC_VET_STATUS_XRND'n MILC01 'YEMP_MILCODE.01_2019'n MILC02 'YEMP_MILCODE.02_2019'n MILC03 'YEMP_MILCODE.03_2019'n MILC04 'YEMP_MILCODE.04_2019'n MILC05 'YEMP_MILCODE.05_2019'n MILC06 'YEMP_MILCODE.06_2019'n MILC07 'YEMP_MILCODE.07_2019'n MILC08 'YEMP_MILCODE.08_2019'n MILC09 'YEMP_MILCODE.09_2019'n MILC10 'YEMP_MILCODE.10_2019'n MILC11 'YEMP_MILCODE.11_2019'n SAS Code for Variable Creation %let n=11; %let lastcvc=CVC_VET_r18; array MILC(&n); CVC_VET=0; active=0; reserve=0; guard=0; if &lastcvc=1 then CVC_VET=1; do I=1 to (&n); if MILC[I] in (1,2,3,4,11) then do; active=1; if CVC_VET=0 then do; CVC_VET=1; end; end; end; if CVC_VET ne 1 and &lastcvc=2 then CVC_VET=2; do I=1 to (&n); if MILC[I] in (5,6,7,8,12) then do; reserve=1; if CVC_VET=0 then do; CVC_VET=2; end; end; end; if CVC_VET not in (1,2) & &lastcvc=3 then CVC_VET=3; do I=1 to (&n); if MILC[I] in (9,10) then do; guard=1; if CVC_VET=0 then do; CVC_VET=3; end; end; if (MILC[I] in (-1, -2, -3, 13) or &lastcvc=-3 ) & CVC_VET=0 then do; CVC_VET=-3; end; if MILC1=-5 and &lastcvc=-4 then do; CVC_VET=-4; end; end;