Desktop productivity for business analysts and programmers

SAS Enterprise Guide - Scheduling issue

Reply
Highlighted
Contributor
Posts: 36

SAS Enterprise Guide - Scheduling issue

[ Edited ]

Hello - I've scheduled a SAS project, which has 35 steps/scripts, to run on our SAS server. I have scheduled a number of other flows, and they all work fine. 

 

If I run the process flow manually by clicking run, it runs fine. 

 

If I schedule the project, only the 34th script will run! I can't see how/why this is happening. Task Scheduler gives no error, and the VBScript the EG creates is below (which looks fine/normal to me). 

 

In the project log, there are no errors or warnings for the scripts that don't run, only a note. 

 

The LOG for one of the scripts that doesn't run is also below..

 

Has anyone had this before? I don't know why it will only run one script and forget about the others in the flow, especially as the one that runs is near the end of the flow. I've deleted and recreated the schedule about 5 times but it does the same thing each time. Any help is gratefully received! :-)  

 

Log:

-----

 

run at 9/8/2017 9:28:44 AM on SASApp
1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='0';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='C:\Process
5 ! Flows\a\INTRANET_LIVE_OUTPUT.egp';
6 %LET _CLIENTPROJECTNAME='INTRANET_LIVE_OUTPUT.egp';
7 %LET _SASPROGRAMFILE=;
8
9 ODS _ALL_ CLOSE;
10 OPTIONS DEV=ACTIVEX;
11 GOPTIONS XPIXELS=0 YPIXELS=0;
12 FILENAME EGSR TEMP;
13 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
14 STYLE=HtmlBlue
15 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
16 NOGTITLE
17 NOGFOOTNOTE
18 GPATH=&sasworklocation
19 ENCODING=UTF8
20 options(rolap="on")
21 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22
23 GOPTIONS ACCESSIBLE;
24 GOPTIONS NOACCESSIBLE;
25 %LET _CLIENTTASKLABEL=;
26 %LET _CLIENTPROCESSFLOWNAME=;
27 %LET _CLIENTPROJECTPATH=;
28 %LET _CLIENTPROJECTNAME=;
29 %LET _SASPROGRAMFILE=;
30
31 ;*';*";*/;quit;run;
32 ODS _ALL_ CLOSE;
33
34
35 QUIT; RUN;
36

 

VB for the schedule: 

---------------------------

 

Option Explicit
Dim app

Call dowork

'shut down the app
If not (app Is Nothing) Then
app.Quit
Set app = Nothing
End If


Sub dowork()
On Error Resume Next
'----
' Start up Enterprise Guide using the project name
'----
Dim prjName
Dim prjObject

prjName = "C:\Process Flows\a\INTRANET_LIVE_OUTPUT.egp" 'Project Name

Set app = CreateObject("SASEGObjectModel.Application.7.1")
If Checkerror("CreateObject") = True Then
Exit Sub
End If

'-----
' open the project
'-----
Set prjObject = app.Open(prjName,"")
If Checkerror("app.Open") = True Then
Exit Sub
End If


'-----
' run the project
'-----
prjObject.run
If Checkerror("Project.run") = True Then
Exit Sub
End If


'-----
' Save the new project
'-----
prjObject.Save
If Checkerror("Project.Save") = True Then
Exit Sub
End If

'-----
' Close the project
'-----
prjObject.Close
If Checkerror("Project.Close") = True Then
Exit Sub
End If

End Sub

Function Checkerror(fnName)
Checkerror = False

Dim strmsg
Dim errNum

If Err.Number <> 0 Then
strmsg = "Error #" & Hex(Err.Number) & vbCrLf & "In Function " & fnName & vbCrLf & Err.Description
'MsgBox strmsg 'Uncomment this line if you want to be notified via MessageBox of Errors in the script.
Checkerror = True
End If

End Function

Ask a Question
Discussion stats
  • 0 replies
  • 196 views
  • 0 likes
  • 1 in conversation