SAS Interactive Batch Execution
SAS Interactive Batch Execution is a technique to quickly develop programs with a series of batch jobs. Programs should be designed in modules with each module performing a specific function and have restart capability. Restart capability should be flexibility enough to be able to restart the job after any module that completed successfully. To accomplish a restart after each module requires that each module save the data, code and macros that were generated during the execution. Initially each program module should be tested as an individual batch job. After the successful completion of each module the modules can be joined into one job with one or multiple steps. The module design will assist in debugging future changes or problems.
The separating the request into module should be as easy as you can make. A simple job starts with input module, followed by the analysis module, and ending with the output module. Multiple input files can be separated into a module for each file.
Multiple output file or reports can each be separated into its own module. As the analysis becomes more involved in also can be separated into modules. One restriction for all modules is that it can be executed and tested individually.
Limiting the number of records while inputting large files to find any syntax or logistic problems will expedite the programming effort and result in reduction computer resource consumption. After the input program is syntactical correct and the logical seems proficient the job should be restarted to read the entire file to save the data in a SAS formatted data set. If a job requires multiple large input files each file can be simultaneously inputted and saved as SAS data by its own job. Many times the hardest and most important step is to extract the data into SAS libraries because the format of the input records is not known or wrong. Verifying the success of the input is critical to any job.
Verifying the successful completion of each module is required and generating printouts that can be easily reviewed is necessary. The SAS Proc Print statement can be placed at intermediate steps to generate a printout of every variable for every observation. Viewing each printout separately with a JES2 Spooling display facility needs some assistance. The PRT macro is a front end to the SAS Proc Print statement to provide JES2 spooling facilities the capability to separate each printout by assigning a unique file reference (DD statement) for each execution of the Proc Print statement. For additional information please see the document PRT macro for viewing MVS multiple printouts.