BookmarkSubscribeRSS Feed
Sudhakar_A
Calcite | Level 5
Hi,

I need a solution for executing SAS programs in the batch. Let me explain the exact solution.

I have 20 programs in the Windows explorer. I want to execute 5 selected programs with right click context Menu "Batch submit in SAS 9.1" action and also i want to check the Logs of the those executed 5 programs.

But the problem is, it is executing each program in each session(concurrently) and also i dont know how to call my logcheck macro for the selected sas file logs.

Hope this understands my situation. Please help me to solve this issue.

Thanks
Sudhakar
7 REPLIES 7
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You will need to explain the purpose and processing logic for the "logcheck" macro you mentioned? Include information about your SAS version, as well -- it makes a difference.

Scott Barry
SBBWorks, Inc.

SAS Companion for Windows - Submitting SAS Code
http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/a000104288.htm#a003202824
Sudhakar_A
Calcite | Level 5
Logcheck is the macro which will check the "Errors", "Warnings" in the SAS Log file.

My sas version is SAS 9.1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
We need more information about the macro - without seeing the code (paste it in your reply), it's not going to be easy to help you find a solution to your problem.

Scott Barry
SBBWorks, Inc.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Explore using SAS system option ALTLOG= (at invocation time) and also consider using PROC PRINTTO with LOG=. Refer to the SAS DOC references provided in this thread for details.

Here is a Google advanced search argument which yields matches against the SAS.COM SAS support http://support.sas.com/ website:

routing log output batch site:sas.com


Scott Barry
SBBWorks, Inc.

Managing SAS Output under Windows
Routing Procedure Output and the SAS Log to a File
http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/procoutput.htm

ALTLOG System Option: Windows
http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-sysop-altlog.htm
Sudhakar_A
Calcite | Level 5
Hi Scott,

I think you didn't understand my question, let me tell you correctly.

Try from your system.

1. Select more than one sas program in the windows explorer and then right click on it you can see "Batch Submit with SAS 9.1" click on it you can see selected programs are executing in batch concurrently. I want this to be executed one by one sequentially. this is my first question.

2. In addition to the above one i need to check the log files created by this sas programs after the program execution

Hope this explains you my problem. Please help me solve this problem.

Thanks
Sudhakar
Peter_C
Rhodochrosite | Level 12
when you have several SAS programs selected, and want SAS to run these in batch, how would you indicate the order in which they should run?
Would it be possible to create a separate SAS program which contains

option nosyntaxcheck source2 ;
%include {name of first program} ;
%include {name of next program} ;
%include {name of next program} ;
%include {name of next program} ;
%include {name of next program} ;


Then just start this program.
You will have just one SAS log to analyse, and hopefully all your programs are properly tested and will contain no syntax errors, only data errors.

There are alternatives.

good luck

PeterC
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggest reviewing the SAS Companion for Windows - it mentions the ability to drag selected file(s) into an active SAS session's LOG window and SAS will then prompt you to "Submit". Unfortunately, you will not get your individual program's SAS log created in a separate file for each program, as it occurs when executing SAS batch requests.

Regarding your "log check" macro - you can explore using PROC PRINTTO and also the ALTLOG= OPTIONS parameter to re-direct your SAS log output to a file for whatever parsing and validating you want.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 7 replies
  • 1347 views
  • 0 likes
  • 3 in conversation