SMARTTECH
SMARTTECH
  • 179
  • 463 410

Video

Understanding length while using cat functions and taking appropriate action
zhlédnutí 156Před měsícem
Understanding length while using cat functions and taking appropriate action
WARNING: Variable id has already been defined as numeric.
zhlédnutí 251Před měsícem
Understanding compilation phase in datastep is important and this video explains explains significance of how variable attributes are set in compilation phase.
How to capture warnings from your SAS Log
zhlédnutí 393Před měsícem
With help of proc printto and _infile_ we can capture specific text from SAS Log. Code for this program is at github.com/kiranvenna/CZcamsproblems_code/blob/master/_infile_.sas.
Understanding Macro variable resolution.
zhlédnutí 220Před 2 měsíci
Understanding Macro variable resolution.
How to run SAS code Dynamically depending on the day of a month
zhlédnutí 448Před 3 měsíci
This video is about how to solve problem where Text generation is needed and how SAS Macro programming helps in text generation. for Macro functions checkout: czcams.com/video/6p3lVnDiJCU/video.html for %if %then checkout out: czcams.com/video/1PeJV5ok-XM/video.html
Avoid redundant code in multiple SAS programs
zhlédnutí 415Před 4 měsíci
Avoid redundant code in multiple SAS programs
Strategies to test and resolve data issues with case When Statements
zhlédnutí 448Před 4 měsíci
Strategies to test and resolve data issues with case When Statements
Look into your SAS logs and debug your code
zhlédnutí 576Před 5 měsíci
Look into your SAS logs and debug your code
Create directory/folder if does not exist while using libname statement
zhlédnutí 363Před 5 měsíci
Create directory/folder if does not exist while using libname statement
Convert a character variable with month and year to end of the month as date in SAS
zhlédnutí 492Před 6 měsíci
Convert a character variable with month and year to end of the month as date in SAS
Solving a problem and Validating/testing your results in SAS.
zhlédnutí 871Před 6 měsíci
Solving a problem and Validating/testing your results in SAS.
How to Avoid: WARNING: Length of character variable Name has already been set.
zhlédnutí 317Před 6 měsíci
How to Avoid: WARNING: Length of character variable Name has already been set.
Are you using retain for ordering variables, be careful.
zhlédnutí 592Před 6 měsíci
Are you using retain for ordering variables, be careful.
How to capture all input datasets and libnames used in a SAS program
zhlédnutí 947Před 6 měsíci
How to capture all input datasets and libnames used in a SAS program
Pick different dataset in your process as per odd/even month number in SAS
zhlédnutí 350Před 8 měsíci
Pick different dataset in your process as per odd/even month number in SAS
Understanding the concept of self Join with an unique example
zhlédnutí 339Před 8 měsíci
Understanding the concept of self Join with an unique example
how to capture row number of observation which has at least one missing value #shorts
zhlédnutí 467Před 8 měsíci
how to capture row number of observation which has at least one missing value #shorts
Quick look of SAS merge vs SAS update statement.
zhlédnutí 386Před 9 měsíci
Quick look of SAS merge vs SAS update statement.
Finding variables with all missing values in a SAS dataset
zhlédnutí 1,2KPřed 9 měsíci
Finding variables with all missing values in a SAS dataset
DATA step if then vs Proc SQL case when statement
zhlédnutí 505Před 9 měsíci
DATA step if then vs Proc SQL case when statement
Understanding in=dataset option in a merge statement
zhlédnutí 550Před 9 měsíci
Understanding in=dataset option in a merge statement
Obtain all end-of-month dates from a start date to an end date
zhlédnutí 542Před 10 měsíci
Obtain all end-of-month dates from a start date to an end date
Creating datasets from each variable in a SAS dataset
zhlédnutí 1,2KPřed 10 měsíci
Creating datasets from each variable in a SAS dataset
Simple shortcuts to do sum on many variables with common prefix and all numeric variables in SAS
zhlédnutí 393Před 10 měsíci
Simple shortcuts to do sum on many variables with common prefix and all numeric variables in SAS
How to avoid overwriting of SAS Macro variables.
zhlédnutí 769Před 11 měsíci
How to avoid overwriting of SAS Macro variables.
Missover vs Truncover
zhlédnutí 1,9KPřed 11 měsíci
Missover vs Truncover
How same variables in different datasets in merge statement impacts results
zhlédnutí 1,2KPřed rokem
How same variables in different datasets in merge statement impacts results
Finding observations with all missing values easily in SAS #shorts
zhlédnutí 1,1KPřed rokem
Finding observations with all missing values easily in SAS #shorts
Capture datasets names of appending datasets in SAS
zhlédnutí 703Před rokem
Capture datasets names of appending datasets in SAS

Komentáře

  • @AnilKumarnn
    @AnilKumarnn Před 5 dny

    TIL: The forward rescan rule for macros.

  • @Shradha_K
    @Shradha_K Před 8 dny

    I have one question ? Data have; Input sex$ 1.; Cards; F F F F M M M ; Run; How to get output like ---> Sex F M F M F M F ;

  • @nithingowda1678
    @nithingowda1678 Před 22 dny

    how to extract the value of the maximum count sir ??

    • @kiranvenna
      @kiranvenna Před 22 dny

      Please provide simple input and output, i can help you

  • @nithingowda1678
    @nithingowda1678 Před 25 dny

    Excellent explaination sir

  • @Hitman1105PSN
    @Hitman1105PSN Před 29 dny

    I know this video is 3 years old, but I only just recently saw it (randomly looking for tips and tricks in SAS). The 2nd version of the code will not work; there is a logic flaw. The value for NEWVAR in obs 4 will be null. For the 4th iteration, the COUNT variable will still have a value of 2, and it will meet the condition of setting NEWVAR to MONTH4, overwriting the original 'C' from MONTH3. The original version of the code is the correct way. Just thought I'd mention that in case anyone else is still watching this in 2024.

  • @shazhu2455
    @shazhu2455 Před měsícem

    Very nice tutorial! A couple of important points you didn’t mention: 1. When you use NODUPKEY to remove some records, it keeps the first record in the data (or last one using DESCENDING option before BY variable). If you want to keep different ones, you need to do some manipulation of the data. 2. When you use all variables after NODUPKEY, It’s an equivalent of using NODUP.

  • @sudheerupputuri932
    @sudheerupputuri932 Před měsícem

    Awesome technique Sir, extraordinary stuff of yours in SAS programming.

  • @PavanKumar0.9
    @PavanKumar0.9 Před měsícem

    Sir, how do we fix the length if the variable length is differing?

    • @kiranvenna
      @kiranvenna Před měsícem

      Pick the length of variable where it is max. Avoid datastep and use Proc SQL (if possible) whenever you cannot max length of variable.

    • @PavanKumar0.9
      @PavanKumar0.9 Před měsícem

      @@kiranvenna thanks much ❤️

  • @vamsikrishnakandagatla7937

    Sir thank you for sharing but to do proper merging or joining we need as first explained id, age ,salery 3 records but not should not show the age proper output

    • @kiranvenna
      @kiranvenna Před měsícem

      Hi, I did not completely understand your question.

    • @vamsikrishnakandagatla7937
      @vamsikrishnakandagatla7937 Před měsícem

      I am asking that if the loglines are there how it will merge... Please

  • @PavanKumar0.9
    @PavanKumar0.9 Před měsícem

    Thank you so much sir ❤❤ Appreciate your efforts and knowledge 🙏🙏

  • @BHARATHEEYUDU.
    @BHARATHEEYUDU. Před měsícem

    Super sir as share your knowledge 🙏

  • @9356079
    @9356079 Před 2 měsíci

    Please create complete etl tutorial with sas.

  • @figh761
    @figh761 Před 2 měsíci

    can anyone help to get a free version of sas base

    • @kiranvenna
      @kiranvenna Před 2 měsíci

      you can SAS on demand for academics for free. It is free for everyone. www.sas.com/en_ca/software/on-demand-for-academics.html

  • @venodhayachary-techstuff9146

    How to contact you

    • @kiranvenna
      @kiranvenna Před 2 měsíci

      please contact us at smarttech089@gmail.com.

  • @BHARATHEEYUDU.
    @BHARATHEEYUDU. Před 3 měsíci

    Example :-It helps to Print 1st obs 4 times 4th obs 2 times 19th obs 6 times l

  • @lingamounika7079
    @lingamounika7079 Před 3 měsíci

    Way of explanation is excellent sir

  • @shwetajaiswal777
    @shwetajaiswal777 Před 3 měsíci

    Thank you, sir, for this video, it's very helpful

  • @vipulkaushik2294
    @vipulkaushik2294 Před 3 měsíci

    Sir make series on interview questions in sas🙏

    • @kiranvenna
      @kiranvenna Před 3 měsíci

      check this playlist, this has some interview based question and answers. czcams.com/video/ISZ4Gf6_hdU/video.html

  • @markmuller8193
    @markmuller8193 Před 4 měsíci

    Thanks this was very helpful, keep up the good work!!!!!

  • @64Kalalu
    @64Kalalu Před 4 měsíci

    Link is not able to open sir. Please look into it and do needful

    • @kiranvenna
      @kiranvenna Před 4 měsíci

      Thank you for letting me know. Now fixed it.

    • @64Kalalu
      @64Kalalu Před 4 měsíci

      Thank you Sir

  • @BHARATHEEYUDU.
    @BHARATHEEYUDU. Před 4 měsíci

    Please make vedio on Diffrrence between Libname and pass thru query in points wise which functions not work in pass thru query

    • @kiranvenna
      @kiranvenna Před 4 měsíci

      Please checkout this video. czcams.com/video/NakCmdSkGjg/video.html

    • @BHARATHEEYUDU.
      @BHARATHEEYUDU. Před 4 měsíci

      @@kiranvenna 🙏🙏

  • @ajaykushwaha4233
    @ajaykushwaha4233 Před 4 měsíci

    Sir i have a question suppose we have 3 different id with multiple observations. And i want to impute missing value with their mean vallue then how can we do that. for each id mean value will be different.

    • @kiranvenna
      @kiranvenna Před 4 měsíci

      Please give me a sample input and output.

  • @parvsharma8767
    @parvsharma8767 Před 4 měsíci

    For numeric missing we can use nmiss in proc means too right?

    • @kiranvenna
      @kiranvenna Před 4 měsíci

      In proc means nmiss number of missing values for each variable. In our example we are trying to find missing values by observation.

  • @Ongolians
    @Ongolians Před 4 měsíci

    Please do more short videos sir

    • @kiranvenna
      @kiranvenna Před 4 měsíci

      Sure. few more are coming soon.

  • @rogerward8047
    @rogerward8047 Před 4 měsíci

    I am sorry you had to delete my comment. It was just an idea for a video. I'll unsubscribe do i don't mistakenly post another comment.

    • @kiranvenna
      @kiranvenna Před 4 měsíci

      I did not delete your comment. Why would I will delete your comment. In fact always love your comments. Please feel to comment anything. Not sure what you commented earlier, please feel free to comment. In fact if you have an idea, I would love it.

  • @ajaykushwaha4233
    @ajaykushwaha4233 Před 5 měsíci

    Salute you sir.

  • @ajaykushwaha4233
    @ajaykushwaha4233 Před 5 měsíci

    Superb sir, I have learn lots of logic building from your channel.

  • @ashfaqahmad7171
    @ashfaqahmad7171 Před 5 měsíci

    Thank you 👍🏻 for this video

  • @sudheerupputuri932
    @sudheerupputuri932 Před 5 měsíci

    Please clarify how the consecutive missing values in the middle were (for E id) are not counted with the both the ways? And what if we need to consider this scenario also?

    • @kiranvenna
      @kiranvenna Před 5 měsíci

      if we want to every consecutive values then we should count from beginning and we should apply logic in such a way that if we find a missing value followed by missing value then we should not count or if last value is only missing value we should not count. please check the logic below. data have; input @1 id:$3. var1-var12; cards; A 1 2 3 . . . . . 1 1 1 3 B . 3 2 1 3 2 1 . . . . . C . . . . 1 2 3 1 2 3 2 . D 3 . 1 . 3 . 1 . 3 . 1 . F 1 3 . . 1 3 . . 1 3 . . E 3 2 1 . . . . . 1 1 1 3 G 3 3 2 1 3 2 1 . . . . . H . . 1 3 3 1 2 3 1 2 . . I 3 . 1 . 3 . 1 . 3 . 1 . J . . . . . . . . . . . . ; run; data want; set have; array nu(12) var1--var12; count_consq=0; do i=1 to 12; if nu{i}=. then count_consq=count_consq+1; if count_consq= 1 and (nu{i} ne . or i=12) then count_consq= 0; end; drop i; run;

    • @bluebird30318
      @bluebird30318 Před 4 měsíci

      @@kiranvenna hello, thank you for this video. using the code above, do you know how I can include a count of 2-5 consecutive values over a threshold (example: values >55 minutes)?

  • @user-bu7vv4zt9t
    @user-bu7vv4zt9t Před 5 měsíci

    I tried %let dsn=sashelp.class; and then trying to apply proc sort (PROC SORT DATA=&dsn ; BY SEX; RUN;)step its not working why? do u have any idea ?

    • @kiranvenna
      @kiranvenna Před 5 měsíci

      What is the error message. Check the error message. This helps us to understand things better. Always run code without macro variables first and see what happens. If you do proc sort data=sashelp.class; run:. Clue that will not work either and why it will not work and why it does not work. It will be in your log

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

    Sir, kindly create a video on symmetry macro function.

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

      I have never heard about that.

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

    Clever! Thank you!!! I run into this problem at least twice a week.

  • @ajaykushwaha-je6mw
    @ajaykushwaha-je6mw Před 6 měsíci

    Is there a way to group variable and then use lag function so that one id value does not go to second id.

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

      Once you are done with lag function in which you have lag from from one id to another. All you need to say is . if first.id then newcolumn= .

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

    Thank you sir for such a helpful video.

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

    Hi Sir..Thanks for posting videos. I am learning macros and I have a doubt regarding %global statement. Could you plz clarify. %macro win; %global name country; %let name=Sunny; %let country=India; %MEND Win; But I am unable to resolve the macro variables. Pls help me on this and Thanks in Advance!

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

      to resolve macro variable you need to use %put &name &country; %global makes macro variables accessible to the whole sas session other wise they are avaiable only for that particular macro. Please checkout my video on scope of SAS macro variables to understand more about %global. czcams.com/video/qVfu_hvhXaA/video.html&pp=ygUPc2FzIG1hY3JvIHNjb3Bl

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

    If i want to assign the smaller length than the existing length in dataset in that case we will get a warning even if we give before the set statement

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

      Yes it will give warning in log like multiple length were specified for given particular variable, and again it will change the length for given particular variables.

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

    Thanks for the quick explanation . Is there any alternative way to do that except doing in another data step?

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

      Attrib or length statement before set statement should work.

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

    This is ingenious! Thank you!!!!

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

    If you use the implicit method you can use the name you give the connection in your join sections. If you use the pass through method, you have to use the schema name for the joins. Also if you are using pass through you have to be aware of what kind of database you are connecting to and which functions it supports. the SAS datetime function will not work in a POSTGRESQL passthrough but will work in a ORACLE passthrough, you would have to do something like "cret_dt::timestamp::date" instead of datetime(cret_dt) for POSTGRESQL. However in a implicit connection, you can use all of the SAS built-in functions since its not an instance in another database. Amazing video.

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

      Thank you and correct observation.

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

    Does select statement works before than having statement?? Generally excution order from -where -group by- having- select - order by. By using having clause with new variable , you have filtered the data . As per order select works after having. Then when you use calculated variable it's working how . Please help me...

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

      Can you me a specific example. Select works after having clause.

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

    Thankyou so much sir.

  • @azadkhan-lv9pr
    @azadkhan-lv9pr Před 8 měsíci

    How can i get vaccancy information

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

      Please see in job portals or people whom you know who work in industries.

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

    Very informative sir❤

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

    Sir, we can do this by using an Array as well. right? If yes, then please explain by using an array statement as well. One more request is to please do a topic on Hash objects, rsubmit programs. Thank you for providing practical scenarios.

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

      Yes we can and similar(not same ) video with array concept is czcams.com/video/RwbsnYUyP1w/video.html. Will try to work on hash objects sometime in future. Appreciate your comments

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

    Very useful. Never imagined the same table could be self-joined or that the ON variable could be set as negative!

  • @Prabhu.Vlogs1
    @Prabhu.Vlogs1 Před 8 měsíci

    Thank you 🙏

  • @varatharajkumarvenkatachal5679

    Thank you for the video. It would be good if you could share the SAS Code so that we can try and experience it

    • @kiranvenna
      @kiranvenna Před 9 měsíci

      SAS code at this link. github link for this code at github.com/kiranvenna/CZcamsproblems_code/blob/master/variableswithallmissingvalues.sas

  • @aanchalsrivastava8550
    @aanchalsrivastava8550 Před 9 měsíci

    Can you show one scenario where to create a table in proc sql add a column which can be blank

    • @kiranvenna
      @kiranvenna Před 9 měsíci

      you mean why do we need new column with blank after sometime of creating table. Is that is what your doubt is

    • @aanchalsrivastava8550
      @aanchalsrivastava8550 Před 9 měsíci

      @@kiranvenna no I just need example to add a new column in table which can be blank like a student table add a new column student name which can be blank.

  • @BHARATHEEYUDU.
    @BHARATHEEYUDU. Před 9 měsíci

    Sir where is notes in description

    • @kiranvenna
      @kiranvenna Před 9 měsíci

      This was written in the description. I am making this video as someone has asked this question. This is more of interview type answer than real world scenario. Proc SQL does not have features to do this kind of problem solving. This are more easily solved using a data step or proc rank. Also whenever we use outobs option we will see WARNING: Statement terminated early due to OUTOBS=3 option in the log. For any queries please contact us at smarttech089@gmail.com.

    • @BHARATHEEYUDU.
      @BHARATHEEYUDU. Před 9 měsíci

      @@kiranvenna Thank you sir your vedios very useful

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

    I love this one! I've tended to avoid using into with proc SQL, but I'll give it a whirl now. Thanks a million!