home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / bit / listserv / sasl / 3509 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.2 KB  |  37 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!COMPUSERVE.COM!71020.1025
  3. Message-ID: <920731035721_71020.1025_EHC55-1@CompuServe.COM>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Thu, 30 Jul 1992 23:57:21 EDT
  6. Reply-To:     William Kahn <71020.1025@COMPUSERVE.COM>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         William Kahn <71020.1025@COMPUSERVE.COM>
  9. Subject:      6.04 command line invoke
  10. Lines: 25
  11.  
  12. In SAS 6.04, how can I pass parameters to the SAS program being executed in
  13. batch mode? i.e. I want to invoke SAS with a command like
  14.  
  15. SAS digestit.sas -raw.asc
  16.  
  17. and have the sas program DIGESTIT.SAS run on the input file RAW.ASC.
  18. DIGESTIT.SAS may look like: (neither infile is correct, just example idea).
  19.  
  20. data temp;
  21.   infile %1;   *I'm using DOS batch type syntax here.  %1 expands to RAW.ASC;
  22.   infile &mvar; *Using SAS macro type syntax here.  &mvar expands to RAW.ASC;
  23.   input x y z;
  24. proc means; run;
  25.  
  26. How do you get a command line parameter into a macro variable?
  27.  
  28. I can query the user with a windows statement for the data file name after
  29. s/he invokes digestit.sas.  I would prefer to have it all work off the
  30. command line.
  31.  
  32. Thanks.
  33.  
  34. Bill Kahn
  35. W. L. Gore and Associates
  36. 71020.1025@compuserve.com
  37.