MACROs in SAS | SAS MACROs All in One | MACRO Programming in SAS Complete Tutorial

Sdílet
Vložit
  • čas přidán 19. 01. 2021
  • This is another video to enhance your SAS Skill and become a pro by learning the MACROs in SAS. This video covers almost everything which a beginner would require to learn to be able to start Macro programming and become a pro.
    This video covers the following topics:
    ► Introduction to MACROS in SAS
    ► Macro Variables
    ► Different ways of creating macro variables in SAS
    ► %if %then %else in SAS Macros
    ► %STR in SAS
    ► %EVAL in SAS
    ► %SYSFUNC and Usage of % in SAS MACROs
    ► MPRINT
    ► MLOGIC
    ► SYMBOLGEN
    ► %LET to create a macro variable
    ► Macro Parameters
    ► INTO Clause in Proc SQL
    ► CALL Symput Routine
    #Learnerea
    #SASTraining #SASTutorial #SASCourse #SASTutorialForBeginners #SAS #SASforBeginners
    #SASProgramming #SASTProgrammingForBeginners #SASProgrammingTutorial
    Contacts:
    Facebook ► / learnerea
    Download the excel files for practice data
    GitHub ► github.com/LEARNEREA/Excel_Files
  • Věda a technologie

Komentáře • 70

  • @TheSafi4027
    @TheSafi4027 Před 2 lety +2

    Thank you for the tutorial ! Awesome and very well explained...Much Appreciated....

  • @wenjiezhou8888
    @wenjiezhou8888 Před 2 lety +1

    Thanks for the tutorial! It's very useful and helpful in my work!

  • @rameshbalami2075
    @rameshbalami2075 Před 3 lety +5

    I was struggling to understand macros in sas...n just managed to get what I want ...thnx so much..u made it very easy to understand

  • @sakwael
    @sakwael Před 2 lety +2

    Thank you for the tutorial ! super clear and very well explained

  • @ajaytodankar2864
    @ajaytodankar2864 Před 2 lety +3

    Very useful and simplest way to learn macros.. Great job

  • @nithyaangamuthu6782
    @nithyaangamuthu6782 Před rokem +2

    Explained very clearly. Thank you so much.

  • @osamahmood1678
    @osamahmood1678 Před 2 lety +1

    Thanks for this very informative tutorial on SAS Macros and Debugging

  • @deepakkumaar9665
    @deepakkumaar9665 Před 3 lety +1

    Awesome sir

  • @bhanuchandar2805
    @bhanuchandar2805 Před 3 lety +3

    Please provide some interview topics on CDISC (SDTM,ADAM)

  • @memoriesforlife7685
    @memoriesforlife7685 Před 3 lety +1

    clearly understand macros and very useful for beginner to

  • @sandeepmane8694
    @sandeepmane8694 Před 3 lety +4

    Sir your explanation is excellent and slowly which is clearly understand
    Plz sir I want a some videos like
    1)some statistical test in SAS
    2)CDISC (SDTM,ADAM)
    3) Clinical trials in SAS
    4)CRF annotation
    5) Randomisation and sample size calculation
    6) Table and listing creation
    I hope you will above topic video as early as possible

  • @meghajain4544
    @meghajain4544 Před 2 lety +1

    VERY NICE. U HAVE EXPLAINED VERY EASILY

  • @kidsplayhouse4931
    @kidsplayhouse4931 Před 3 lety +2

    Please do interview questions on healthcare analytics on sas

  • @ashokdevendra8978
    @ashokdevendra8978 Před 3 lety +1

    Super

  • @bishwarup1429
    @bishwarup1429 Před 2 lety +1

    Very useful tutorial. Thank you sir.

  • @tomasknor9575
    @tomasknor9575 Před 5 měsíci +1

    Thank you for your tutorial.

  • @7979sunny
    @7979sunny Před 4 měsíci

    Hello..I have a query regarding SAS macros. When we convert local macro variable to global variable using %global statement. Can we use that macro variable in data or proc step and could you plz let me know the procedure for that.
    Thanks In Advance!

  • @sabyasachiojha3723
    @sabyasachiojha3723 Před rokem +1

    if you want to remove debugging option in a session then instead of terminating the session just use "options nomprint" or "options nomlogic". so no need to terminate the session.

  • @monikapatil5537
    @monikapatil5537 Před 6 měsíci

    Thank you so much Sir......

  • @ashokballipalli237
    @ashokballipalli237 Před 3 lety +2

    Please do videos of clinical sas... Ur explanation is clear Sir...

  • @guillermoramos4043
    @guillermoramos4043 Před rokem +1

    Dear Learmea
    In the first conditional example when you run your macro with "SUV" you do not got what you wanted; To get what you wanted, in line 25 you shoud have written: where upcase(type) ne "HYBRID";

    • @learnerea
      @learnerea  Před rokem +1

      Sounds like a good suggestion which I can validate if you could help me with the time stamp when this was explained in the video

  • @aspiren81
    @aspiren81 Před 2 lety +1

    thank you for your video.
    Why did't we use %upcase ?

    • @learnerea
      @learnerea  Před rokem

      would you be able to put the time stamp when you see me not using this where I should had to, I'll check and get back to you

  • @JoelHernandez-vs1kn
    @JoelHernandez-vs1kn Před rokem +1

    Gracias

  • @Izumi1703
    @Izumi1703 Před 2 lety +1

    For the creating macro variables with call symput option, you had some converted message in the log, how can we get rid of that as it is not normally accepted as a log issue? it said numeric values have been converted to character.

    • @learnerea
      @learnerea  Před 2 lety

      Hi Lzumi,
      Thanks for watching the video. would you mind putting the timeframe over here, that will help us to qucikly reach to the specific point where you have problem.

    • @Izumi1703
      @Izumi1703 Před 2 lety +1

      @@learnerea Ah yes sorry my bad, at 32:40 :)

    • @learnerea
      @learnerea  Před 2 lety +1

      @@Izumi1703 Though it's not an issue one need to fix but if that's a matter of concern for you then you can simply put the numeric value in quotation e.g. instead of 94 you can just put '94'

    • @Izumi1703
      @Izumi1703 Před 2 lety +1

      ​@@learnerea It actually is an issue that I need to fix since in my job it is not accepted so thank you for the solution provided :)

    • @learnerea
      @learnerea  Před 2 lety +1

      @@Izumi1703 Happy to know that the provided solution worked for you. Feel free to post any further queries where you are stuck in. You can also write to us directly on learnerea.edu@gmail.com

  • @AnkitaSingh-yg8cz
    @AnkitaSingh-yg8cz Před 3 lety

    I got this error
    NOTE: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation marks.
    how can i slove

    • @learnerea
      @learnerea  Před 3 lety

      If your script is not too long, can you please put that here

  • @raninamburi3280
    @raninamburi3280 Před rokem +1

    Hi Sir, do you teach R and python?

    • @learnerea
      @learnerea  Před rokem

      Yes, there is whole play list of python -
      Complete Python Tutorial for Beginners - czcams.com/play/PL4GjoPPG4VqPUklqM_kq5wHJDsAWV2Ue-.html
      Complete NumPy Tutorial for Beginners - czcams.com/play/PL4GjoPPG4VqNz8W3JRDD-uRcM9WVJHYve.html
      Data Transformation and Analysis with Pandas - czcams.com/play/PL4GjoPPG4VqP0BNdnIZQqjCYodmtFCcee.html
      Visualization in Python with Matplotlib - czcams.com/play/PL4GjoPPG4VqN4dsP39m4QfpZSUrv2y8Iu.html
      Visualization in Python with Seaborn - czcams.com/play/PL4GjoPPG4VqOAwSNw2I-PXUcjw1frHmW2.html
      Data Science Playlist - czcams.com/play/PL4GjoPPG4VqOmyh7hQ730evtLaz04LwSf.html
      Statistics Playlist - czcams.com/play/PL4GjoPPG4VqMAGTXiPYBHXgBu9Da1qrOs.html

  • @3rdEyeSpiritual
    @3rdEyeSpiritual Před rokem +1

    Thanks good video, if possible please put the excel file (SASHELP.CARS0. file that used in above video , so that we can load and try practice same. thanks

    • @learnerea
      @learnerea  Před rokem

      Glad you liked it.
      If you mean the dataset sashelp.cars then it's available in all the sas packages...you can start using the same way as it's shown in the video.
      if there is some data sashelp.cars0 which we have used to explain in the video, please help us with the time stamp when you see this table name... we will try to upload the data on github and you can download it from there

  • @GajendraThapa-np9tv
    @GajendraThapa-np9tv Před 10 měsíci

    Could you please share datasets all_cars_summ and cars_summary at 19.02?

    • @learnerea
      @learnerea  Před 10 měsíci

      would you mind putting timestamp here when you see these datasets being used.. that will help us to quickly find

    • @GajendraThapa-np9tv
      @GajendraThapa-np9tv Před 9 měsíci

      @@learnerea 19:02

    • @GajendraThapa-np9tv
      @GajendraThapa-np9tv Před 9 měsíci

      @@learnerea and 26:12

  • @dominicmutiso1502
    @dominicmutiso1502 Před rokem +2

    Is this a complete guide to prepare for the SAS advanced exam on Macros?

    • @learnerea
      @learnerea  Před rokem

      This has been made keeping organisational requirements in mind, not really sure if this covers all that comes in the exam

    • @dominicmutiso1502
      @dominicmutiso1502 Před rokem

      @@learnerea thank you.

  • @subho95
    @subho95 Před 8 měsíci

    How to do the same thing in Python?

    • @learnerea
      @learnerea  Před 7 měsíci

      better you should mention a problem statement here which you would like to solve in python same as it is solved in SAS using Macros

  • @mariemargaryan1995
    @mariemargaryan1995 Před rokem

    hi friends, who can help me with this?
    i should create call dataset from SASHELP library.
    Create macro variable that will be used to filter the dataset BASEBALL to keep observations where player’s Surname isn’t starting with “W” letter.
    Create a macro program to count how many players are playing -
    a) in the same DIV and in the same TEAM,
    b) in the same LEAGUE and at the same POSITION.

    • @learnerea
      @learnerea  Před rokem +1

      you don't necessorly require a macro, try this -
      data call(drop=last_name);
      set sashelp.baseball;
      /*separate last name from the full name */
      last_name = scan(name,2,",");
      /*filter for those whose surname doesn't starts with w */
      where substr(lower(name),1,1) ne 'w';
      run;
      /*use proc frequency to get the counts by team and div you are looking for */
      proc freq data=call;
      tables team*div/nocum nopercent norow nocol;
      run;

  • @sourabhsahu3419
    @sourabhsahu3419 Před 2 lety

    👍

    • @ARjunSIngh-np1fe
      @ARjunSIngh-np1fe Před 2 lety

      How can we store a date so that whenever we run a program next time it picks the date when the program was last executed...

    • @learnerea
      @learnerea  Před 2 lety

      If you put this with an example... I'll be able to provide you the solution specific to that... which will be helpful for you...

  • @somcana
    @somcana Před rokem

    Why I am having problem when I use work library? OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
    94 ODS HTML CLOSE;
    95 &GRAPHTERM; ;*';*";*/;RUN;QUIT;
    96 QUIT;RUN;
    97 ODS HTML5 (ID=WEB) CLOSE;
    98
    99 FILENAME _GSFNAME;
    100 DATA _NULL_;
    101 RUN;