data army navy airforce marines; drop Type; set prog2.military; if Type eq 'Army' then output army; else if Type eq 'Naval' then output navy; else if Type eq 'Air Force' then output airforce; else if Type eq 'Marine' then output marines; run; data army(drop=City State Country Type) navy(drop=Type) airforce(drop=Code Type) marines; set prog2.military; if Type eq 'Army' then output army; else if Type eq 'Naval' then output navy; else if Type eq 'Air Force' then output airforce; else if Type eq 'Marine' then output marines; run; data army(keep=Code Airport) navy(keep=Code Airport City State Country) airforce(keep=Airport City State Country) marines; set prog2.military; if Type eq 'Army' then output army; else if Type eq 'Naval' then output navy; else if Type eq 'Air Force' then output airforce; else if Type eq 'Marine' then output marines; run; data army(keep=Code Airport); set prog2.military(drop=City State Country); if Type eq 'Army' then output; run; data army; set prog2.military(firstobs=11 obs=25); if Type eq 'Army' then output; run;