Good morning all,
OK I've researched this for a couple of days but still can't get the Task Scheduler to run my program. It runs fine manually. I'm setup with administrative access so that's not the issue. I'm running 64 bit Windows 7 Proffesional. The wierd thing is I don't see any errors in the task history pane, and the program opens, but then closes without actually running. Here's the content of my script file:
"C:\Program Files (x86)\SAS\SASFoundation\9.2(32-bit)\sas.exe" -SYSIN "\\nasdr\c_commodity_acctg\Workfiles\Steve\SAS\ERCOT\NSS Daily Backdown.SAS" -LOG "C:\Temp\DailyBackdown.log" -PRINT "C:\Temp\DailyBackdown.lst"
And here's a snipet of the log file from Task Scheduler:
WARNING: Truncated record.
69 int_1, int_2, int_3, int_4, int_5, int_6, int_7, int_8, int_9,
69 ! int_10, int_11, int_12, int_13, int_14, int_15, int_16, int_17,
69 ! int_18, int_19, int_20, int_21, int_22, int_23, int_24, i
70
71 from stlmnt.iso_determinant_day iso
72
73 where iso.determinant_id = '5'
74 and iso.operation_dt between &BD_Date1 and &BD_Date2
75 and iso.location_id in
75 ! ('232','234','568','233','104','584','236','235','237','567','282','103')
76
3 The SAS System 07:53 Monday, July 13, 2015
77 order by iso.location_id, iso.operation_dt );
ERROR: ORACLE prepare error: ORA-00904: "I": invalid identifier. SQL statement:......
NOTE: Statement not executed due to NOEXEC option.
I think your issue is that one of the lines in your program is too long for batch mode. There is a limit of 256 characters, see this page http://support.sas.com/kb/5/953.html.
I think your issue is that one of the lines in your program is too long for batch mode. There is a limit of 256 characters, see this page http://support.sas.com/kb/5/953.html.
Yes! Thank you! A lot of re-coding to do but that worked, thanks so much!
Steve
Consider the opportunity to move some part of your SYSIN to a separate file (containing the SAS code-piece), and then use a %INCLUDE statement to invoke that code in-line where needed within your base SAS program.
Scott Barry
SBBWorks, Inc.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.