I am certified SAS programmer in England.It's a very good video to learn macro and sql
@khkrishna742720 күн бұрын
Nice
@PavanKumar0.920 күн бұрын
Thanks for the video, now if we have seven variables we keep 7 in col, what if we don't know the number of variables? The variable might hold
@kiranvenna20 күн бұрын
one way to handle this by using a simple macro variable as shown below. data words_in_string_not_sorted; length before_sort $40; before_sort="sat rat bat cat mat eat"; output; run; proc sql; select max(countw(before_sort)) into :varnums from words_in_string_not_sorted; /* code to sort words in a String in SAS*/ data words_in_string_sorted; set words_in_string_not_sorted; final_var= cats ('col', countw(before_sort)); array col(&varnums) $ _temporary_ ; /* creates col1 col2 col3 col4 col5 col6 temporary elements*/ /* scanning and extracting each value and assigning to each variable*/ do i=1 to countw(before_sort); col{i}=scan(before_sort, i, " "); end; call sortc(of col(*)); after_sort=catx(' ', of col{*}); drop i; run;
@PavanKumar0.919 күн бұрын
@@kiranvenna thanks for the reply, got it now 👍🏻
@vipulkaushik229421 күн бұрын
Make videos on proc sql
@kiranvenna20 күн бұрын
I have made lot of videos on Proc SQL including a proc sql tutorial which is 3:30 hrs long check it out. kzbin.info/www/bejne/nXzYpJKVh5d8aNU
@PavanKumar0.921 күн бұрын
Can you please make a video on different types of call routines and its applications?
@kiranvenna20 күн бұрын
Let me see but in below mentioned video I use call sort a particular call routine which is helpful to solve a problem. kzbin.info/www/bejne/bomTgaOqhLuggrs
@PavanKumar0.920 күн бұрын
@@kiranvenna sure thanks
@lord_voldemort4427 күн бұрын
i have now reached the end of your playlist for proc sql. thanks so much for this!!!!!
@lord_voldemort4429 күн бұрын
you are amazing man
@weenoodАй бұрын
Excellent way of explanation Kiran. I was asked in an interview where the scenario is - to join Database table with SAS table. I said we can do it only by Libname statement. Correct me if i am wrong. Please continue this ETL series. That will help us - Vinod
@kiranvennaАй бұрын
Your answer was correct
@milenah7796Ай бұрын
Good explanation! Thank you.
@vaibhavdalvi8355Ай бұрын
Best SAS Teacher 💪🏻
@PavanKumar0.92 ай бұрын
If a and not b , if b and not a .....am I right?
@kiranvenna2 ай бұрын
you can always use a=1 to a, a=0 to not a but you can also do from if (a=1 and b=1) and salary=updated_salary then flag='No change'; if a=1 and b=0 then flag='No change'; to if ((a=1 and b=1) and salary=updated_salary) or ( a=1 and b=0) then flag='No change';
@PavanKumar0.92 ай бұрын
@@kiranvenna got it.. thankyou 😀
@pandurangtambe69212 ай бұрын
Supps my string below OmSaiRam How to resolve by using anyupper function
@kiranvenna2 ай бұрын
what should be output?
@kumarv20272 ай бұрын
Thank you sir
@otzullu2 ай бұрын
I need SAS 9.4 Software File Link Please Can You Provide
@kiranvenna2 ай бұрын
You have sas on demand for analytics, which is free for everyone.
@otzullu2 ай бұрын
@@kiranvenna i want clinical sas software
@nodrogguod2 ай бұрын
Thank you. I like you videos and I learn something each time. Could you please put a link to the data that you or your github repo use so we can follow at home.
@kiranvenna2 ай бұрын
Thanks for kind comments. Usually I tried to give a link for sample data and code in my github repo, but I forgot for this one. Code and sample dataset discussed in this video is available at below link. I have also this github link in description now. github.com/kiranvenna/KZbinproblems_code/blob/master/consequtive_day_vid.sas
@purushotham7142 ай бұрын
Hi sir I have increased 10 efg subject records like in that consecutive days added in between record's , but new_val value does not become zero it is coming 999 only
@kiranvenna2 ай бұрын
Can you paste the sample data here. I can check that.
@vipulkaushik22942 ай бұрын
Very interesting👌👌🙏
@purushotham7142 ай бұрын
Hi sir, please help me below scenario Hiw can we call all macros stored in one folder , at one time
@kiranvenna2 ай бұрын
Hi, Not sure what exactly what you would like to achieve.
@amitsawardekar04142 ай бұрын
Hi I tried but still data is getting truncated...can you help me I have 5-6 excel sheet to complie in single dataset for further classification
@kiranvenna2 ай бұрын
How are you reading excel data.
@amitsawardekar04142 ай бұрын
@@kiranvennaindividual excel import in sas and with same header and format...then I use your query to combine... But still data is truncated basis on first table...
@niteshsoni14082 ай бұрын
I have noted, if warning or error is splits into multiple lines then ....we can search only the first line where it find the keyword. Any suggestions to find the entire text of warning or error.
@kiranvenna2 ай бұрын
I have not see when a particular error or warning in multiple lines. for example WARNING: Multiple lengths were specified for the variable var by input data set(s). This can cause truncation of data. All of above warning is one line. If you find anything which has multiple lines then let me know.
@AnilKumarnn2 ай бұрын
TIL: The forward rescan rule for macros.
@Shradha_K2 ай бұрын
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 ;
@nithingowda16783 ай бұрын
how to extract the value of the maximum count sir ??
@kiranvenna3 ай бұрын
Please provide simple input and output, i can help you
@nithingowda16783 ай бұрын
Excellent explaination sir
@Hitman1105PSN3 ай бұрын
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.
@shazhu24553 ай бұрын
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.
@sudheerupputuri9324 ай бұрын
Awesome technique Sir, extraordinary stuff of yours in SAS programming.
@PavanKumar0.94 ай бұрын
Sir, how do we fix the length if the variable length is differing?
@kiranvenna4 ай бұрын
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.94 ай бұрын
@@kiranvenna thanks much ❤️
@vamsikrishnakandagatla79374 ай бұрын
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
@kiranvenna4 ай бұрын
Hi, I did not completely understand your question.
@vamsikrishnakandagatla79373 ай бұрын
I am asking that if the loglines are there how it will merge... Please
@PavanKumar0.94 ай бұрын
Thank you so much sir ❤❤ Appreciate your efforts and knowledge 🙏🙏
@Pandimoori_krish4 ай бұрын
Super sir as share your knowledge 🙏
@93560795 ай бұрын
Please create complete etl tutorial with sas.
@figh7615 ай бұрын
can anyone help to get a free version of sas base
@kiranvenna5 ай бұрын
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
Example :-It helps to Print 1st obs 4 times 4th obs 2 times 19th obs 6 times l
@lingamounika70796 ай бұрын
Way of explanation is excellent sir
@shwetajaiswal7776 ай бұрын
Thank you, sir, for this video, it's very helpful
@vipulkaushik22946 ай бұрын
Sir make series on interview questions in sas🙏
@kiranvenna6 ай бұрын
check this playlist, this has some interview based question and answers. kzbin.info/www/bejne/f4S9ZXqca8Sbmrc
@markmuller81936 ай бұрын
Thanks this was very helpful, keep up the good work!!!!!
@64Kalalu6 ай бұрын
Link is not able to open sir. Please look into it and do needful
@kiranvenna6 ай бұрын
Thank you for letting me know. Now fixed it.
@64Kalalu6 ай бұрын
Thank you Sir
@Pandimoori_krish7 ай бұрын
Please make vedio on Diffrrence between Libname and pass thru query in points wise which functions not work in pass thru query
@kiranvenna7 ай бұрын
Please checkout this video. kzbin.info/www/bejne/hJLOdKCaiNB6oMk
@Pandimoori_krish7 ай бұрын
@@kiranvenna 🙏🙏
@ajaykushwaha42337 ай бұрын
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.
@kiranvenna7 ай бұрын
Please give me a sample input and output.
@parvsharma87677 ай бұрын
For numeric missing we can use nmiss in proc means too right?
@kiranvenna7 ай бұрын
In proc means nmiss number of missing values for each variable. In our example we are trying to find missing values by observation.
@Ongolians7 ай бұрын
Please do more short videos sir
@kiranvenna7 ай бұрын
Sure. few more are coming soon.
@rogerward80477 ай бұрын
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.
@kiranvenna7 ай бұрын
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.
@ajaykushwaha42337 ай бұрын
Salute you sir.
@ajaykushwaha42337 ай бұрын
Superb sir, I have learn lots of logic building from your channel.