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

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • 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/LEA...

КОМЕНТАРІ • 71

  • @rameshbalami2075
    @rameshbalami2075 3 роки тому +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

  • @sandeepmane8694
    @sandeepmane8694 3 роки тому +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

  • @TheSafi4027
    @TheSafi4027 2 роки тому +2

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

  • @ajaytodankar2864
    @ajaytodankar2864 3 роки тому +3

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

  • @nithyaangamuthu6782
    @nithyaangamuthu6782 2 роки тому +2

    Explained very clearly. Thank you so much.

  • @osamahmood1678
    @osamahmood1678 2 роки тому +1

    Thanks for this very informative tutorial on SAS Macros and Debugging

  • @memoriesforlife7685
    @memoriesforlife7685 3 роки тому +1

    clearly understand macros and very useful for beginner to

    • @learnerea
      @learnerea  3 роки тому

      Thank you for complement

  • @sakwael
    @sakwael 2 роки тому +2

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

  • @meghajain4544
    @meghajain4544 2 роки тому +1

    VERY NICE. U HAVE EXPLAINED VERY EASILY

  • @tomasknor9575
    @tomasknor9575 8 місяців тому +1

    Thank you for your tutorial.

    • @learnerea
      @learnerea  7 місяців тому

      You are welcome!

  • @ashokballipalli237
    @ashokballipalli237 3 роки тому +2

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

  • @bishwarup1429
    @bishwarup1429 2 роки тому +1

    Very useful tutorial. Thank you sir.

  • @bhanuchandar2805
    @bhanuchandar2805 3 роки тому +3

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

  • @guillermoramos4043
    @guillermoramos4043 Рік тому +2

    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  Рік тому +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

    • @emtinantarek225
      @emtinantarek225 11 днів тому

      @@learnerea this starts from the minute 40:00 , because the output type includes Hybrid too

  • @JoelHernandez-vs1kn
    @JoelHernandez-vs1kn Рік тому +1

    Gracias

  • @sabyasachiojha3723
    @sabyasachiojha3723 2 роки тому +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.

  • @kidsplayhouse4931
    @kidsplayhouse4931 3 роки тому +2

    Please do interview questions on healthcare analytics on sas

  • @monikapatil5537
    @monikapatil5537 9 місяців тому

    Thank you so much Sir......

  • @deepakkumaar9665
    @deepakkumaar9665 3 роки тому +1

    Awesome sir

  • @aspiren81
    @aspiren81 2 роки тому +1

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

    • @learnerea
      @learnerea  2 роки тому

      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

  • @dominicmutiso1502
    @dominicmutiso1502 2 роки тому +2

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

    • @learnerea
      @learnerea  2 роки тому

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

    • @dominicmutiso1502
      @dominicmutiso1502 2 роки тому

      @@learnerea thank you.

  • @3rdEyeSpiritual
    @3rdEyeSpiritual 2 роки тому +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  2 роки тому

      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

  • @ashokdevendra8978
    @ashokdevendra8978 3 роки тому +1

    Super

  • @7979sunny
    @7979sunny 7 місяців тому

    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!

  • @raninamburi3280
    @raninamburi3280 Рік тому +1

    Hi Sir, do you teach R and python?

    • @learnerea
      @learnerea  Рік тому

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

  • @Izumi1703
    @Izumi1703 2 роки тому +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  2 роки тому

      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 2 роки тому +1

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

    • @learnerea
      @learnerea  2 роки тому +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 2 роки тому +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  2 роки тому +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

  • @GajendraThapa-np9tv
    @GajendraThapa-np9tv Рік тому

    Could you please share datasets all_cars_summ and cars_summary at 19.02?

    • @learnerea
      @learnerea  Рік тому

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

    • @GajendraThapa-np9tv
      @GajendraThapa-np9tv Рік тому

      @@learnerea 19:02

    • @GajendraThapa-np9tv
      @GajendraThapa-np9tv Рік тому

      @@learnerea and 26:12

  • @AnkitaSingh-yg8cz
    @AnkitaSingh-yg8cz 3 роки тому

    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  3 роки тому

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

  • @mariemargaryan1995
    @mariemargaryan1995 Рік тому

    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  Рік тому +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;

  • @subho95
    @subho95 10 місяців тому

    How to do the same thing in Python?

    • @learnerea
      @learnerea  10 місяців тому

      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

  • @sourabhsahu3419
    @sourabhsahu3419 2 роки тому

    👍

    • @ARjunSIngh-np1fe
      @ARjunSIngh-np1fe 2 роки тому

      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  2 роки тому

      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 Рік тому

    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;

    • @learnerea
      @learnerea  Рік тому

      can you put your code as well

  • @wenjiezhou8888
    @wenjiezhou8888 2 роки тому +1

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