{"id":2455,"date":"2012-06-03T02:12:08","date_gmt":"2012-06-03T07:12:08","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=2455"},"modified":"2012-06-03T02:14:24","modified_gmt":"2012-06-03T07:14:24","slug":"batch-sas-or-whats-a-sea-prompt","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/batch-sas-or-whats-a-sea-prompt\/","title":{"rendered":"Batch SAS or What&#8217;s a Sea Prompt?"},"content":{"rendered":"<p>At SAS Global Forum, someone commented to me that he was stunned at the number of people who were unfamiliar with a c:\\<\/p>\n<p>Yes, young people, when us oldsters say &#8220;c prompt&#8221; we are not talking about a cool shellfish<\/p>\n<p><a href=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/06\/crabs.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2456\" title=\"crabs\" src=\"http:\/\/www.thejuliagroup.com\/blog\/wp-content\/uploads\/2012\/06\/crabs.jpg\" alt=\"king crab\" width=\"300\" height=\"225\" \/><\/a><\/p>\n<p>Nope, my dears, in Windows, we expect you to go to that window start menu, click on All Programs, then pick Accessories and then there is something called a Command Prompt.<\/p>\n<p>Don&#8217;t feel bad if you don&#8217;t remember it. I barely remember it myself. \u00a0I use SAS On-Demand a lot with my classes. I have a pretty awesome new computer so even with very large data sets I can run things pretty quickly just by clicking on that little running guy.<\/p>\n<p>BUT &#8230; every now and then I end up with a job \u00a0that not only takes a long time but fills up the entire output buffer. I don&#8217;t want to clear my log file. I want to read it later. \u00a0So.. enter batch SAS<\/p>\n<p>It&#8217;s very simple if you remember a few things.<\/p>\n<p>1. Go to the directory where your SAS program is located. To do this, you most likely need to change directory from the top-level C:\\ \u00a0 To do that, say your file is in a directory called MySASFiles in your documents folder, do this:<\/p>\n<p>cd \\users\\you\\documents\\MySASFiles<\/p>\n<p>obviously, you want to put your name instead of \u00a0&#8220;you&#8221;.<\/p>\n<p>Unlike Unix, Window is not case-sensitive<\/p>\n<p>2. Remember that if you have a space in the directory name you need quotes and, unfortunately, SAS is almost certainly stored in the Program Files directory. Also, remember to end the quote at the end of the whole path, that is, at the end of your file name, so you are going to write the whole statement on one line (don&#8217;t worry if it wraps around by itself) like this<\/p>\n<p>&#8220;c:\\Program Files\\SAS\\SASFoundation\\9.2\\sas.exe&#8221; -sysin programname.sas -config\u00a0&#8220;c:\\Program Files\\SAS\\SASFoundation\\9.2\\sasv9.cfg&#8221;<\/p>\n<p>With the -sysin and -config, make sure you have no space between the &#8211; and the word that follows.<\/p>\n<p>Then hit enter. The log and lst files will automatically be named programname.log and programname.lst and be created in the directory where your programname.sas file is.<\/p>\n<p>That&#8217;s it. Go have a martini. Come back when you are sober and look at your results.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At SAS Global Forum, someone commented to me that he was stunned at the number of people who were unfamiliar with a c:\\ Yes, young people, when us oldsters say &#8220;c prompt&#8221; we are not talking about a cool shellfish Nope, my dears, in Windows, we expect you to go to that window start menu,&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-2455","post","type-post","status-publish","format-standard","hentry","category-software","category-technology"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/2455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=2455"}],"version-history":[{"count":2,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/2455\/revisions"}],"predecessor-version":[{"id":2458,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/2455\/revisions\/2458"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=2455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=2455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=2455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}