From: Richard A. DeVenezia on 3 Oct 2007 06:00 Suppose a command line is needed such that a batch jobs log file is automatically opened into notepad (or system default registered opener for ..log files) job.sas --- proc print data=sashelp.class;run; --- This works: sas.exe -noterminal -sysin job.sas -termstmt "options noxwait noxsync;x start job.log" Now suppose the command specifies a log file containing spaces, this does not work. sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt "options noxwait noxsync;x start job 1234.log" It does not work because the termstmt seen in the sas session is options noxwait noxsync;x start job 1234.log In a Windows cmd window, the command that works is start "Review" "job 1234.log" Thus the command that would work as a SAS statement would be options noxwait noxsync; x "start ""Review"" ""job 1234.log""" (1) A simple doubling up of double quotes did not work. If fact, the entire invocation command seems to be ignored! sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt "options noxwait noxsync;x ""start """"job 1234.log""""""" The question is, can the SAS statements (1) be specified in the -TERMSTMT option setting in a windows command line ? -- Richard A. DeVenezia
From: Jim Groeneveld on 3 Oct 2007 06:30 Hi Richard, Very clear problem stating! Not sure, but try: -termstmt 'options noxwait noxsync;x start "dummy text" "job 1234.log"' Regards - Jim. -- Jim Groeneveld, Netherlands Statistician, SAS consultant home.hccnet.nl/jim.groeneveld On Wed, 3 Oct 2007 06:00:38 -0400, Richard A. DeVenezia <rdevenezia(a)WILDBLUE.NET> wrote: >Suppose a command line is needed such that a batch jobs log file is >automatically opened into notepad (or system default registered opener for >.log files) > >job.sas >--- >proc print data=sashelp.class;run; >--- > >This works: > sas.exe -noterminal -sysin job.sas -termstmt "options noxwait noxsync;x >start job.log" > >Now suppose the command specifies a log file containing spaces, this does >not work. > sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt >"options noxwait noxsync;x start job 1234.log" > >It does not work because the termstmt seen in the sas session is > options noxwait noxsync;x start job 1234.log > >In a Windows cmd window, the command that works is > start "Review" "job 1234.log" > >Thus the command that would work as a SAS statement would be > options noxwait noxsync; x "start ""Review"" ""job 1234.log""" (1) > >A simple doubling up of double quotes did not work. If fact, the entire >invocation command seems to be ignored! > sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt >"options noxwait noxsync;x ""start """"job 1234.log""""""" > >The question is, can the SAS statements (1) be specified in the -TERMSTMT >option setting in a windows command line ? > >-- >Richard A. DeVenezia
From: Peter Crawford on 3 Oct 2007 08:21 On Wed, 3 Oct 2007 06:00:38 -0400, Richard A. DeVenezia <rdevenezia(a)WILDBLUE.NET> wrote: >Suppose a command line is needed such that a batch jobs log file is >automatically opened into notepad (or system default registered opener for >.log files) > >job.sas >--- >proc print data=sashelp.class;run; >--- > >This works: > sas.exe -noterminal -sysin job.sas -termstmt "options noxwait noxsync;x >start job.log" > >Now suppose the command specifies a log file containing spaces, this does >not work. > sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt >"options noxwait noxsync;x start job 1234.log" > >It does not work because the termstmt seen in the sas session is > options noxwait noxsync;x start job 1234.log > >In a Windows cmd window, the command that works is > start "Review" "job 1234.log" > >Thus the command that would work as a SAS statement would be > options noxwait noxsync; x "start ""Review"" ""job 1234.log""" (1) > >A simple doubling up of double quotes did not work. If fact, the entire >invocation command seems to be ignored! > sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt >"options noxwait noxsync;x ""start """"job 1234.log""""""" > >The question is, can the SAS statements (1) be specified in the -TERMSTMT >option setting in a windows command line ? > >-- >Richard A. DeVenezia Hi Richard generally, I use -termstat to %include code that will either send an email or play the first few notes of 5th symphony (as posted on SAS-L on August 14 : http://listserv.uga.edu/cgi-bin/wa?A2=ind0708B&L=sas-l&P=R39343 ) I only use it for batch running. Not sure if it works interactively. Good Luck PeterC
From: "data _null_," on 3 Oct 2007 08:33 This worked on on my computer... "D:\Program Files\SAS\SAS 9.1\sas.exe" -noterminal -sysin "copy of 1234.sas" -termstmt 'systask command %sysfunc(quote("D:\Program Files\SAS\SAS System Viewer\9.1\sv.exe" "copy of 1234.log"));' Single quotes around entire termstmt. I use SYSFUNC QUOTE so there we no doubled double quotes. From the log of "COPY OF 1234.SAS" 1 proc options option=termstmt; 2 run; SAS (r) Proprietary Software Release 9.1 TS1M3 TERMSTMT=systask command %sysfunc(quote("D:\Program Files\SAS\SAS System Viewer\9.1\sv.exe" "copy of 1234.log")); On 10/3/07, Richard A. DeVenezia <rdevenezia(a)wildblue.net> wrote: > Suppose a command line is needed such that a batch jobs log file is > automatically opened into notepad (or system default registered opener for > .log files) > > job.sas > --- > proc print data=sashelp.class;run; > --- > > This works: > sas.exe -noterminal -sysin job.sas -termstmt "options noxwait noxsync;x > start job.log" > > Now suppose the command specifies a log file containing spaces, this does > not work. > sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt > "options noxwait noxsync;x start job 1234.log" > > It does not work because the termstmt seen in the sas session is > options noxwait noxsync;x start job 1234.log > > In a Windows cmd window, the command that works is > start "Review" "job 1234.log" > > Thus the command that would work as a SAS statement would be > options noxwait noxsync; x "start ""Review"" ""job 1234.log""" (1) > > A simple doubling up of double quotes did not work. If fact, the entire > invocation command seems to be ignored! > sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt > "options noxwait noxsync;x ""start """"job 1234.log""""""" > > The question is, can the SAS statements (1) be specified in the -TERMSTMT > option setting in a windows command line ? > > -- > Richard A. DeVenezia >
From: Peter Crawford on 3 Oct 2007 08:45 When I got no log file geneated, I had a look into the system "event viewer" There was a warning at the top of "Applications" SAS Warning Event: WARNING: Messages have been logged to the file named 'C:\Documents and Settings\Peter Crawford\Application Data\SAS\LOGS\sas.1058.14D6EAC3.log'. Opening that in notepad, revealed ERROR: Unrecognized SAS option name, "" ERROR: Unrecognized SAS option name, "" ERROR: Unrecognized SAS option name, "JOB 1234.LOG" ERROR: Unrecognized SAS option name, "" ERROR: Unrecognized SAS option name, START ERROR: (SASXKRIN): KERNEL RESOURCE INITIALIZATION FAILED. UNABLE TO INITIALIZE THE SAS KERNEL Your messages may be different. Clearly the handling of multiple quotes, is not as expected ! PeterC On Wed, 3 Oct 2007 07:33:07 -0500, data _null_, <datanull(a)GMAIL.COM> wrote: >This worked on on my computer... > >"D:\Program Files\SAS\SAS 9.1\sas.exe" -noterminal -sysin "copy of >1234.sas" -termstmt 'systask command %sysfunc(quote("D:\Program >Files\SAS\SAS System Viewer\9.1\sv.exe" "copy of 1234.log"));' > >Single quotes around entire termstmt. I use SYSFUNC QUOTE so there we >no doubled double quotes. > >From the log of "COPY OF 1234.SAS" > >1 proc options option=termstmt; >2 run; > > SAS (r) Proprietary Software Release 9.1 TS1M3 > > TERMSTMT=systask command %sysfunc(quote("D:\Program Files\SAS\SAS >System Viewer\9.1\sv.exe" "copy of 1234.log")); > > > >On 10/3/07, Richard A. DeVenezia <rdevenezia(a)wildblue.net> wrote: >> Suppose a command line is needed such that a batch jobs log file is >> automatically opened into notepad (or system default registered opener for >> .log files) >> >> job.sas >> --- >> proc print data=sashelp.class;run; >> --- >> >> This works: >> sas.exe -noterminal -sysin job.sas -termstmt "options noxwait noxsync;x >> start job.log" >> >> Now suppose the command specifies a log file containing spaces, this does >> not work. >> sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt >> "options noxwait noxsync;x start job 1234.log" >> >> It does not work because the termstmt seen in the sas session is >> options noxwait noxsync;x start job 1234.log >> >> In a Windows cmd window, the command that works is >> start "Review" "job 1234.log" >> >> Thus the command that would work as a SAS statement would be >> options noxwait noxsync; x "start ""Review"" ""job 1234.log""" (1) >> >> A simple doubling up of double quotes did not work. If fact, the entire >> invocation command seems to be ignored! >> sas.exe -noterminal -sysin job.sas -log "job 1234.log" -termstmt >> "options noxwait noxsync;x ""start """"job 1234.log""""""" >> >> The question is, can the SAS statements (1) be specified in the - TERMSTMT >> option setting in a windows command line ? >> >> -- >> Richard A. DeVenezia >>
|
Next
|
Last
Pages: 1 2 Prev: SAS Administration questions - %omabakup, and security Next: Date Formats in a CSV File |