My department runs hundreds of SAS jobs every day that identify groups of people in need of clinical outreach (e.g., people at risk of "X" disease). The identified people are inserted into an Oracle server and we receive a batch confirmation with the Job ID, Creation date, and any errors in return. We would like to develop a process that identifies jobs that were scheduled but did not run. Reasons could include an error code in the batch or lack of a batch entry for that day. The output would be a SAS table with jobs that contain errors and jobs that did not run and have no batch entry. Proposed Approach: I think the ideal approach for this report would be to create an Excel file with the scheduled dates of each job (e.g., every day, or Third Friday of Every Month). I see the SAS function "NWKDOM" can handle this type of schedule date data but I am not sure this is the best approach. The Excel file would be brought into SAS as "Table A" and then compared against the batch report "Table B". The NULL values, or missing jobs, would form the report contents. My main challenge is how to represent the jobs schedule in "Table A" e.g., Third Friday of Every Month. Any thoughts on the process or links to similar projects would be appreciated. Table A, Job Schedule Scheduled Run Date Batch ID Third Friday of Every Month "NWKDOM" function Batch_1 Every Day "NWKDOM" function Batch_2 Second Tuesday of Every Month "NWKDOM" function Batch_3 First Day of Every Quarter "NWKDOM" function Batch_4 Table B, Today's Batch Jobs Run Date Batch ID Errors Today's Date Batch_1 0 Today's Date Batch_2 1 Today's Date Batch_3 0 Today's Date Batch_4 0 Major Steps: Excel file with job schedule dates (e.g., Third Friday of Every Month) and Batch ID SAS creates table of every job that runs on today's date (Run Date = sas_date) from the excel file (Table A) Batch jobs run and are brought into SAS (Table B) SAS process to identify missing jobs from the day's batch. SAS left join B on A. Scheduled Run Date = B.Rundate and A. Batch ID = B. Batch ID Create extract of missing jobs. WHERE Batch ID IS NULL
... View more