11-14-2016 05:44 PM
1---+----10---+----20---+--- FRANCE,INDIA,10MAR2004 ITALY,USA,10/20/2004 SAFRICA,FRANCE,17JUN2004 AMERICA,FRANCE,12/31/2004 FRANCE,USA,20JAN2004 ITALY,USA,08/19/2004
The following SAS program is submitted using this file as input:
1 2 3 4 5 6 7 8
data work.flights; infile 'file-specification' dsd; input from_co $ @; if from_co='FRANCE' or from_co='SAFRICA' then do; input to_country $ flightdate : date9.; output; end; run;
How many observations does the Work.Flights data set contain? I don,t understant because is 3
11-16-2016 12:16 PM
When there are explicit OUTPUT statements data is only written to the data set when the Output is executed. The Output in the example is only executed when the condition :
if from_co='FRANCE' or from_co='SAFRICA'
So when the from country is FRANCE or SAFRICA is the only time you get results.