BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
BU2B
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
garfield
Fluorite | Level 6

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.

View solution in original post

3 REPLIES 3
garfield
Fluorite | Level 6

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.

BU2B
Calcite | Level 5

Yes!  Thank you!  A lot of re-coding to do but that worked, thanks so much!

Steve

sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2415 views
  • 0 likes
  • 3 in conversation