SAS macro example tutorial

There are huge requirements for mainframe with SAS skill set. SAS (Statistical Analysis System). It is used in mainframe for creating reports. As a mainframe professional, learning and working on SAS is not much difficult. The tutorial explains on how to run macro in JCL of mainframe.

The online SAS course for mainframe, without wasting your time, you can learn here. Click and buy the course.

SAS is a macro level programming language. We can write programs with SAS. In the MVS environment, we can use both On-line and Batch JCL to execute SAS macros.

SAS with MVS (Batch);

Sample JCL to run SAS:

//SASSTP1  EXEC SAS6
//INPUT1     DD   DSN=Inputfile,DISP=SHR
//OUTPUT1    DD   DSN=Outputfile,DISP=OLD
//SYSIN  DD   *
 DATA  WORK.M;
 INFILE INPUT1;
 INPUT        FILELD1  $1-10
              FILELD2 $11-20;
 IF FIELD1= ‘22GCPMGGCAP’;
 RUN;
/*

The above is best example, where it reads input file and filters for matching record and write into output file.

After executes RUN, it writes records into o/p file. Just grab my favourite book to start your SAS learning.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.