Saturday, May 3, 2014

SAS in Mainframes(z/Os) Tutorial : Use of symbolic parameter in SAS

Having completed SAS part 1and SAS part 2 , we will see the use of Symbolic in SAS
With the help of symbolic parameters, we can substitute the values dynamically in any place we want to. Say for example we are building the date, or reading the date from one input file and want to use it as a header in title or to use it in any calculation down the flow of the program while doing the condition checks like  <=,>= checks. In these cases the use of symbolic fits the best.
Say like below
DATA DATE;                     
  INFILE DATEIN;               
  INPUT @01  LOWDTE   $CHAR08.  
        @01  HEADER   $CHAR06.  
        @10  HIGHDTE   $CHAR08.  
        ;                      
  PUT "L-DATE >>>>>>>> " LOWDTE;
  PUT "H-DATE >>>>>>>> " HIGHDTE;
                               
   CALL SYMPUT('HEADR',HEADR); 

........
DATA PROCESS1;
 ...
TITLE ' test Heading' "&HEADR" ;
Here.. we are reading the input file, for the Dates and assigning the variables in INFILE DATEIN.
After that there may be several processes occurring in the program.Once done we now want to print the title taking the date read above in INFILE step.  The SYMPUT parameter is used for invoking symbolic parameter in sas. Later down the line we use  &variable-name as used in JCL for the value substitution.
Now ,lets see how we can use this value in sas comprison .
DATA DATA1;  
INFILE IMFL08;
RETAIN CUDATE;   <= Need to declare this variable as RETAIN
INPUT          

  @01   ANO $CHAR 01
  @02   BNO $CHAR02.
.........
CUDATE = "&RUNDATE"; <<== We are assigning the symbolics here
IF EFFDATE LE CUDATE <<= Use symbolic paramter in condition check
    THEN OUTPUT;    

9 comments:

  1. Main Frames Online Training, ONLINE TRAINING – IT SUPPORT – CORPORATE TRAINING http://www.21cssindia.com/courses/main-frames-online-training-107.html The 21st Century Software Solutions of India offers one of the Largest conglomerations of Software Training, IT Support, Corporate Training institute in India - +919000444287 - +917386622889 - Visakhapatnam,Hyderabad Main Frames Online Training, Main Frames Training, Main Frames, Main Frames Online Training| Main Frames Training| Main Frames| "Courses at 21st Century Software Solutions
    Talend Online Training -Hyperion Online Training - IBM Unica Online Training - Siteminder Online Training - SharePoint Online Training - Informatica Online Training - SalesForce Online Training - Many more… | Call Us +917386622889 - +919000444287 - contact@21cssindia.com
    Visit: http://www.21cssindia.com/courses.html"

    ReplyDelete
  2. It was really a nice article and i was really impressed by reading thisarticle We are also giving all software Course Online Training.The Sas Online Training is one of the leading Online Training institute in the world.

    ReplyDelete
  3. Nice article i was really impressed by seeing this article, it was very intresting and it is very useful for SAS Training Learners.. We are Providing best ccna online training in worldwide.

    ReplyDelete
  4. Great Information admin thanks For Your Information and Any body wants
    learn sas through Online for Details Please go through the Link http://bit.ly/1B9ohro

    ReplyDelete
  5. Well, Thanks for your article.
    Its impressive to know something about your note on SAS ONLINE TRAINING Course. Please do share your articles like this your articles for our awareness. Mostly we do also provide Online Training on SAS ONLINE TRAINING Course. for more info Contact-Us at@ online-training-sas.com/.

    ReplyDelete
  6. Well, Thanks for your article.
    Its impressive to know something about your note on SAS ONLINE TRAINING Course. Please do share your articles like this your articles for our awareness. Mostly we do also provide Online Training on SAS ONLINE TRAINIG Course. for more info Contact-Us at@ online-training-sas.com/.

    ReplyDelete
  7. Thank you provide valuable informations and iam seacrching same informations,and saved my time SAS Online Training

    ReplyDelete


  8. This is the information that I was looking for and let me tell you one thing that is it is very useful for who is looking for SAS Online Training.

    ReplyDelete
  9. I really appreciate the information shared above. It’s of great help. If someone wants to learn Online (Virtual) instructor lead live training in IBM Mainframe TECHNOLOGY, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor-led training on TECHNOLOGY. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ pieces of training in India, USA, UK, Australia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Pratik Shekhar
    MaxMunus
    E-mail: pratik@maxmunus.com
    Ph:(0) +91 9066268701
    http://www.maxmunus.com/

    ReplyDelete