title: SAS: error 180-322 statement is not valid or it is used out of proper order? What am I doing wrong here?
body: <p>Here's my non working code.</p>
  
  <pre><code>data _NULL_;
  infile datalines;
  input name $ class date mmddyy10. type $ quantity;
  profit = quantity*1.5;
  datalines;
  Adriana 21 3/21/2000 MP 7
  Nathan  14 3/21/2000 CD 19
  Matthew 14 3/21/2000 CD 14
  Claire  14 3/22/2000 CD 11
  Caitlin 21 3/24/2000 CD 9
  Ian     21 3/24/2000 MP 18
  Chris   14 3/25/2000 CD 6
  Anthony 21 3/25/2000 MP 13
  Stephen 14 3/25/2000 CD 10
  Erika   21 3/25/2000 MP 17
  ;
  File '/folders/myfolders/sasuser.v94/Library/candysales.txt' Print;
  Title;
  PUT @5 'Candy sales report for ' name 'from classroom ' class 
    //@5 'Congratulations! You sold ' quantity ' boxes of candy'
     /@5 'and earned' profit dollar8.2 'for field trip.';
  PUT _PAGE_;
  RUN; 
  </code></pre>
  
  <p>I keep getting the error </p>
  
  <pre><code>error 180-322 statement is not valid or it is used out of proper order
  </code></pre>
  
  <p>I have tried changing the File statement's placement but I keep getting the same error. I am new to SAS and still learning, but I can't find a solution for this.</p>
  
  <p>Any ideas?</p>