Hello folks, I am a very beginner at SAS coding. I want to automate part of a manual task my team has to execute weekly and was suggested to try my hand on SAS. The language seems easy to use and I was able to create a working code. The problem is that we have 200+ systems to run the task and I am having a very hard time to "universalize" the code so we can use only one source for all systems. The idea is to run the following JCL: //SASREPRT EXEC SAS
.
.
.
//SYSIN DD DISP=SHR,DSN=MYHLQ.RT&&AVP(SASCODE) The 'RT&&' is a placeholder for the identification the user will have to manually enter each time this job is submitted. This is the part of the SASCODE that reads from the LIST and, after some parsing, it will confirm the jobnames and separate them into 3 datasets: /*--------------------------------------------------------------------------------------------------------------------------
Purpose:
This DATA step splits the merged job_summary dataset into three separate datasets based on the jobname prefix.
Execution Details:
- Each record from job_summary is evaluated using the substr() function.
- Jobs with jobnames starting with:
- 'RT&&0' are categorized as RIP jobs. The output is sent to dataset rip
- 'RT&&G' are categorized as SysGen jobs. The output is sent to dataset sysgen
- 'RT&&MN' are categorized as Maintenance jobs. The output is sent to dataset maint
- Each matching record is written to its respective dataset using output.
Assumptions:
- Jobname prefixes are consistent and meaningful for classification.
- Only one category applies per job (no overlaps).
--------------------------------------------------------------------------------------------------------------------------*/
data rip sysgen maint;
set job_summary;
if substr(jobname, 1, 5) = 'RT&&0' then output rip;
else if substr(jobname, 1, 5) = 'RT&&G' then output sysgen;
else if substr(jobname, 1, 6) = 'RT&&MN' then output maint;
run; Is there anyway to pass a PARM on the JCL that would dynamically change the RT&& inside SASCODE for that specific run? Example: User edits the SASREPRT and change RT&& to ABCD. When the job is submitted, the RT&& is dynamically changed in the SASCODE as well. For this to be universal and reusable, SASCODE would have to remain with RT&& after the job is executed. Thanks in advance, Fábio "Morfasio" Silva
... View more