Is SAS programming a Sequential or non-sequential language?

Reply
Occasional Contributor
Posts: 5

Is SAS programming a Sequential or non-sequential language?

Is SAS programming a Sequential or non-sequential language?

does the order in a block affects the results?

data work.delays;

  set orion.orders;

  where Order_Date+4<Delivery_Date

  and Employee_ID=99999999;

  Order_Month=month(Order_Date);

  if Order_Month=8;

  label Order_Date='Date Ordered'

  Delivery_Date='Date Delivered'

  Order_Month='Month Ordered';

   format Order_Date Delivery_Date mmddyy10.;

  keep Employee_ID Customer_ID Order_Date

  Delivery_Date Order_Month;

run;

proc contents data=work.delays;
run;

Super User
Posts: 11,343

Re: Is SAS programming a Sequential or non-sequential language?

Posted in reply to ricodonself

Some statement types such a label, format, informat, infile, file are not specifically  order dependent though if you have multiple of these involving the same variable you may get unexpected results. Any actual data manipulation operations including INPUT are order dependent. And data step or procs execute in sequence submitted.

Also statements submitted between data steps and procedures such as system options affect code following the submission.

Ask a Question
Discussion stats
  • 1 reply
  • 173 views
  • 3 likes
  • 2 in conversation