hello viewers welcome to great online training this is naidu i'm a sas trainer and programmer and working in one of the mnc in india so in this video i will explain clinical sas programming tutorial for beginners this particular tutorial mainly for people who are from non-iit background people who don't have a programming background so can watch this video so that you will get a complete picture of a clinical sas programmer roles and responsibilities and how we can start the program and all so let's get started [Music] topics covered in this video what is clinical sas introduction to a clinical sas training role of a sas programmer in a clinical trial how to start writing a sas program and what is c disk what is sdtm what is adam and what is a tls who are all eligible to learn this course job scope of a clinical sas programming how to learn clinical sas programming step by step question and answers so is there any questions or concerns so please write it in the comment section so that i'll reply back to you so if you like the video please click like and subscribe to my channel so that i will just upload more videos like this so that you will get a complete understand of assass and all the sas related information so you will get it quickly and activate the bell icon for uh notifications and is there any training related queries so please contact me so using this number so which is there uh displayed right now and you can use my website also for more details like how many days duration and what exactly we are teaching and course content and all the information you can able to find out in our website it's a great onlinetraining.com so there you can find all the details so you can register for a free demonstration with us in our website it's a completely free so you just see how these things are working like what is this clinical sas and all so like you are just listening this video it is a recorded video session of my existing classes so you can just attend a live session with me so you can ask the questions or concerns whatever you have it so you can directly talk to me if you like we can continue for around uh 60 days of this particular training so in this all we are going to cover so we will see in detail so here i'm just keeping up to uh 10 hours of this particular video so that you will get a complete understand of a clinical sas programming role so based on that so you just decide whether you want to go with this particular this particular course as a career for you or else you decide if it is difficult for you you can't able to manage so then you please keep this particular course so it's not required so to continue anymore but however so you have to just watch this video then only you will get a complete understand of a clinical sas programmer right so let me just jump into the main topic of today's one what is a clinical size clinical sas is nothing but using a sas software in a clinical industry we call it as a clinical sas so that means clinical in the sense of most of the pharmaceutical companies they are using a software for a reporting purpose what type of reporting purpose we do is there any drug before releasing into the market definitely the drug should undergo some of the clinical trial so based on that particular clinical trial if the drug is working well so that information will be passed as a data to the sas programmer sas programmer will analyze that particular data and submit it to the fda for approval process once the fda approved that particular drug so that organizations like like johnson johnson lily are about like a mini organization many big pharmaceutical companies they want to release their drugs definitely they need to get approvals from the fda so once you get a permissions to release the drug so that so that is available to the market and so that the sponsors the persons who are just investing the money on that particular drug they can start earning so before that before just releasing into the market so the clinical sas programmer role is very important so let me just explain in detail about that first of all clinical trial so clinical trial is nothing but it is a process of a testing a drug so in this particular process what exactly uh the doctors or nurses they do is they'll just in introduce rl they just administered that particular newly invented drug to the human bodies this particular drug is already done with the preclinical trials on the testing on animals and all so once that is passed then only fda will allow us to do practicals on human beings so the trials which are conducting on human beings we call it as a clinical trials trials which are conducting on animals we call it as a pre-clinical trials so the clinical trial process will be start here so injecting a drug into the patient so once the patient is indeed injected every few hours of every few minutes we take uh some information from the patient after giving a drug to the patient how your condition is like right now so but just imagine the person is suffering with a fever which given a ferrous admin maybe first 20 minutes is this particular any effect is that particular headache is reduced rlc is that particular temperature is reduced is there any change in the heart rate is there any change in the blood pressure so these are all those things we will just take it on a one particular paper format so for one person one particular paper we are just filling continuously for all the one patient details like that around 100 patients are participated all the 100 patients wise there are a lot of doctors a lot of nurses available to do this clinical trials everyone they just take that particular patient's information individually on the paper so that paper information will be send it to the cro organizations that's paper information will be converted as a data so data in the sense okay zero zero one percent and this is all the number of records number of records in the sense number of rows will be created for that particular patient like that that type of data will be uh given to the cro organization so cr organization enter the data into the databases and they'll give a permissions to a sas programmer to load that particular data into from the database to the sas programmer so that means sas software it will be get loaded so then you can start writing a program okay what do you want it number of people who are suffering with a side effect as a headache after taking a medication within a five minutes of time okay so we need that as a report if you want to generate it yes you can generate it number of people who cured this particular disease within just a span of 10 days of time of continuous using of this drug so we need all the persons who are get cured as a report you want it so you can produce that report by using sas software finally these reports we will generate it in the form of a pdf document or rtf document writing some program so that we try to prepare a document format and that will be submitted to the uh fda so based on that particular report fda will look into it and they'll also do a proper review and finally they decide if they want to release it into the market they'll given approvals to this particular drug to release into the market so this is the total uh sas programming role so clinical trials data will be get it as a sas programmer that data you need to report it as a a proper report format and that report we will submit it to the fda for approval process so you need to know one thing here very clear any drug in the world releasing into the market sas programmer job is must so that all the drugs should undergo from sas programmers only so there are a lot of demands from every organization is there any drug released into the market so definitely sas programmer need to depend on so the drugs are need to depend on the sas programming so that's the reason why so it is a endless job i can say so there is no scope in future or something like that you no need to think about it how far the new diseases is there in the world so new drugs will be coming into picture when the new drugs are coming definitely the sas programmer need to work so until the end so i started my career around many years back and still i am a programmer i don't know any other software than sas still i'm just maintaining as a programmer in java so as a sas program i don't need to change i don't need to learn any new courses or anything so that upgrade my skills it's definitely not required just to learn the sas that's it you'll end up with your life if you stick to it so this is the total what is clinical sas and i just explained now let me just go for what is the role of a sas programmer in a clinical trial so before explaining the role first of all you need to know what is the overall picture of a clinical trial programmer so the overall picture in the sensor protocol so protocol is nothing but a document let me just show you what is this protocol so here i have a real-time protocol what i'm just working on project so that protocol i have it so the protocol you can see so it is in a document so in this particular document they clearly mention all the information like so what is the study title so nothing but what exactly uh the study uh of this particular uh clinical trial the name of the clinical trial and what is the design so what exactly the design it's in an open label balanced randomized and two treatment two period and all right now this particular definitions uh you don't know for a while so don't worry about it we will get in detail uh picture about this in once you joined at the core so we will talk about this in detail so that no regularly we are talking on that so that you will be get familiar with this particular terminologies and the primary objectives and second secondary objectives and sample size how many people are going to be involved in this particular clinical trial and washout period nothing but so after 21 days between each drug administration so this is wash out wash out in the center once they are administering a drug after 21 days so they are just giving not giving any drug to the patient so that no the existing drug will be washed out from the human body so he's got nothing but washout period or something like that there are all those things it's already written in the protocol so protocol uh so what exactly talk about it is like a a bible to a sas programmer it is a bible to a clinical research associate it is a bible uh to a clinical data management people so everyone who are participating in the clinical trial they must read the protocol so protocol will guide us what to do right so in the clinical sas programming field also it's the same so you have to know what is protocol even once you get a job as a sas programmer within a first few weeks of time they will give you this protocol uh to you to just read it so the reason behind that is so you have to get an idea of a this particular total clinical trial process and this particular project then only you can do something you can perform something so once you get a job today suppose just imagine today you got a job around two weeks of time they'll give you to just read and understand the data and protocol and all you are from a newly joined person or else you are experienced as programmer still they'll give you this protocol to you to read it okay so this is very common for freshers also they will give this protocol even for experienced person also they will give a protocol within a one or two weeks of time they'll just allow you to just read and understand so once you read and understand and you got some data and some information and based on it so that is the a protocol purpose in real time what happened you know in this particular clinical trial process once you have approved protocol so that that is a green signal to do the clinical trial so in that case what we have to do so we here means it's a cro organizations cro organizations will look for hospitals to do the clinical trials so clinical trials is nothing but clinical trial sites is nothing but hospitals sometimes you may get all the patients in one hospital just imagine around 100 persons who are suffering with the cancer we required because our newly invented drug it's just for treating a cancer so we cannot get all the 100 uh patients in a single hospital so that there is a chance that you need to search for a multiple hospitals that's the reason why sometimes we call this particular type of studies as a multi-center study center is nothing but hospital multi-center means multi multiple hospitals is involving into this particular clinical trial process so you need to go for trial a site selection process suppose imagine around 10 hospitals or something like that each hospital 10 members so that 100 members will be fulfilled so each hospital you may not get it from the one city maybe from the it's a different city some of the hospitals you will get in hyderabad some of the hospitals in new york and some of the hospitals may be in china some place and something like that if it is a multi-center study so that the each hospital is available in different different locations the clinical trial process will be conducted in different countries the same clinical trial will be conducted in different countries sometimes the reason is if they want to release this particular drug into their countries so definitely the drug should undergo some clinical trial on that country also that's a reason why most of the clinical trials are multi-center trials so that they also do the clinical trial in their uh countries so that so you can easily get approval so from the local ethics committee so to release this particular drugs into the market right that is the main purpose so sometimes multi-center sometimes it is a single center let it be however it is so it is in a a proper hospital they will select it to do this particular clinical trial once the hospital is selected and the next one is you need to get approvals from the local ethics committees so local ethics committees means every uh country have a different local ethics so in india we follow uh some type of local ethics and whereas uh u.s some type of local ethics so we need to get an approval from this particular local ethics committees so these ethics companies what they do is it's a human being life mostly so there are set of guidelines we need to follow while doing a clinical trial so they'll give you that particular clinic they'll give that particular a complete picture of this particular local ethics committee so rules and regulations if that follows then the next thing is patient recruitment once the ethics committee is there saying it yes you can continue with the clinical trial then the cro organization start recruiting the patients so how they can recruit they cannot recruit all the patients into the clinical trial again in the protocol they clearly said some of the rules inclusion criterias and exclusion criterias that means who are all included who are all excluded the patient must be 18 years old the patient should not be alcoholic habit the patient should not having a tobacco habit patient should not have should not take any other medication during this particular clinical trial process and all those stuff it is generally we have it in our clinical trial process so in this based on that particular protocol so the investigator doctor will look into all those rules and then only they'll start recruiting it you just see around seven members in this particular line only one person is got selected you can roughly take it only that person is eligible to the clinical trial remaining all the persons are screen failure screen failures in the sense this particular process we call it as a screening so around one person is selected that means only one person is enrolled enrolled in the sense if that person is enrolled for this particular clinical trial and reminding all the persons is screen failure so this information also is important to submit to the fda how many possible how many patients are excluded from this particular clinical trial so except this first person reminding all the persons in this batch is excluded so like that one person is got selected like this around 100 persons is required for this particular clinical trial process so like that each and every time that means each and every hospital they do the clinical trial process they'll start recruiting the patients and they'll recruit only the persons which are following or which are obeying all the clinical trial protocol information related things then only they will participate in the clinical trial otherwise they will be excluded from this particular clinical trial process this exclusion we call it as a screen failures so the patient will be get screen fail loan and finally you can get that information as a case report form what is this case report from okay patient is recruited okay the tick mark one patient is there with us in front of you so then what information you will take it from the patient so very simple we will just inject the drug before inject also we will take all the vital signs of the patients like how the temperature of the person what is the bp blood pressure what is systolic what is diastolic and what is respiration rate and what is height and what is weight and what is bmi and all this information we will just take it and apart from that we will take all the blood sample urine samples also so that no so this is how the patient condition before giving a drug this we call it as a baseline baseline in the sensor like you just take a marriage is a baseline before marriage and after marriage generally when we are doing some funny things right it's the same thing here also so before giving a drug it's a baseline so based on the baseline how the patient is uh how the patient is responding is this particular drug is working then automatically maybe just imagine the this particular drug is working for reducing a bp diastolic blood pressure to reduce it just imagine so in this case what happened it should be lesser than normal after giving a drug that's what we are expecting so initially maybe we having around 120 so after giving it uh sorry 180 we have it after giving a drug it may be 160 then how you get to know that around 20 percent 20 units is get reducted based on your previous results only so baseline results before giving a drug so anything to the body so we will take all the condition from the patient so that is your baseline results how we take it by using a crf let me just show you how the crf is looks like so that what type of information we will capture it from the patients who will see one by one for that first of all let me just go for a document here and go for a crf so this is my crf here and you can see so the crf information first the crf is talking about site id as i said around 10 hospitals is there in your clinical trial process though first hospital may be zero one second hospital is zero two zero three something like that you have it and subject numbers subject numbers in the sense so zero zero one so in this particular hospital he is the first person so that zero zero one so zero one is the site number and zero zero one is your subject number subject initials so subject initials in the sense my name is naido i'm a uh acting as a patient so ndu as a subject initials and date of birth so date of birth means when i just born so my date so date in two digits and month should be in a three digits format three digits in the sense j a n j u n so like that we need it as a date three months three digits of your month is required and year so when this particular clinical trial happen actually if it is happen in 2000 so that sorry uh it is mostly what happened you know it is already filled with two digits as 19 because so 19 onwards one may be there is a chance that you will not get a patience more than 100 years of span so mostly you will get it when he born is it 19 or maybe so if it is a pediatric trial so pediatric trial what happened you know so even this also it is not there so it is just everything is blank so that you need to fill the ears also and belongs to what so i'm belongs to asian because i'm from india so all the asian relation related people will be belongs to this here asian or maybe you are like a american indian so that means you are living in a uh america and you are indian so that means you are nri so you are staying there for a million years so then it will be get selected with this one that means all this information uh the nurse will ask this particular patient and patient will reply to that and so that she'll tick market and she'll dispute she'll fill this particular forms so this is like a paper only so it is not electronic format or anything it is like a paper and they fill all this information from the patient after clinical trial is done for that particular day this particular paper will be scanned and submitted to the cro organization so this is like a demographic information not only demographic some other information also will be collected from the patients like alcoholics is that particular person is is there any uh never consumed person or previously consumed person or currently consumes person are again tobacco usage is it never consumed previously consumed and all this information will be collected from the patient again medical history is there any medical history of the patient like a what type of surgeries he undergo already or maybe he is already suffering with some tb so like tuberculosis so if he is suffering with all this information okay he undergone from surgery that is your serial number one he undergone from uh some medication for jaundice so that is your serial number two so that means when it is started when it is ended so it's still ongoing for till today suppose the person is suffering with uh aids so that means hiv is suffering with then automatically there will be a start date and there will be no end date so it is still ongoing because the patient is not cured with that particular disease yet so that is still ongoing it so that means all the medical history also we will take it and vital signs also like a what is the systolic blood pressure rate for today and what is the diastolic blood pressure what is heart rate what is the respiration rate what is temperature what is weight and what is height and what is bmi so bmi will be calculated based on the formula there is a formula for height and weight uh there is a formula for bmi so that based on that we will calculate the bmi and we will fill that particular bmi once they feel the height and weight we will collect that particular bmi from the patient and again uh like a serum chemistry as i said we take all the blood sample within a blood we take the serum so within that serum uh like a what is the glucose level in the serum what is uh blood urea nitrogen percentage like how much of nitrogen you have it in your blood urea what is the creatinine levels what is the sodium levels calcium levels and all this information we will take it from the patient and apart from that hematology nothing but what is the hemoglobin percentage what is the hematocrit rbc wbc how this particular patient condition and like coagulation so some precipitation test right now you don't know i will explain in detail and upcoming classes to you and again what is the urine analysis what exactly happened in your urine what is the ph of urine and all those information we will take it from that particular patient like when this particular drug need to be administered to the body so and the first time the patient came to the hospital so which date and how many tablets they have given and how many are they have written given suppose we said patient today to come to the hospital and we given around five tablets and then we asked the patient to consume all the five due to some reason patient is consumed only three so he need to return around two uh need to be uh written so like nothing but when we have dispensed that means when we have given a uh medications to him and when he has how many we have given what is the end date of that particular medication how many has given and what is the compliance so is that 100 percent he compliant so out of five five uh pills so he consumed only three so three by five into 100 what is the percentage that compliance percentage we will just fill it so this is all this information and again end of the study at the end of the study sometimes the patient will be completely quit the clinical trial and sometimes death will happen sometime so uh he lost for efficacy if we get lack of efficacy in the sense so if the drug is not working so on his body then what is the use of taking a medication he himself take a decision and i'll not go for this particular clinical trend anymore i'll just discontinue it in the middle so that they'll give this reason to that lack of medication sorry lack of efficacy i'm not continue this particular clinical trial or something like that let's happen all this information will be collected from the patients so all this information this is like a this all this document whatever this 12 pages document what i'm just showing this is the only document so you will get it as a crf so case reported forms based on this report for based on this the data will be captured from the patient so this data will be submitted as a scanned copy so that this data submitted to the cro organizations so that scanned copy information will be loaded into a database so now you just come to my powerpoint presentation so this is all about your case reporting form and now the case report form information will be transferred to the cro organizations so here the lilliputs are the persons who are working in front of the computers what they do is they'll enter this data whatever the information we captured it from that particular paper format and they'll submit this data to the uh database while entering a data they'll check some validation checks also suppose somewhere you are entering a bp as a 500 actually 120 by 80 is normal so if you are entering somewhere it's a 500 the database will not allow you to enter that type of data so there are some validation checks also we have it that we call it as a elite six programming so few of the programmers in real time they'll work on this particular process that is called edit six programming okay so sas programming role is completely different from the elite six programming so here also you do like a programming job only but the problem is you will not produce any data sets or you will not produce any reports or anything it is just like some conditions okay is there any bp is greater than uh 200 then just uh they'll write a program saying that alert it so that no we will get a check that means all the persons is definitely should be lesser than 200 is there any above 200 then there will be a proper reason for it it's not it should not be a data entry mistake or something like that so those things will be validated during this particular clinical entry process also and finally they're loading the data and at the same time they will give a green signal to assass programmers to do the reporting it so reporting in the sensor we can start producing reports what reports they need it exactly what type of reports we generate it so just imagine for 10 members data so 10 members data or maybe 20 members data entered into the database and so that they are asking us to load the data for your program so that we are writing a program according to that particular 20 members data and we will produce a reports like this so just imagine what type of reports we generated as a programmer you just see see this is the report we need it subject demographic information around 100 patients we participated right so even 100 patients were wise yes so some persons it's a 20 some person it's that some person said 20 30 40 50 like that all the persons why is different age group people we needed a yen number of people how many are participated in the clinical trial i need a n and what is the mean of their age and what is the median of their age and what is the standard deviation what is the minimum of their age and maximum and there are two drugs here one is a test drug and second one is reference drug so test drug in the sense sometimes clinical trial is a comparative study comparison so that means uh they are testing this particular drug so without another competitor which is already there in the market okay so sometimes they will compare with the plasma sometimes so plasma in the sense inactive format of the drug we call it as a plasma sometimes they compare with a plasma drug and sometimes they already existing drug they'll take it as a comparative purpose and who are all suppose around uh number of observations here that means the number of people who participated in the clinical trial 100 persons so in 10 100 percent maybe 80 members is here 20 members is here okay a mean of 80 members so you will get a different mean and as well as you will get a 20 80 members mean you will get it here and 20 members mean you will get it here so like that this type of reports is the same structure as it is we need to produce it as a programmer job and we will produce the tables like this height wise weight wise and all this type of table and sometimes gender wise how many people are male how many people are female like this type of tables we will generate it or else race wise asians how many are other group how many if you want to produce it you can produce this type of tables and our programmer role is the same we need to produce this particular report is our final motto that's it so this reports we will submitted to the fda actually so we are doing the program and we are writing a program to produce this type of reports once the report is ready okay so once this particular report is ready and we will leave the program like that so that when they are entering the data for 20 more members later or maybe 30 more members later we will just need to rerun our program one more time that's it we no need to do anything change to our program we need to just rerun the program one more time so this particular number is number is right now only 20 members so that n is going to be 20 for you maybe in future it's a hundred members so that is going to be around uh 80 20 like that it automatically runs your program is automatically runs in future also so your programmer job is writing a program to get some reports ready let me just show you one of the real time uh program like exactly what we write it to get this output ready let me just show you i'm just uh opening my sas software and i'm just here i'm giving an idea like a what type of program we generally write it in real time sas project project rw23019 and here is other and sas code this is the okay so this sas code i'm just writing it and the data what they have given to me which is there on my path i'm connecting this data for my reporting purpose so this is the data we got it from the database and we are connecting the data from the database and what we do is we are just writing a program to get our program that means you see these many lines of code i have written so actually so in real time and i am just producing a report for the same let's see i'm just producing it now you can see the report is ready so this is what exactly the sas programmer job is you need to write some program to get that particular report ready sometimes if you want you need to produce the figures also that means graphical representation so like figures you can see some of the reports we need to produce the uh figures also see this type of figures also if you want to produce it yes we can able to produce it as a programmer that is also possible so our job is here in this particular place mainly uh reading the data and producing a tables listings and figures generation and that reports will be submitted to the result meeting we call it as arm within a 15 to 20 days of a time result meeting will happen so that means what happened all these particular reports what you have generated and submitted to the result meeting so this result meeting in the sensor this meeting who are all be a participant all the persons who are a programmer you will not get a chance to participate in this clinical uh result meeting this rm is only for statisticians and as well as sponsors and even the project level high level a person who just participating in this clinical trial so that will be involved into that so regular programmers you will not get a call for this invitation for this particular meeting what is this result meeting they'll decide how our drug is working is it beneficial is it not working well and all or else maybe a few other reports we will submit to the fda to showcase that yes this drug is working mainly for the female who are all around 65 above people if this particular drug is working more or something like that to showcase they'll decide what to do the next step so if they need more reports to generate they'll give a green signal again to the programmers what are the requirements so what type of reports they need to generate it and again the sas programmer will take care of it and they if they will submit that also so then finally they will submit this particular reports to the fda for approval purpose so now the fda will review the all the programs what you have written what the data you got it and everything they'll review it clearly and finally they'll decide they want to approve it or else they want to resect it if they upload that drugs will be available in your market in medical stores so this is the overall cycle of a clinical trial process reading a protocol so that means protocol to trial selection process trial site selection and after that approval process patient recruitment and the data what we got it from the patient the data will be entered into the databases and once the data enter into the database and sas programmer will access that particular data and they'll produce a reports as shown some of the reports and that reports will be submitted to the result meeting and that that information will be submitted to the fda and finally approval process this is the overall clinical trial process the main role of a sas programmer is this one you need to analyze the data and you need to produce a report according to the client requirement so this is the total picture of a clinical sas programmer now so what we do is let me just go for a next slide introduction to a sas program what i will do is how to write a simple programs by using a sas let me just explain in detail first of all let me close my sas also so that i will freshly open ss software to you so that it will be easy so if you want to or write any program in sas it must be start with a keyword sas you just enter it in your search and then click it so that what happened the sas software is just open in this particular sas software there are five windows like editor window log window output window explorer window and result window total five windows in our size so like our five fingers in a hand so each window wise some purpose in our real time okay editor window or writing the program log window checking of errors and warning messages output window is mainly to display all the information what we have produced information in the sense just now i have produced right one report so that type of reports will be as produced in your output window and explorer window mainly you can see all the place where you can store that particular data for your future purpose okay today you produce the sas and you close the sas station and tomorrow when you open it it's blank if you don't want that to be happen you are expecting this particular data to be stored in a permanent so you need to depend on your explorer window and finally a result window so result window it will show all the results what we have generated by using sas let me just explain in detail so that i will uh go through it one by one editor window by using editor window we can edit the program we can modify the program we can save we can submit we can do anything with editor so first of all what i will do is uh i'll just take a data which is there in my library just imagine client has shared some data with us in my sas help library some data is already there so go for a data called class data so class data is already there with us can you just see this data is there where what information you have it here name sex age height weight wise information we have it so this is the information we already have it so client requirement is we need the number of people who are with female with years 14 years ago how many in the data we need a report female with 14 years ago so what you do as a programmer so you start writing a program proc means procedure print means you are printing it data equal to your data set name where the data set is available it is there in your sas help library you just write it says l dot what is your data set name in this the data set name is class here so because you see here it's a class data set i'm just using it and semicolon and run what happen default it will print all the information in the data set see it is printing all the information like this around 19 observations data it is printing but i don't want it what i want it i need only females information we need it so first of all what we can write it we can write a condition called where within a where statement where sex because my variable name here you just see in my class data set it is a sex right variable name that means my column name is sex where sex equal to i'm writing only females data that means yep i'm writing it here and semicolon that's it so that what happened instead of printing all the 19 records now it will print only the female information you see only female information is just printing it earlier you just scroll up and then you can see all the 19 records you can see but now it is just displaying only females information it is displaying it here so okay within a female what we need it again we need person so with age above 14 we need it and what else the condition is because i have another variable that is my another column name which is there with my data that is called yes i need the person's age above 14 we need it so we can write where is gt gt means greater than greater than 14 i am writing it same that's it execute the same program now and run it only two persons in your data people who are females with age above 14 is two members in your total data so this is how the information is just displaying it okay all these informations wise mean is required okay if i'm just calculating height wise mean i need it okay what i will do is if you want to calculate a mean like it just now we have seen right some of the reports so you see like what type of data we what type of analysis we need it we need n also we need mean also we need standard division median minimum maximum we need it how we can produce it based on the age wise we will just produce it very simple you just write proc means data equal to your data set name that is your sas help dot class i'm just writing it okay so here var is the statement so which variable wise we need analysis based on the easy variable wise i need analysis i'm just writing it and run what i needed here according to me i need a n i need a mean i need a median standard deviation minimum maximum so if i'm default running it let's see what happened so you will get it n you got it 19 and mean you got it 13 standard deviation you got it here 1.4 minimum you got it and maximum you got it but the problem is you didn't get the median so median is there but the median is not there so if you want to get the median also so you just write it everything what you need it i need n i need a mean also i need a median also i need a minimum also i need a maximum also and i need standard deviation std also is required you run it now now you will get everything ready n mean median minimum maximum standard deviation everything you got it you see easy-wise you calculated this information our next job is just to produce the report according to this particular in this particular way right now everything in a vertical manner you see right now it is everything in a horizontal manner we need to convert this into a vertical manner because you see in your output everything is like n mean median like a rows we don't want it as a columns so that we can convert it later on stages that is our actual role as a programmer so what your job is client will always give some data to you okay that data you just take it according to the requirement and you produce that report and submit this particular report uh as a pdf document suppose today i just reproduced this report if you want this particular report as a pdf document very simple you just tell the sas to write it od yes that means output delivery system pdf so that means you just write it pdf file equal to you are writing it the path of that particular document where it is going to be stored so you have to give a location where you are expecting i'm expecting to store that particular pdf document on my new folder on my desktop so i'm just giving that particular path and click ok i'm just going there so i'm just mentioning a path here so odspdf and i'm just giving a path and giving a semicolon so file and you have to give a pdf name i'm giving my pdf name as a naidu is my pdf name dot a pdf i'm writing it here and semicolon and here also at the same time od yes that means output delivery system pdf file equal to you are just mentioning it at the path of the file so you'd pdf just close don't write it anything just close that's enough so you run this particular piece of information that's it you are producing a report according to your client requirement can you just see the pdf document is ready it automatically stored in your desktop with the name of a pdf document as an id as a name i have given you just open it this is my pdf document can you just see this i just produced the output today right so like that as a programmer what i will do is regularly i'll write a program okay i'll just submit this particular report and this report will be submitted to the fda that is our main role as a programmer so this is your table format that's okay how we can able to produce the figures let me just produce the figure also nothing but your graphs so proc means procedure g chart so don't worry about any of the programming part right now because it is not your day one class and it's not your day to class or anything it is going to be your 17th or 18th 20th classes so today i'm just discussing with you to explain what is overall a clinical sas programmer role what exactly we are writing it to get our output ready i'm just trying to explain here you no need to remember any of this stuff right now what i'm just writing as a program so you can see all those things one by one in upcoming uh sessions within in the same video itself you can see that for a while you just see what type of reports we can able to generate it as a programmer i'm just trying to explain here so proc g chart g c h a r t g chart data equal to your data set name i'm just writing it here it is your sas help library a data set called class here i'm just writing data and what we wanted on a vertical bar v bar 3d format i need a graph based on the sex wise you just see semicolon and run so what happened these pictures also that means graphs also we can able to generate it by using this as you just see now see the pictorial representation of graph is ready right we can able to produce if you want to export this particular graph to the outside yes you can do that also that is possible we can able to export that also right as a programmer our role is they will always give a data to you in this format once the data is ready and you start writing a program to produce according to your client requirements so that you will write it and finally you will submit it to the fda so this is actually role every programmer always you need to know about what is your requirement what exactly need to be generated and based on that you write the program accordingly to that as i said earlier i need only female with years 14 above only we need it so first of all when you are printing a default it is printing all but i don't want all i need only females then you first filter only female and later on stages i need the people who are is 14 above i need it and is 14 i return so this is how i got the required information produced is the same thing you also do in a real time also every time as a programmer you need to write the program to get something ready and that reports you will submit it to the fdm so this is the introduction to a simple program i just given here so i hope you are clear until here so if you want to take a break or anything you just pause the video and you can take a snacks or anything so that you will come back and you can just watch this video again and about our training program so it is a 60 days of training daily one hour per day so as a class and it's a live class like you can interact with me and you can talk to me and you have any questions and you can share your screen also all those things is possible so you can just talk to me on regular basis and here it's a monday to friday offer in your standard time so we are going to take a classes in india it is going to be tuesday two and saturday so five days a class is must so you have to attend for it and we are coming to here practice we are giving a sas software for you to do a practice and as well as uh for your practice purpose and as well as you can write the programs and everything it will work and this particular software is a lifetime access that means you will not get the expiration time after completion of the training and all no so you will have a lifetime access to this particular software and you can use it and 24 by 7 live support yes all the students will have a live support so we do connect with whatsapp if you have any questions or concerns you just take a whatsapp and and you can send it to me and so that i'll reply back to you in the same whatsapp or else if required you can always call to me and so that i can reply back to you immediately on the call itself and there are some dedicated trainers which we have it right now so after getting a job if you want to get a complete support yes we are providing that also that is called on job support we call death even that also will be uh given to you and material access yes we will give a lifetime access for your materials and as well as it's like a books and as well as regular class videos and real-time projects so guys try uh just remember this thing this is the only website we are providing a real-time data for you to do a practice and all so there is no one in the internet is providing a real-time data to you so just trust that and you just see my videos around 2010 onwards we are giving this particular training still today uh till today we are just offering this particular course and we are the masters in this particular course just trust me okay you will get a complete uh exposure on a clinical sas programmer role so job and responsibilities everything you will get to know that after completion of our training it's a one-time fee payment once you're done with the payment you can attend for a multiple batches that's up to you so today you attended for uh seven o'clock batch maybe tomorrow you need it for eight o'clock or something like that or maybe after few days later you want to refresh the training one more time you can attend it until getting the job you can attend multiple batches so the payment what you are paying right now it is for lifetime so you can have access to the material even training also i can put you into another batch if required that's it that's all about our training program so let me just discuss about why the pharmaceutical companies depends on a sas program or what they need as a programmer what you have to do is you need to produce a data sets so that means some of the data sets you need to produce it tables listings and figures are graphs we need to generate as a programmer every programmer the job is same there is no change in your job so this is your data set creation table creation and listings and graphs creation if you just see some of the descriptions of your job port also the person should know creating a tlfs so tables listings figures are maybe tlgs tables listings and graphs we call it as a so definitely the person should know uh this particular table listing and graph so don't worry once you get it training with us definitely you will be familiar with all these particular ah statements are up so what all these so tables listings are graphs and all it's just like a finger tips for you i can say and this is how the real time table looks like i think i we have already produced one of the table so it's like a table how it looks like you see so you have a table title and you have a column headings and you have a like a p values how we can generate it ease wise and gender wise information and you have a footnote titles footnotes everything so you can see so this is how the real-time table looks like i have already produced one of the table so you have already seen and this is your listing so listings also generally what happened you know so they give a mock shell to you this is called mock shell you just see here tlf cells this is your mock shell in the mock shell you have xxx only in this xx place you have to have your real values actually that is our role so you just see any of the listing yeah you just see adverse event listing that means how many side effects happen to this particular patient during this particular clinical trial process we need all the people patients list so you can get that list ready in this particular uh adverse event so list itself that means we can able to produce that particular listings also this is how the real-time listings looks like and this is the graph nothing but pictorial representation as i just produced a graph right like that you can produce the graph change from baseline i have just shown you earlier also baseline means you already know that what is that before giving a drug how the patient condition is nothing but your baseline after giving a drag how the patient information is just changed the change from baseline we can calculate it how the patient is responding is it a positive response or negative response and all those things you can see it in the graph itself and what is c disk what is sdtm and what is a tlf so you see c disk is nothing but clinical data interchange standard consortium so in earlier we don't have any cds card anything if you're just going for around seven to eight years back so the c disc is implemented newly i can say the reason behind that is early uh in a olden days every pharmaceutical company have their own standards to submit the data to the fda but unfortunately fda they change the rules anyone want to submit a report to the fda to the fda definitely they need to follow some rules the rules are nothing but sdtm and atom so sddm nothing but whatever the data we collected it directly from the clinical trial hospitals that is your sddm data that data as it is need to be submitted to the uh fda so that data have some standards okay that standards i will explain in detail in upcoming classes to you so that we call it as a study data tabulation model so that we will explain uh in in detail as ddms and atoms so in this particular 6df of training including of your sdtms atoms and cds everything is included so the complete picture of a clinical sas programmer role we are just offering to you as a programmer and so the c disk what exactly the cds will do cd is providing some rules that rules is mainly to follow the sdtm doc data set creation so sddm data sets to fda submission so c disk is the organization providing certain rules that rules we call it as a sdtm so study data tabulation model so the same study data so is going to be submitted to the fda without changing anything and in a sddm standard format and sometimes the sdtms will be converted not sometimes all the times i can say sddm data will be converted to the atoms because whatever the data we collected from the patients we will not submit all the data for our reporting purpose we will not use it we use a specific observations or specific variables information only required so that sddm to adams we will create it that adam data will submit it to the fda so once the data is submitted to the fda and they'll take a green signal few of the people work under converting of sddm data raw data to two sddm data sets a few programmers they will work on it and few programmers they'll work on converting sddm data sets to adam that is your fda submission package they'll work on it that is your defined.xml and all those things will come into picture few programmers they work under converting of sdtm to adams and other programmers work under so sas programmer job to fda so atoms to fda so these are all the job scope right so not one programmer working from starting onwards until ending very rare programmers will get a chance like that around four to five members in your team so just working on one project you may not get a chance to convert everything uh to the fds starting onwards your uh project onwards submitting to the fda you may not get a chance to work on everything you will get a piece of information some cases you may get a chance to work on sdtm to adam creation or sometimes adam to tlf creation something like that if you get it so there is a chance you may get it like that also right so this is a total uh clinical sas programmer job scope and all you can see and what is sddm as i said earlier so earlier they have their own standards for every organization but now they changed so everything so nothing but every organization they need to follow the sdtm standards so that means instead of just submitting the own standards we need to follow certain guidelines the sdtm standards we have it like a suppose patient id if you are just submitting as a pi day that should not be submitted as a pid it should be pat it should be pat underscore number or maybe use new subject id is a some set of guidelines we have it in sddm documentation so that we will discuss in detail in sdtm domains when i'm just explaining about so there we will see in now all the pharmaceutical companies like lily abort pfizer sdd pfizer novotes merc and roche and gsk all the organizations following the sdtm standards now so definitely you have to go for sddm standards to get your programs already now if you zoom a clinical sas programmer roll bit more so that no we can see more details as a clinical sas programmer what he do okay first of all you need to understand the protocol as i said earlier you need to read and write so read and understand everything so from the protocol based on that you need to understand the crf that means how the information is collected according to the protocol so is that all the information is collected so the crf information how it is transferred into a electronic format as a paper is a just it's a paper format there will be another format of crf we call it as a ecrf nothing but electronic format of your crf you will get it so that means this papers will be entered into the computers so that it will be electronic format that crf will be annotated what is the difference between general crf and annotated crf you just see right now so so right now the crf you can see okay so without writing this particular red color marks so this crf we call it as a uh general crf annotated crf in the sense this information how it is converting as a variable names or observation names and all how it is just converting it is based on your annotation one annotation only see this particular crf when it is going for your doctors you will not have a site id as a number or an initial this things will not be there with us like you have it only site id subject number and that iphone information only will be available so as a programmer few programmers what we do is we will convert a general format of your crf to the annotated crf these red colors whatever you see all are annotations that means gender is the information how it is converting into a sas data set as a sex variable we will just annotate it so that is your purpose of annotation we will discuss that also in upcoming class to you so that that is your annotations and once the annotated crf is ready and so that sddm data set creation it will be stored as ddm data sets once it is created and will be submitted to the fda this is one process so few programmers work under in this cycle creating sddm data sets and finally creating for defined.xml and submitted to the fda and few programmers will convert sddm data sets to atoms so the sddm datasets will be converted into atoms the diams will be again submitted for fda and apart from that it's a two ways so one is it will need to go for fda submission another one is the same data set so you need to use for producing a reports like a tlf generations we can use it and then see even that particular datum data sets also will be submitted to the fda even the tlf creation is done and that also will be submitted to the fda then fda will take a decision whether they need to approve this particular drug or release into the market or not and if they give a green signal then it will be released into the market otherwise it won't so this is the total overall picture if you zoom bit more so of a clinical sas programming of a clinical sas programmer role in detail so who can learn this particular course anyone so no matter what educational background you have any graduate or post graduate degree like a btec mca msc ms m pharmacy and medical laboratory nursing microbiology be pharmacy any persons who are having a degree or post graduation or phd or microbiology or biotechnology let it be anything no matter what educational background you are from you can learn this particular clinical sas programming course so anyone can learn this particular course as a sas programmer job you can get it so there is no huddles on it so this is how much a clinical sas programmer jobs pay per hour in u.s so this is an average you see so around 20 to 87 the average per hour around 58 dollars per hour you are getting it at the same information you can see the clinical says programmer monthly how much he is earning annually how much he is earning and weekly how much you can earning it so you can see in this particular picture so annual salary you have it and monthly salary you have it and weekly salary and hourly salary also we have it right so this is a just overall picture so this is in india so actually very less salaries are entered actually i know that i am working in india i know that so minimum of a fresher experience you will have 3.5 uh per annum so 3.5 lakhs per annum if you have a 5 to 6 years of experience you will have 10 lakhs package so if you have 9 years of experience so you have it around 18 lakhs of package if you have nine above so you you will have it around so 24 25 based on your caliber how we are performing in the interview so that decides there is no standard rule definitely you will get this much only or something like that so you can easily get you can easily uh get around 12 years of experience you can reach up to 40 lakhs of package so that is a normal in india so that is overall a picture thank you for watching my video i hope you like this particular video and please subscribe to my channel and hit like button and one more i'm just adding few more videos also to the continuation of this particular videos so that no you'll get a complete picture like how we can start writing your programs and all one by one you can learn so i hope this is the best uh i'm giving myself uh to deliver so this is what i just decided and anyone have any questions or concerns you just write it and comment section so that i'll reply back to you you can use my number always so that no you can contact me thank you all and i'll meet you in the next video hello everyone and today we are going to talk about how to write a simple program by using this particular software simple program in the sense um imagine so out generally we can start a program by using this particular software so that is a just agenda for today so and let's see how we can able to write one by one so imagine whenever you get a sas so imagine this is a virtual box or one maybe virtual computer to you so if you want to start a sas so you need to click on just type sas and click enter so automatically the sas software will open like this so once you open the sas software so you can immediately see there are five windows in our size one is editor window log window output window explorer window and result window so there are five windows in our sash like our five fingers in a hand each finger in our hand have some significance in the same way all the five windows also have some significance by using editor window so by using editor window we can edit the program we can modify the program we can save we can submit and we can run any program we are coming to the log window so this is the proof of exactly what program you written in your editor window with respecting to that is there any errors or warning messages that you can able to see in your log window and finally there is one more window called output window output window is mainly talking about once you written a program when there is no errors or anything so your output is clean so that the output you can able to see in your output window so editor window writing the program log window checking off is there any errors the program what you have written output window it will be displayed all the outputs that means suppose imagine your interest is to display uh the people who are the age of above 20 years age so you want to show the report of only the people who are about 20 years you want to show that so then that information you can able to see in your output window so output window is a um what i can say it's it's a destination of our program so once we're done with the running program you'll be end up with uh so getting your output so before getting an output so there will be a explorer window here the data sets will be get created so mainly explorer window libraries is the place where you can store your output as a data sets so first data sets will be get created then automatically the output you can able to see it in your output window so go to libraries there are many libraries we have it so forget about all just remember sas default we have sas help sas user and work is the three default libraries you just remember only that so as default we have a three library self and sas user and work is a three libraries we have in our sas so you just open self library this is the default library this is called data set so once you written a program the end result of your program is creating a sas data set so imagine we can create this type of data sets by using your program by using your sas programming so that after creating this data set if you want you can print it in your output window so one thing you you need to understand explorer window is a hot for your software whenever you want to run any program so default output that means output in the form of sas data set will be get stored in your libraries so libraries is the key place where you can store your output information as a data set so explorer window you can able to find the libraries there are some other icons also you can able to see in your live uh explorer window as we are not using that much like a file shortcuts and favorites and folders and this pc so the libraries is the key place where you can store your outputs in the form of sas data sets only try to remember that and a result window so it will show all the results what you have generated suppose imagine i just executed a program one now so the program one output you can able to see in your output window immediately that output containing information you can see it in your result window [Music] so imagine so now you are running a program 2 when you execute the program 2 the program 2 output only you can able to see in your output window but result window if you want you can go back and check your first output also and as well as you can check your second output also so that means whatever the programs executed that means the successful outputs how many you have created so those many outputs you can able to see in your result window so result window how the list of programs what you executed imagine as a layman language if i want to explain here you open your ms office so maybe bing or maybe you open any um browsers like a chrome or internet explorer or let it be anything so when you are searching for something on the google after few seconds later so whatever the website you visited so those websites are like a history for you so that that means it's a all the activity what you performed by using that particular software that particular browser it's the same thing here also in sas by using this particular sas how many programs you executed and all the outputs you can able to see in your result window so this is all about different windows in sas so now you know that how to write the program if you want to write a program so we can write it by using editor window if you want to see is there any errors or warning messages you can see it in your log window and if you want to produce the output in output window then we can do it so by using output window it will display the information and before say getting that output by default sas will store this particular output information as is as data set so that information you can store it in your explorer window mainly libraries so there are many libraries and try to remember sas help and says user and work is the three default libraries and result window is the one more window so that now once you execute your program default the output you can able to see it in your output window so that means if you run 100 programs all the 100 outputs you can able to see it in your result window so this is the overall total window concept imagine if you are using a university edition of your sas software so that we call it as a student version so don't expect these many windows over there so the only three windows you can able to see is just this one is called program editor and another one is log and another one is output and explorer that means you will not see any result window there so only these windows you have it and that too there are some limited options so you need to just go for it so you will not get all the options and all but there are some limited options but you don't need to worry about it as i said earlier so if you joined in this particular training you will get this particular software to you so that you can get hands-on okay now we just done with a creating uh so trying to understand all the five windows what we have in our sas so now what we do is uh then she so please uh put the mute in one computer i think you log in from the two pc so it's a going so please try to manage and we're coming to here how to write a simple program so by using this particular says so whenever you want to write any program so must you have to learn these things so it should be start with a keyword called data so data is a keyword is used for a creating of your data set name so this is a thumb rule so whenever you start any program if your interest is to create a data set so definitely you need to start with a keyword called data so here you are telling to the sas to creating some uh nothing but excel sheet just imagine in a la main language we will try to learn something here so we try to create an excel sheet by using the sas software so in the excel sheet as we know that we will have some columns and we will have some rows also and that too you have to make your excel sheet name as some book 1 book 2 or something like that so i'm writing it my excel sheet name i can give it as a class is my excel sheet name and after finishing this particular statement called so data and class data is the statement of my sas keyword and class is a user defined keyword that i'm just giving ram the user so i defined the keyword as a class after that i need to maintain space and then semicolon so actually we have in a habit of whenever you write any paragraphs or big sentences or maybe any males so you will end up with each sentence with a semicolon sorry a pull stop so full stop is nothing but that particular sentence is done so that you can start your new sentence is the same way in sas whenever you reach us to this particular semicolon that means you have done with or writing one statement so i can write my another statement by giving a space and i can continue from here but i should not write like that so the problem is so if you are writing some program the program should be definitely gpp rules that means good programming practices what is the good programming practices is so if you want to write any program so you have to write it in a second line one line is finished so second line should be continuously in the second line of the pins in the next line so why we need to do it can't we write all the 2000 lines of code or maybe 100 lines of code in a single line itself so that no so if you think that that's easy imagine there are situations in be off of you someone else is accessing your pc and then they are interested to submit some of the reports because of your absence so to client so when somebody looking into your program the program should be in a sex self explanatory situation so that no somebody looking into your code they get to know that okay so he has written for this this this and all so you written in a messy manner so that no he can't able to understand so that's the reason why so you need to follow the gpp and one more when you are submitting your reports to the client at the final stage you will submit your code also to the client so when someone looking into the cloud maybe just imagine if this code is submitted to the fda for a drug approval purpose so when fda guys is looking into your program the program should be in a self-explanatory so that's the reason why if you could have followed the gpp so that reminding all who are just handling your program they are easy so they can so that means they can easily understand what you have written so here i'm just writing the second statement at next line only so that is called gpp so gpp means a good programming practice so that everyone can able to understand what you have written so there i can write it the statement input so input as per the gpp again i should not start here immediately so you have to take some gap exactly and near to your space you just write a statement called input so by using input statement i'm just mentioning it my column names so input is the statement i'm writing it the column names are imagine so one is a sid student id is of the student and sex of the student and semicolon so here s id means it's a student id age and sex so here i have to maintain the space between each column at least a single space suppose if i imagine if i'm giving a's and sex as a multiple spaces that won't make any sense but still it can be read by sas so at least a single blank you have to mention otherwise if i'm not mentioning it so you just just take it so take it out this particular space so sid is so and space of sex is then what happened see days is a one column that's what sas will think so each space nothing but each new column you are trying to create so sid is one column yes is one column and sex is one column you are creating it now and semicolon as we know that semicolon is nothing but a statement terminator so that second statement also done so first statement i created it to create my data set name second statement i created it to create my column names now when it you are creating a columns definitely you have to provide your rows if you want to give a rows in sas you make sure to write a statement called cards see when i'm just clicking enter then i no need to take any space or anything automatically it will get aligned so this is called we call it as indentation so generally this we need to maintain if somebody looking into program it should be the same order like this only right so card statement after that semicolon that means this particular card statement we done here so now you are providing your rose imagine the student id is hundred years of that particular person maybe i'll go for 50 years so sex of the person is male another student i'm writing it here it's a 200 so then i'm writing it 60 then i'm writing it male another person i'm writing it it's a 300 imagine the person is 40 years old with female so that's fine and i have to give the semicolon here so if i'm giving the semicolon in the sixth line itself what happened you know so don't expect this particular six line to be read into size so you should not write the semicolon here so you have to make sure to write the semicolon in the next line then you have to use a statement called run the run statement exactly near to your data statement that means so here you see wherever you started data and the run statement also at the same place right that's done i'm executing my program so i think i'm thinking that i have done with my program so post line i have written for creating my data set name second line i have written for creating my columns so these are all the lines cards is and remaining all the lines i have written to create my rows in my size so i'm just selecting this particular program because i'm done with my writing a program so that i'm selecting this particular program then i can choose is option here a running by like a symbol actually in our sas there are three ways to submitting of your sas program one is a running boy like a symbol and second one is submit option and third one is f3 button from your keyboard some of the laptops you may have a function with f3 or something like that so that you just see how it will work the f3 button but in general so f3 button from your keyboard it will work once you click on it then automatically program will get executed but most of the cases what i try to choose is i always go for a running boy symbol in this particular training so that no you'll also be aware i'm just executing my program so i'm running this particular program and that's done the program got executed what happened you don't know so go there and check your log so sid 100 there is no problem each is 50 there is no problem sex we have a missing value sid 200 and age is 60 and sex we have a missing value sid 300 aga is 46 we have a missing value so you see that there are some errors the error is underscore n underscore equal to 1 underscore n underscore equal to two underscore n underscore equal to three that means in my first record we have an error second record also we have an error even third record also we have an error so why that particular three records also have error in your program so there is no problem for yes id and age but sex having a issue so the reason behind that is if you carefully observe sid and is all numerical variable but sex is a character data so whenever you are trying to read a character data into sas you have to make sure to write a dollar sign otherwise don't expect this particular program to be executed smooth so why we need to mention the dollar sign means the dollar sign is the sign is allowing sas to read this particular character value so m f and all that means you two z letters if you write anything if you want to read it definitely the variables so here columns are called variables and rows are called observations so the variable definitely should have a dollar sign then only can able to read what i will do is i'll go to log and i will clear the log by just clicking on this particular new option i'm clearing my old log so that no the log is very fresh so now i will just select the program and running the program now that's done now go there and check your program the program not showing any errors or anything it's got executed so as i said earlier whenever the program is got executed without errors so definitely you can expect the output so before creating output you can expect a a data set here so where it will be it is going to be libraries and work library default the data set will be get created so my data set name i have created a class the class data set you can open it right directly double clicking on it so that you can able to open and you can see all the data what is inside so this is the just data set you got it but you just go there and check your output it's still blank so the reason behind that is default it will be appear as a data set but i am not interested to see it at the data set i'm interested to see the output also so if you want to see the output of the same report so you just write a another procedure so that means when you write any procedures then only the output window will be get active suppose if i'm writing proc proc means it's a procedure so i'm telling a sas to print it proc print data equal to your data set name so the class data set you are writing it here and then the program once you execute it and run it now the program is got executed and now how it looks like can you just see that the output is displayed in the output window all right editor window you return a program log window you checked is there any errors or warnings output window it is displaying your output and explorer window it will save your output as is as data set and result window it will show your result what you have generated now if i execute a same program one more time you can see a one more line in your result window you see i executed on this i executed the same program one more time now you can see that so they deserve one more time you can see your output window that means how many successful outputs you will be able to generate and those many times that particular result window will able to show you all the outputs what you have generated see this is my page number two and what is my page number one the earlier program what i have executed that's my page number one so this is how we can just simply write a simple program in sas anyone have any questions until here you just speak out and ask you just unmute yourself and you can talk to me any questions am i audible sushma sharif ratna ramyashiri i hope everyone can able to hear me yeah okay good so i'm taking this particular silence as no questions i'm just moving forward so for explaining that yeah yes please continue yeah the dentistry here i joined late so i think i missed the first part just that's what i wanted to ask uh nothing adam so i just explained how to create a data set i just see uh when you join so data class is a data set so i just created by yeah yeah yeah this is the only stuff i started so don't worry okay okay right okay so now okay so we done the creating yes please continue yeah you know there is a gap between run and broke ah okay good idea so remove the unknown proc then don't write it still fine there is no issue because if you are maintaining a space after your statement see after my input i am trying to maintain these many lines of space do you think it is going to be an error no because sas will think this particular line has one program this one line has one program the blank lines will be get skipped by default right again directly this program this line will get executed so that's what happens by default whenever you have any spaces the spaces will not be get executed or it won't give any errors you see and execute the program don't expect you'll get some error or something see you're getting output and check your log also there is no issues making sense yes right please speak out someone else have questions good so now what we do is so we just generated the program and getting the output ready that's fine how we can able to produce the same output like a percentage wise imagine i want to know the client is asking me to produce what is the male percentage in my data and female percentage in my data right now it's a three members and one female so that you can manually calculate what is the percentage of females and males so that's okay but imagine in real time fine i do yes please actually i'm getting so many problems i'm not here to your voice uh i have seen that you joined and uh coming back and going joining and coming back many times so there are some technical issues in your end remaining people are fine with me so as this particular video is being recorded so from now onwards you just listen and see is there any uh questions so that we will see an end of the class actually what happened every five minutes it will automatically your voice is gone like this um i'm not sure i'm trying to log in so many times this is my fourth or fifth round yeah i have seen that these many times you are coming back and coming again so why can't you log in from your phone by using a go to meeting app yeah i'm using my app only that one ah then why can't you use your computer then so you're just trying for another option uh-huh actually i don't have a laptop ah so if you don't have a laptop i'm not sure what is happening in your computer sorry in your phone um so sorry actually i have webex meeting app so i can easily ah no webex is different and go to meeting is different man so we have to stick to this only because yeah so this is a i have a license for it not for the webex okay fine okay so you just see how these things work yeah right so now i'm writing a simple program so i'm just i need a percentage it's like female percentage how much and males percent is how much it's a small quantity of the data you can easily say that the percentage imagine you have millions and trillions of records and now you are dealing with so how you are going to give a percentage what is the female percentage what is the male percentage in our data so if you want to get that you need to write it rock freak that means frequency so what is freak means just imagine suppose you are suffering with a fever you went to the doctor so doctor will ask you one question how frequently you are getting a fever or else how frequently you are getting headache frequently r means what is the meaning of it the number of occurrences how many times so that is your calculation right so proc freak is the statement we use to calculate the frequency the frequency in the sense m how many times repeated that means male how many times repeated female how many times repeated in your data that is your frequency proc freak data equal to which data set name the data set name which i have already created that is a class i am just writing it and in which variable wise we need this analysis based on your sex variable wise we need an analysis so you just write it tables based on the sex variable wise we need analysis and run so don't worry don't try to buy hot or anything this particular program we are going to deal this particular program on the day 16 and 17th class one more time so we will see in detail for a while to just give you what exactly the review of software i'm just trying to explain this one so proc freak data equal to data set name class and table statement sex and execute the program now that's done you can see sex wise frequency females is one person males are twice in the data is it correct so that's correct sas will never say any wrong answers to you until unless you do mistake right so sas never ever give a weird output to you because it's already a predefined program inside there is nothing to do wrong or something like that so whenever sas is not listening to you or else you are getting something weird output and all so the mistake what you have done you have to check it so one more time so if you just take hundred percentage of your total data 33.33 percent of your data females is occupied 66.67 percentage of your data occupied with males so one member it's a 33 percent so total three members this hundred percent equal to so cumulative frequency and cumulative percentage also you will get it so i am not interested to get this cumulatives what i can say simply to this as after the sex give a slash just write no so that's it that means i don't want any cumulatives execute the program and run it now there is no cumulatives so you are getting this particular report here but the same report i need it in the form of pdf document so i can get it by just mentioning of ods pdf file equal to in which destination where you are interested to save this particular um output see i'll go to my desktop so there are many file folders in my desktop i'll go for any one folder i'll go for new folder 15. there are some files here let me delete it so i'll take the new folder 15 path by directly selecting this particular path i'm just taking it so i'm interested to save this particular output into this particular pdf document i'm writing this particular folder the pdf document i can keep it anything so class is the pdf document name i'm just making it dot pdf because ods means output delivery system pdf means you are sending this particular output in the form of pdf file to the outside and writing a semicolon let's imagine it is not a basis programming its advanced level what i am trying to explain on the day one itself and let's see how these things will work if you can able to understand this particular piece of lines what i'm writing here so there is no doubt in that particular total sas program itself you can able to follow so now you are writing it ods output delivery system pdf file what you are creating it i am just closing it okay that's it so what you are doing in this particular program is whatever the output you generated i want to send this particular output in the form of a pdf document yes you can do it so now you execute the program so whatever the output you can able to see you can see able to see there in your output window at the same time the pdf document also you can able to see can you see this is your pdf document right so we can easily generate a pdf document pdf rtf xml html any output simply we can able to create it by using this suppose instead of pdf you want to save the same information in the form of rtf document you just write pdf or replace with rtf rtf means it's like a word document okay replace all see what happen wherever you have a pdf is just replaced with rtf now you execute the same program one more time now you can see that it's like a word document can you see pdf is portable document format so that no it's a result we can't change anything in that pdf document but it's rtf a rich text format so that we can edit it to modify it if something is required you can do it but we never do in real time as we do if you want to do some change in your output definitely we need to do with our program we never ever manually edit or delete anything to your output at all because you manually edit the program but you saved your program so imagine some tomorrow someone else is just running the program they won't get the same output what you are just showing there because after running program you have edited something the edited things not there in the as a documentation purpose so they get they didn't get it so how this particular output is generated but why i am not able to recreate the same so that's the reason why whenever you do some changes to your program whenever you do some changes to your output do with the program only don't do any manual as a programmer that is the first job you have to do suppose imagine the sas system is the title you don't want it so that no i can directly directly click on it and then i can remove it then i can yes this is i can do but no if you don't want this particular title to be displayed then you have to give a some command to sas by saying it write it title don't write any title semicolon now execute the same program one more time so that no automatically the title will be gone so you no need to do anything see the title is gone you don't need to worry about it or else the system date and times and all you don't want to create it that's okay so your client is required not to produce any dates so we can write it a global option options so i don't want it a date then write it no date options no date is the statement will allow me not to produce see can you see there is no date and apart from that the page number is displaying as a first page something like that i'm not interested to have this on this also then i can write it no number i'm writing it semicolon and run so close this particular pdf rtf document and run the same program one more time now you can able to see see there is no page number can you see that so this is how we can able to just manage in our real time so whatever the output mean always you need to remember one thing the purpose you need to make sure what exactly is your requirement if you are good enough with that particular requirement that's it half of your program is programming job is done because you know that what to do and all so first of all try to get a clarity what exactly need to be done before just simply starting any program try to find out the requirement try to assist something suppose just imagine even real time also once you get a job don't jump directly into your program so then no so after few days later you're writing a big big programs after a few days later you res you decided a few uh some data is not available according to your conditions and all so then so there is just a waste of your programming what you have spent if you immediately spend some time on just looking into data data trying to understand the data so that no immediately you can tell that so that so that is there any issues in your data or something like that so that no you can inform to them meanwhile they'll radiate data to you imagine there will be a timeline for this particular friday and without looking into your program you have started your writing program and after thursday you got to know that the data what you got it suppose imagine client requirement is the people who are suffering with the cancer and died in china 2018 is the report they wanted so then you got to know that thursday after writing a big this much big code so there is no data for this particular china country then you can't able to produce this output if you could have informed that in friday it's a sorry monday itself by just doing some simple checks and getting data identification so that no you can inform to the client immediately so that no okay if the data is not loaded then i'll ask my data managers to load the data again so that now if you say that in thursday when the data managers they load the data and when you will produce a report it's a bit difficult process so that's the reason why whenever if you want to become a good programmer no so try to remember this one try to assist or else try to assess first what need to be done if you get that clarity you know 50 percent you are almost done the only thing is you need to apply your skills get that particular work done so right now my job in this particular program is to create a frequency so that means i want to calculate the frequency and percentages yes i did it right so we can able to create it like this and sometimes if you want the output in the form of a a pdf document if you want it pdf document in the form of a graph or else without pdf as you already know that how to create a pdf how to produce a graphs in sas it's a sas is a powerful reporting tool the only always needed is just data once you provide a data suppose imagine class is your data set you provided so that's enough so if you want to produce any output no you need to start proc means procedure g chart that means graphical chart you are writing it data equal to you just mentioned what data you wanted so my data set name is class i'll go for it then v bar so v b r v bar i'm writing it based on the sex wise okay i'm executing the program run it now see female and male wise so information is just created females are one member in your data and males are two members in your data which is exactly correct now client requirement is i want to apply female is one color and male is one color then how to do if you want to apply a color you just write sub gro up equal to you just mentioned sex so you are mentioning a subgroup so male wise one subgroup and female wise one subgroup you are mentioning it now you can see that females are blue color and males are red color or something like that you can able to see or else client required the same output but in the form of 3d diagram they need it then write it v bar in the form of 3d so that you can able to produce it the same graph in a 3d format if you want right rls the same graph client required in the form of horizontal form so then instead of writing v bar that means vertical bar write it as h bar so that now you can able to produce the same graph in a horizontal bar so default h bar you will get the frequency community frequency percentage and community percentage and all you will get it you don't want this particular statistics to be displayed so client required is that one then write it no s-t-a-t no stat no statistics see there is no statistics everything is perfect for you right or else finally client decided okay i need this particular graph in the form of a text format so if you want to get it so text format of output so the text format of output if you want so what you do is very simple thing instead of writing g just write chart but why the h bar 3d is appearing as a this colors because the 3d is not possible when you don't have a g now you run it and execute the program and now you can see that the same graph it's like a text format of output if required so you will get it right now it is just all i can say um what i can say so it is just a normal output if you want so we can uh write it any customizations so if you don't want this particular label of frequency is not required and all so don't worry we are going to learn this particular class in detail on the day 21 right so until that you need to worry about this particular program what i have written here so what you need to understand basically client always give you some purpose or else squint always needs some data to produce it your job is writing the program towards that particular requirement once the requirement is finished send that particular report to client so that client will take care of remaining things as a programmer always what you have to do is they'll give you data to you they'll ask you to produce your reports imagine they have given a data to you in another case i'm just explaining here so in my self library there are many data set you just go for a data set called hot okay so in this particular data set wise we want to see the person is suffering with cancer how many are died we want to know or how many are alive we want to know so how we are going to get it the person should be cancer and apart from that the person should be died or alive we want it so to get it we write it the same program like earlier this time you write it proc freak data equal to your data set name so i'm writing data so sas help library containing your hot data set i'm just using for this particular purpose and this i'm writing data so table statement in the tables are t a b l yes table statement i'm just writing it what i wanted first variable name that is your status status variable versus i'm just double clicking on it nothing special so status variable versus what i wanted death cause variable so we are just reporting it run it so now if we execute it and run the program now you can see that right now the output is very clumsy to you i will not explain this to you what i will do is i'll simply cancel i'll just simply save this at particular output out equal to option i'm just using it an ll a new data set name i'm creating it now you can see that clearly here into work library ll you can see dead with cancer 539 members in your data yellow all the patients who don't have a diseases there is no cancer patients alive all the cancer patients who are suffering with this particular disease all are dead in your data what the client has shared with you you got it writing is simple simple things so that no we can able to manage our job in our real time so but imagine in my training each and every line why we are writing it if you write it what happen if we are not writing what happened i'll try to explain so anyone have any questions at any point of time you just unmute and speak to me so that no i can get clarify that particular issue what you have it so that no we can proceed further so this is all about for today how to write a simple programs and how to play with this particular software and all so we just done hello everyone and uh yes today i'm going to talk about uh introduction to asa software so so let me just open my day one class right so introduction to uh software so here we are going to talk about like what is sas so sas is nothing but it's a statistical analysis system or also software we can call it as anywhere so scs means it's a statistical analysis system and software so but this definition is there up to uh somewhat but uh in nowadays so in the sas website itself they clearly mentioned so there is no definition for sas so as itself it is a brand so that's what people are calling it as a so for a while you try to remember sas means it's a statistical analysis software our system it's developed in 1970s not the colonial state university so that means it is developed in u.s only so why we they have developed the software in 1917 what is the purpose the purpose is personally uh to analyze agriculture field data so few of the scientists what they have done is they have done some experiments on the agricultures so based on that they got some data so they want to analyze that particular data so using some statistical methods and all so but at that time they don't have big softwares or something like that to do statistical analysis so they try identifying this particular software so that time it's a small statistical model i can say so just perform few things but now this is most widely used statistical software right now in the market so many places they are using it right now like um customer relationship management insurance companies health care industry and financial banking so many places they are using this particular software as a powerful reporting tool so by using the sas what we can able to do is we can write the program we can produce outputs and so that means that outputs you can submit to your uh higher authority so that they can take a decision so what exactly to be planned so based on existing data analysis it is nothing but so the data what you already have in your database based on that you will get some logic and based on that you can take some decision imagine um in your bank just imagine so imagine i say i say like a big bank so how a lot of customers so i say i say want to launch a insurance plan so that based on to their customers so they want to analyze exactly this insurance is suitable for which persons the persons above 40 years or how many people in the bank are else the persons below 40 how many or else the person so above 40 with nearly to the retirement stage how many are so that no they want to analyze the data so that no based on that they want to uh come up with a new uh plans or something like that it's like insurance plans if they want to make it yes they can take a decision on top of it so in a clinical sector what they do is whatever the clinical trials they have done so that data they'll submit to the cro organization see our organizations uh use this particular data for analysis purposes that particular drug is working or not so is it giving a good results or else is it giving any side effects so if side effects are more than your benefits so then definitely the drug will not be released to the market at all so fda will not accept this type of results so that no it is going to be closed so that type of decisions if you want to make it then sas software is the first place so to do all so jim goodnight is the founder of this particular assassin shirt so still he is the ceo and so founder of this particular in short so this is all about your sas so in this slide i'm talking about it is a statistical analysis software our system developed in 1970s north carolina state university and virginally identifying the software mainly for to do the analysis of agriculture data and now most widely used software right now in the market so many of the organizations that are using it right now as a powerful reporting tool and jim goodnight is the founder of this particular sas insured right anyone have any questions until here yes please you can speak out in this slide if you don't have any questions yes please no questions thank you so i'll go to the next slide suppose if um just talking about more about sas so like other programming languages like first generation programming languages like pascal and cobal second generation programming language like a c third generation programming language like a c plus plus dot net and java the fourth generation is comes under your sas so we can install in any operating system like windows unix and mac also right so that means this particular generation wise if you are taking data so it is developed in 1970s so before that it's a first generation we have a pascal and cobalt second generation c programming identified later on and later on stages c plus plus dot net and java comes on the third generation where coming to this one sas is a fourth generation and in this fourth generation software of sas everything is built in so built-in in the sense you don't need to learn any formulas or anything first just imagine a simple example i want to give you here uh you want to calculate in a average for age-wise so there are around 10 members you want to calculate each wise average so then what you do so you know to need to know the formula so that means person one plus person two plus person three plus percent for all the values your sum divided by your number of persons so that means that is your average right general formula the total number of observations by number of observations so you'll get it but in sas you no need to write any formulas or anything you just write m proc means procedure like yesterday we have written means if you write it automatically mean will be calculated so that means as i said it's a fourth generation programming so we have all built-in functionality imagine if you want to do the mean okay it's a small formula then we can remember if i want to calculate the same thing for standard deviation can be able to calculate the formula for standard deviation so it's a bit difficult yes we can do it it is not a big deal so we can do it but the thing is we no need to worry about all the formulas so the formulas and everything is already built in the only thing is you just trying to activate those by writing a small commands so once you written a command automatically that particular uh what i can say function rl statement will be active so that no that will know so not only that proc correlation regression t test okay so paid t test these are all those things we can able to do so with this particular software so we can install this in any operating system people who have a mac so actually we can install in mac also but the problem is the mac should have at least 8 gb of your ram and it should be the latest version of your max mostly sufficient otherwise no it will get heated and all so yes we can install windows and unix also officially sas is launched only for windows and unix so mac also we are using it we will try to uh boot the windows software into the mac and so that then we will install a sas in that particular computer so we can install in any operating system nowadays so yes that's possible so this is all about your more about sas programming is anyone have any questions in this particular slide so that means the sas also is evaluated from other programming languages so whatever we have in c programming like a loops conditional statements operators error arrays and all the same thing we have it in sas to even sas also is made up of your c plus plus dot net and java programming only right in the back end can you hear any snoring sound from my side say yes no no no no somebody's sleeping here so he's just snoring right so is it clear any questions on this particular slide right good so now let me just go for so competitors there are many competitors for sas like informatica terra data spss system sarika hyper and cognos these are all the sas competitors right now in the market one more i forget to write our programming also so these are all the competitors right now in the market one way around i can say informatica is a a powerful reporting tool if you are considering sas is a powerful reporting tool so informatica is a good competitor so sas is a data warehouse builder so then teradata is a competitor to you so sas is a statistical analysis software then spss system statica so hyper on these are all the competitors we are coming to the cogniz so cognos also powerful reporting tool right now in the market our programming also it's a reporting tool in the right now in the market people are using it but when above all these things so if you are working in a clinical sector so you have to use the sas only the software there is no other software to be used because fda will approve that results which are generated with the sas software only the reason behind that is so it's a series compliant software so what is seed is compliant software there are some standards sas is following to fulfill that requirement to get that particular drug approval so that is only with sas is nowadays possible so not with any other tools so that's the reason why there are many competitors in the market for sas not in a clinical sector that means clinical clinical sector only the sas software we are using it informatica teradata spss they're all the competitors right now in the market for sas so in a financial sector not in a clinical sector right but still there are a lot of organizations they are using it so this software as a tool just hold on a second right so this software as a a tool they're just uh using it in many of the organizations and we're coming to here in the next slide if you just talk about these are all the competitors clear so not only sas the same work what we do with the sas we can able to do with some other tools also that's the reason why we are saying it as a competitor because market is only one thing so right now it's available so that every software is competing to stand out so in that process so these are all the competitors for sas right now in the market so we are coming to here products of sas so each product we have some products sub products like a suppose if i go for ms office so microsoft ms office there are some sub products like i can say um powerpoint excel word picture manager access so these are all the products of your ms office even sas also we have a products like a sas stats as grabs and sas access like imagine your ms office house if you want to create an excel then you will open the excel and then you will try to edit and modify or anything that is how you do we are coming to the if you want to write any prepare any document or anything yes you will open your ms word document and then you will prepare it it's the same thing in sas also whenever you want to do some analysis suppose if you want to perform in this statistical analysis then you need to activate sas that software so if you want to produce any graphical representation you will write a sas graph so if you want to access something from your desktop to see that source desktop or c diver d drive information into sas then you need to use sas access let's see how these particular things will work we will see one by one so to do that first of all let me just open my uh sas software i'm just entering it yes the software is just got open now so as we know that there are five windows in our sas editor window log window output window explorer window and result window total five windows in our sas so let me just write a small program by using this particular software so data your data set name so you can write any data set name i'll go for my dataset name as a class so after that semicolon then i'm writing a statement here so it's a input so it's an input statement i'm just writing it here so my column names the column names also called as a variable names so the variable name so like x is one variable y is one variable imagine z is one variable you are writing it and semicolon so cards is a statement i'm just mentioning it the values i'm writing it so x value 100 y value 200 z value 300 the next one is 400 or 500 or maybe 800 or something like that up to you can write it and i'm thinking that i'm just done with my creating a data semicolon then give a run statement so guys when you are giving a run statement also without giving a run statement also the program will work so actually see without writing a run statement i am writing it here proc means it's a procedure print means you are telling a sas to print it data equal to your data set name so the data set name i'm writing it it's a class and run the program so that's it actually you carefully observe after the seventh line i am expecting to have a run statement but i haven't given but still there is no doubt in that if i execute my program will work and you will get the output so with the required one so the reason behind that is the run statement is ignored when you are giving a card statement so imagine when you are mentioning a data inside of your sas the run statement is not required so the run statement is when it's mandatory you know whenever you have some data and you are importing it from your external sources so definitely you have to write a run statement but right now the run statement is bit ignored that's okay so if i write it run semicolon or else it without writing run also you won't see any difference and one more thing like that so you can write it proc means it's a procedure data equal i'm writing it sometimes what i can do is without writing data also i can write it like this proc print semicolon and run if i run this particular program also will give the same output so what is this particular statement what i am talking about if i write proc print and run then that means i am telling it to the sas to print the last submitted data set so in this particular process the last submitted data set in my case is class data set so that that automatically prints you no need to tell that so data equal to your data set name class and all when you are executing one one program right so we can write it these two things has ignored one one is a run statement you can ignore it because it's a internal data and another one is data equal to statement also we can ignore it because if you want to execute suppose imagine you created a data set called class here and maybe you created one more data set called class one so okay class one so if i execute this particular program let's see how many variables and how many observations containing data will be printed if i run the program what do you say tell me what you understood then so if i execute this particular program so that means how many variables and how many observations you are expecting so that means how many rows and how many columns you are expecting three variables yes so three variables and one observation data only you can see otherwise i could have written as a proc print data equal to your data set name so i'm writing it class what do you think now if i run the program so three variables and two observations containing data will be printed see data equal to writing a data set name you are telling us as exactly what data set to be printed otherwise if i'm not writing it so that the last submitted data set our last executed data set results will be get printed even though you have hundred data sets which one is the last the 100th one is the last of data set you think then that information will be printed in your output window so this is about you are what it is it's a general program so now my interest is i want to calculate an average can i able to calculate average based on the x variable wise so what is the average value 100 plus 400 100 plus 400 it's a 500 divided by 2 so that 250 is my average right so if i want to get that particular value as a 250 as average i no need to write any formulas or anything so what you do is write proc means data equal to your data set name i'm writing it class and run okay so what i wanted in a var statement wise based on the x variable wise what i wanted i need analysis so i need mean so just write it mean execute the program now don't remember all those stuff we are going to talk about in detail so it is just for see the mean of your value is 250 you are getting it so right now you just manually calculated like this then that's okay imagine you have a data with a huge quantity like a hot data set you just see there is a huge quantity i want to know that what is average height of the people in which range the people are averaging uh have their height so what i can do so to calculate this one like this i'll do the same there is no difference in this proc means data equal to a data set instead of class so the data set is available in my sas help library so that i have to make sure to write it as helper so data how to data set your writing data so i need a mean based on which variable wise so height variable wise i want to calculate a mean so now you execute the program and run it now then height wise mean you calculate it and run it now you can see that the average height is 64.8 so the people average height is there are different people with the 80 or 70 some different different values based on your height wise so the but most of the people have so the height of 64.81 or something like that you will get it right so and apart from that not only mean i need a standard deviation to be calculated then don't worry just write it std so that is your standard deviation so if you want you can calculate it yes so my standard deviation value is 3.582 or something like that so this is my standard deviation value i don't need to learn any formulas or anything so that's a reason why the people who don't have a statistical background the people who don't have a mathematical background still can survive in sas because of this reason only so you no need to learn any formulas or anything the only thing is you need to know exactly what commands to be given so that no we can activate the sas so we so that sas will give a required output or else you want its standard error to be calculated you write it std err standard error so execute the program and run it now see the standard error is calculated or else you want to know that who is the minimum or who is the lowest of people uh is the lowest person that means what is the lowest value of your age then you go for minimum value min you write it so that the minimum value of your age is 51.5 is the minimum value so what is the maximum value so you want to get it you write it to max so that what happened in this particular height wise the maximum people in your data that means 76.5 so the mean will be always resides between this range only the mean will be always within your uh lowest to highest between only always it is possible so the lowest person is 51 years highest person is 76 years the mean is around 64.8 or something like that it resides so like that you are just calculating all the statistical analysis how it is happening or else uel cm um i think it's done more do one thing so when you don't know you try to do a mistake so automatically what happened what option to be written here automatically you will get it you see lm that means upper confidence in limit you want to write it so you just write it u c l m so that no you don't need to worry about it so client will always tell you exactly what need to be prepared see up upper 95 percent confidence limit for your mean you will get it so this is your upper confidence limit at the same time you have lower confidence limit like that there are many statistical analysis you can perform it just mentioning of a small syntax srs maybe small quotes so that is done so by using this particular proc stats so that your sas chat software is in the back end that's the reason why these are all the statistical analysis you are performing it if you don't have a sas stat in the back end so then don't expect the statistical analysis to be performed right and again if you want to produce any pictorial representation if you see proc means processor g chart means it's a graphical chart you're writing it data equal to your data set name i'm just writing it here so i'll go for hearty dataset wise okay so in this dataset wise i want to know okay what i want to know v bar wise v bar b or v bar 3d format i need a graph so you just open your data of your heart so in this uh we want data so what we wanted death cause we want it so so death cause is a information i wanted how they died is it coronary heart disease or else unknown or else is it other diseases or else maybe cancer and something like that you want to know that so i'm writing v bar so if i'm just semicolon and run it so now you execute it so what happen the same graph will appear so now different different categories see people who are died with cancer it's an around 500 plus the people who are with cerebral disease so somewhere it's a nearly to the 400 so people who are with the heart diseases so there are there are more people with the other so you can able to see here right within the same category you want to display who are all males and who are all females you just write it just writing a semicolon sub group g-r-o-u-p in group equal to if you write it what is the variable name of your subgroup so now you just come here check your data set so is it sex yes i want to know that female wise information right you just write it sex wise information semi-colon so now you can able to produce the same graph can you see that right so around nearly 200 plus people are from your females and from 250 to above range so use your mail information something like that you can easily identify are usually able to produce so by seeing a graph itself you get to know that who are all died with which disease coronary heart disease people are more or died so because of this particular disease and all and apart from that so you want the analysis just imagine in this particular uh analysis so you want it so based on your smoking or weight wise smoking status wise you want to know that so then what you do is you just if you want to produce the same graph so you just write it the same you write another condition here called proc means procedure sort means you are sorting it data equal to don't worry don't worry about any of these particular things right now because everything is a separate class for you proc sort is your date and the proc g chart is your day 21 proc means is your day 17 right we'll talk about in detail so i'm just explaining what exactly need to be produced as a graph so i'm writing it here so sorry uh i'm just writing data control z so proxy data equal to your data set name says help dot heart i'm just writing it right so by which variable wise you want to sort it based on that this variable wise i want to group it so just keep the same and try to use it just by statement here so by that variable smoking status wise now what you can do is you see the same graph in a different pages okay let me just close it ah okay so the problem is it's a out equal to you are creating a new data set name ll because tomorrow i'm going to explain that you can't be able to overwrite sas output containing your data sets something like that that is the issue it's showing in the log see now can you able to see if smoking status equal to missing you can see smoking status equal to heavy how many people we have it here see with the death case wise so if you total people how many died nearly 130 members in this particular category so smoking status heavyweights and how many are died again smoking status likewise how many smoking status moderate wise how many or else smoking status non-smokers wise how many they died are smoking styles very heavy so how many they died so mostly males are died in this particular case you see this graph heavy smokers most of the people are is males only in this particular graph if you see right so based on that you can take a decision and these are all those things is possible what happened the data which is already available the only thing is as a programmer what you do is you're writing some codes so that no you just produce it the code also don't expect it's like a thousand lines of code under lines of code and all don't expect it's a simple course the only thing is you need to have a presence of mind exactly what need to be used so that you will get it through practice only so if you know that okay i need to calculate n mean median standard deviation and all yes i need to use a procedure called proc means if i want to produce any uh graphical representation then you can go for proc g charts and all right so you need to have a presence of mind that's it nothing special here so what exactly need to be done if you get a clarity that's what i said yesterday's class too so what you need it if you already know that what exactly uh need to be done right the requirement you're trying to understand the requirement is first you understood that 50 of your job is done then you can write your program according or else towards that to get it because just imagine here even when you don't know the programming also that's fine because at least you search in google and you can get something but you need to know that what need to be done see the programming syntax here and there if you forget it or maybe if you are not able to crack it always google is there for us so the only thing is you need to know that what exactly client is asking for am i delivering the same or else am i deviating from the client required one so you need to know that that's it right so this is about you your graphical representation imagine if you want to import some external data into sas environment yes that is also possible what we can do is so this is your sas graph software in the back end that's the reason why all the statistical analysis is performing so what we do is go to file click on open program sorry not open program go to file click on import data i can import these many files of these many types of files into sas i'll go for csv file to be imported comma separated file to be imported click next then automatically it will ask me where that particular file is located so that no in sas tutorial day 6 and 7 there are many files i have i'll choose one of the file to import it click next then once the data is imported into sas it should have my dataset name so the dataset name i'm just giving you as a volvo or something like that that's up to you which dataset name you want to give it click finish that's it just go there library over dataset is just imported can you see this data is just imported into sas environment without writing program that means we can import your excel file text file csv file dot dat files or any type of files mostly the sas or required format files we can able to import directly from your cdid drive and desktop and all how it is possible or else maybe you can import the data from your databases too how it is possible because sas accesses the software in the back end that's the reason why so these particular things are possible right now to do so sas that means all the statistical analysis you can perform sas graph means all the graphical representation we can perform sas access means you can import the data from your databases or desktops you drive drive and all you can do it because of this particular sas access product right so invoking of sas environment so there are a few things you need to know uh running of your sash so this particular set generally we call it as a interactive window sas what is interactive windows says so here so this is your interactive windows that means we are just working on editor window suddenly you want to go and check it what log messages errors you got it earlier you faced it then you can easily check it ah because of that i got an error so that you come back and you can fix this particular issue in your editor so this type of options is not available with your c programming and dot net and all so actually what happened those programming languages wherever you write a program on the same place only you will get the output and the same place only you will get the log but here it's an interactive window mode we can easily jump one window to one window one window to one window so that is possible so that is your interactive window mode and apart from that so we have a one more thing called interactive menu driver mode so what is menu driver mode just now i have used one option without writing a code i have imported the data from your external sources right by using proxy import processor and import data and all like this so this is called menu driven we have in the menu few options by using this few options what we can do is we can manage our job without writing any program right actually that is not allowed in our real time but in your organization they are using a software called sas enterprise guide so let me just open the sas enterprise guide says easy i'll write it directly so this is a sas enterprise guide once you know the sas the enterprise guide is easy to you you don't need to write anything in this particular price guide without writing a program also you can able to produce the output let's see see without writing a program i'll try to manage so to produce some outputs what i'll do is i'll go to servers local so tasks i want to produce the same graph i'll go for bar chart i want to produce it let's see so in which data set wise you want to produce the bar chart so i'll go for hot data set wise so hot data set i'm just opening it so next it is asking so how you want it so status is the variable i want it so it's a frequency graph group by it is asking so by sex variable wise i want to group it right so now it's asking chart to buy chart by smoking status very smoking status yes okay next 3d format i need it and let label to be displayed and finish can you just see the graph bar chart with the alive people with female this is the data alloy people with male this is the data and percentage wise also you can see and here also dead people with female with status wise you can see that so alive female and male again dead wise female and male you just generated did i written any code for it actually not written any code but you just go there and click on code so this is the code is written by written by sas for you automatically it will written in the back end so actually few of the organizations they are using this particular sas enterprise guide as a tool so that no uh what i can say as a software so they are using it for their purposes but in clinical sector none of the organizations are using this particular sas enterprise guide for a reporting analysis and even financial sector also few organizations they are using it because it is not solving our job 100 what happened you know if you want to change the colors or any customization here and there the direct options are not available you need to see for your code and you need to look for exactly where to change at all that means again you need to know how to change in the programming level itself you need to know that so that's the reason why so if you the person directly work on sas software they can directly work on enterprise guide to guide the software also without having any training see guys i have not taken any training on enterprise guide even in my starting of the career but in one of the organization when i joined they have provided me the enterprise guide i just learned this particular enterprise guide within one or two days it took my time so that to just explore all the options and statements what is there in sas in this particular enterprise guide you can easily produce it you don't need to worry about it why i'm talking about is so there are two options here one is interactive menu driver mode those options are more in your enterprise guide software right to just introduce enterprise guide software i just kept this one the menu options are more see even sas also we have a menu option but it's a limited but enterprise guide so we have many batch execution what is batch execution means if you want to execute the program in multiple programs in a single atom c as of now i have executed written these many programs right so except a g-chart so if i execute all the programs in a single item select it and run it and that's it that's done that means it's a batch execution then this particular program you can kept it in one particular place and so that you can tell to the sas exactly by what time and in or what date and what particular time and all to be executed so you can tell that to say automatically it will execute all the programs one by one one by one so that is called batch mode so we can run multiple programs in a single attempt in the sas that is possible non-interactive execution so what is non-interactive execution so you are running the program okay you just see on open sas you're executing the program and you are getting the output ready what happened this particular fraction of seconds in the back end even i2 don't know that so that means we can't able to see exactly what is happening in the back end so that is called non-interactive that means we can't able to see exactly what is there in the backend so that is a non-interactive execution of your sas while running a sas program you need to keep in the air keep these things in mind so interactive window mode and interrupt menu driver mode batch execution and non-interactive execution so sas wherever you go as a programmer right it may be clinical financial customer relationship management insurance companies health care industry or any organization you just go first they will give a raw data to you raw data in the sense just imagine says help dot containing hot data set is your raw data so what you need to do you need to process the data so that no the data step you write it so that says data set will be created to better example what we do is um see so this is the raw data of your client they have given to you so that you will write data onwards up to one step is called your data step so you write a data step to create a data set once you execute what is the final goal the data set will be get created go to your explorer window class is a data set the red ball color sign you can see this this is the data set so data set will be get created once you have a data set then that's up to you what you want to reduce it block print proxy chart proc means per correlation propagation property test for univariate up to any procedure you just use it so that you will produce output in output window whenever you write a procedure called proc automatically there will be a line plotted so what is this mean that means as default the program editor this particular enhanced editor is just distinguish between your data step and proc step so data onwards up to run step we call it as a data step proc onwards up to run step we call it as a proc step i'm writing proc print so semicolon and run that's it this is your prog step two steps we have in sas one is data step and second one is proc step so come here into this powerpoint presentation so you need to have raw data yes i have a raw data based on that i have created a data step yes i created my data step here data onwards up to one step i have written data step the result of data step is data set you just go there and secure yes as data set is created once the sas data set is created then it is your prog step that is your procedure what you want to generate it the as i said earlier proc means pro correlation progression or whatever the procedure you want to use it use it and finally report that particular result to your higher authority like your team leader manager client or whatever it is you will just submit those reports to them that's it you are done with your job right so this is the workflow wherever you go clinical financial customer relationship management insurance companies health care industry anywhere the role the workflow of sas programmer this is how exactly it is so there are two steps in our sas as i said right now one is data step and second one is proc step data on what's up to run step we call it as a data step rock onwards up to one step is called proc step so in future in upcoming classes of mine you get to know that what are other options we use it in your data step what other options we use it in a proc step we get to know right so what are all data step methods what are all the proc step methods and all who will see in upcoming classes so that's it that's all about for uh today right so hello everyone and uh today in the last class we just learned about uh like a day one so there we are going to uh so we learned like a so different windows a plus introduction to a software history and competitors of software and how to write a simple program within that program what are all the steps or data steps and proc step so all those stuff we have seen yesterday and now so we'll move on to the new concept so today like the different windows what we have in our sas in the each window wise we will see some options right so like a editor window so what are all the options we can use it and log window so what we have it in output window what we have it so mostly we will see today so to do that first of all let me just open my software so i'm just opening sas right so we know that once you open the sas we have a five windows editor log output explorer and result total five windows in our sas so these are like a five fingers in a hand as i said earlier right if you just open your editor window you can see one is like a search option second one new option and third one is open save print print preview cut copy paste undo new library and sas explorer running by like a symbol and into mark and break symbol and as well as this book symbol so what are all those things and how it is important for us right so suppose imagine you written some program here so i'm writing a small program data my data set name i can give my data set name i'll go for my data set name as an ido so there i'm just writing my column names by just mentioning my input statement so input is the statement i'm just writing it i'm giving my column names so x y and z is the three columns i'm specifying it and there i'm writing it here chords within a chord statement i'm just mentioning it so x value 10 a y value is 20 and z value is 30 and here uh 40 and 50 and 60 so semicolon and run that's it so i'm writing it proc means processor and print means you're printing it data equal to your data set name i'm just writing it here so that's mine i do and semicolon and run i'm just writing it that's it so that's my simple program so there is nothing new so now what we need to do is if i want to execute this program as i said there are three ways to execute it one is you can select and using this particular running board like a symbol or else you can use f3 button from your keyboard the another option is submit here you can use it if i type sub mit and click enter automatically program executed i'm not using a running board like a symbol i'm using a command mode so what exactly we can do with this particular command more so imagine i can execute the program that is one thing if i want to clear the program what i have written i can say that here clear and click enter or else so you cleared it you want to roll back that particular program imagine i need that particular program again back due to unexpectedly i clear it so i need to bring it back then use this particular option called undo you click on undo it will just bring back or else we can use control z from your keyboard that's up to you either of one so you can use undo or else control data and imagine not only this so by using this particular search what we can else do is go to libraries and say help open any data set we'll go for our favorite data set called class data set we'll open it see we have a name sex age height weight wise the information is available but i want to display the variables in this particular data here only for uh only sexy equal to female information i want to display only females i don't want male and females combined together so generally if i want only female we need to write a program so instead of just writing a program what we do is we can write a a a small program like some conditions saying it where okay sex equal to female and as well as and one more condition i want to use it is greater than 14 i want it so you write it the program so how it is automatically coming it because you just drop down it these are all the statements or options i have written earlier so this will be stored for our future purpose whenever it's required you select it and then you will get it or else where success of female is greater than 15 15 years you want it yes select it then click enter so that what happened is greater than 15 years there is no females in our data okay so now we'll go for where females is greater than 14 how many we have in the data yes we have only one person two persons in our data one is uh uh janet and second one is mary so we have it here so years with uh above 14 years in our data so that means by using this search we can able to filter the values also if required and apart from that not only filter and right now it is displaying many variables so you don't want all the variables to say right now it's a small data set maybe you will not see uh to keep a few variables let's say uh open a big data set so open like a hot data sets imagine there are many variables here so now i decided not to keep all these variables so i need it only um height and weight variables to be displayed so then what you can do is you can use an option called show within a show you just write it what variables to be shown so you make sure in decorations you just write it so one is height right so you just write it h i g h t height and again w i g h t weight and click enter so that no it will keep only these two variables so show use option will be used to just display the variables in your data set right so by using this particular search bar we can just to play with your data sets and play with your the throughout sas but unfortunately it is bit ignored not completely ignored so it's a bit less useful in real time so because in windows version of your sas if you are using it without writing these particular statements and options in this particular sets we can able to control your data set just imagine i want to do the same thing again so what i can do is see earlier i used to write the conditions and all here right what i can do is simply go here go to data click on hide and unhide then you just hide all the variables what variables you want to show one is height so you just show it and second one is wait you just show it and click enter that's it without writing this particular show and all you are getting it and apart from that in a class data set earlier i have done one more also so let me just open class data set so there are may females information which is greater than 14 are we want it so without writing this particular code what we can do is in this particular windows version of sas right click on it click on where so sex wise there are many data uh informations here so sex equal to what you want it only female information i need it so end what i want it so is greater than 14 i need it so click ok can i see this so without writing a uh this particular program here we can easily control it by just selecting some options here and there so don't worry we are going to talk about in detail on the div toll in there so conditional statements and operators when we are talking about we will see in detail for a while you try to understand either we can use this particular search or else you can use a manual options also it will work but this search option is very important in your unix version of sas when you are working with the unix version you don't have a chance to click on where and keep and hide and all so mostly you need to manage your data set with this particular search option with writing all the commands sometimes if you don't want to uh uh see you want to close your size just imagine you simply say buy here so automatically sas will get closed if you write it see it is asking me do you want to close this particular enhanced editor so do you want yes no so if you say yes it will get stored then it will ask me where you want to store this particular output otherwise what happened you know i'll keep it today's practice then session is got close because i have used an option called buy automatically it will just close the sash so if you wanted that again back so what you can do is you just open sas first of all so once software is got open now go to your so here is one more icon called open program so you click on open program then you can open the program where you saved the program i saved it today is today practice you just open it there you can see that the program what you have written it will be there so first of all let me just explain from this icon so now you know that a search option what options we can do with search and second one is here your new what is the new if i click on new so that another window will open see right now you are at one window that is your today's practice window so if i click on new another window will open so actually what is the purpose of this windows in real time imagine you are doing a programming with your software today and your colleague came to your desk and asking some questions so that to explain something to him so you open up some more or else one more window then you can explain the things what is required to him and you can explain and you can close it and so that what happened you know your program will be still as it is okay there is no change in your program so you cannot disturb you should not disturb your program at all but still you can able to open a multiple windows or else imagine in your real time when you are working on one project so they have given a reference program to you so the reference program also you want to keep open and uh the new program what you're writing also you want to open very simple if you want to open the reference program go to open program imagine they have given a reference program for my uh project so daily is the reference program they have given just imagine so you just open the reference program in another editor and you're currently writing program in one editor so that you want to check it okay what program you have written earlier you can check it and you can copy if required from this particular window to here and you can paste it also that is possible so by using this particular new option rs control n option is used to create a new new editors you click on new then automatically new editor every time will come up anyone have any questions until here please speak out right so able to follow me right so am i fast just let me know if i'm fast yeah i'm able to follow thank you so remaining also frank kernel priya good thank you so now you see this this is your new option so that no new editor window will open apart from that if you want to open the program what is the open program imagine today you have written your program you want to save this particular program so how i can say i click on save option then automatically it will ask me where you want to save but unfortunately this particular program is already saved if i'm clicking on save automatically saved into the today's practice what i will do is i'll copy this particular program for a while let me open my sas again open yes imagine so today i open this particular sas and i have written some program like this so now if i want to save it so then how i'm going to save it you just use an option called save option once you click on the save then it will ask me where you are interested to save this particular program that's up to you you can choose any of the drive in real time what happen you know you may have a server locations so like there is also like a desktop you see a c drive d drive and all but that is a virtual computer not a general computer of yours because most of the client work you will work under uh with virtual computer only virtual computers in the sense as you already know that once you log in with your credential like a username and password there you can able to see a separate desktop for you so there you have a sas and all the all the stuff whatever his client is sharing with you you can able to see that so imagine in the virtual desktop you can also see like desktop libraries and all so then you decide where you are interested to save it so actually uh in real time we have a project folder separate folder so in that folder we use usually save all the files or programs whatever is required for our project so we'll go for for today so just up within a desktop there are many files i'll go for new folder 15 i want to store my program here in the new folder 15 so when i'm just storing here i need to give some name here so the name i can give any name that's not a problem but good practices in real time what you have to do is you must have to uh specify your program name without having space plus don't write any special characters so let's see your program name is um right so you're producing a demographic table so right how you write it so demo okay so if it is a table it is creating a table of your program then write it t underscore demo underscore table so that what happened you know so if you save the program like this see it is just giving a meaning so like you are producing a demographic table information by using this particular program so the programming naming convention should be easy so that somebody looking into your program also they should have everywhere that yes this program is working to create a demographic tables so like that it will just give a feel so that's the reason why we always need to follow a gpp good programming practice so if the program is creating a table the table name is demo so is using it here and while saving it you can save it and automatically you can see the extension of this particular file is dot sas so that means in world every uh file have some extensions suppose you imagine uh if you are listening some good video it said that mp4 is a extension uh sorry you're watching good video it's a dot mp4 if you are listening some music dot mp3 you're reading some book or it's a dot pdf you're typing some document it dot doc if you are opening a notepad dot text like that in world every file have some extension is the same way even sas program file also have some extension the program file extension is nothing but dot sas once you get a job and they have given a bulk of files to you you want to identify who what are all the sas program files very simple the names which are ending with dot sas extension all are comes under your sas program files only so i'm just using this particular option called save then i'm just saving into my new folder 15 so immediately what happened you know once you save it instead of just editor window the name automatically it will be turned into a demo table so now you go there on to your desktop so in your new folder right so just go there desktop so go to the new folder 15 so there you can see that the data set that is your um the program it just got saved here so if i want to open tomorrow what i can do is i need to use an option here so imagine you close it go to open file and open program then use an option demo table program you want to open it yes you just open and this is how it looks like right so either you can use control s or else you can just use an option called save also or else you want to save this particular program as a different name suppose imagine client has given this program to you as a reference you should not do any modifications or changes to this program definitely you have to save this particular program in a different name so if so that no i cannot overwrite my existing program of client so if i want to save this particular program with a different name so then i'll go to file click on save as then it will ask me what name you want to save it okay my name is t underscore demo table 1 or something like that i want to save it yes i can save it so that this is how it got saved right so you already know right now so we can use a new option you can open the program you can save the program and one more if i want to print you can print the program like this but we never ever do a print in real time because all the programs and data what we are just dealing with all our confidential information so mostly we never ever take a printout until unless or something is demands you uh from your organization so that you need to have a proper approvals to do a printout otherwise it's a principal offense in real time so you need to make sure not to take any printouts or anything so yes sometimes you for me your meeting a few of the things you want to showcase to your other colleagues or something like that there's a presentation so yes you can take a print out by using this particular printer option so automatically it will get to in your printer and then this particular program will get printed and print preview before printing this particular program you want to see that how the preview appearing so on your a4 size sheet you can see that but these two options are completely ignored in real time we never use it in our throughout life and apart from that there is one more symbol called scissors what is this cut symbol imagine there is a cut paste and copy paste i think most of you already know that what is cut paste you select the program and you just use right click and cut it so that means it is deleted from here now you want to paste it then use this particular option it is pasting you want to paste it again one more time paste it again one more time paste it again one more time paste it like that so cut paste means it is just cut the data from that particular cut the program from that particular place and pasting into a different uh positions again and again yes that is possible so copy paste and cut paste so this is cut paste what is copy paste nothing but see these many times you return your program which is not required to me so then i'll use an option called undo undo undo so that it's rollback if you want it the same program again required to you then control y control y control y that means redo ctrl z for undo ctrl y for redo ctrl copy ctrl c for copying and ctrl x for cut ctrl v for paste right these are all the shortcuts all right if i wanted to see imagine i'm using ctrl c from my keyboard then i'm just pasting it so i can paste like this i can paste it so i can edit it the programs like this okay this program name is naidu and another program my name is knight one another program is knight two another program is an id3 or something like that i can make it so i can run all the programs in a single attempt and now you can see that go to your library race and work library you can see all the data sets 9291.92 and all the data sets you can see it has angle attempt yeah that's possible so we can able to create uh like this and you can copy and paste if you don't want these actions to be created then you just go for control that controls it control it and control that and sometimes you return an id is a capsulator or else maybe a client is interested the total program to be appear in the form of capsulator how we can make it very simple select the total program ctrl shift yo so that everything into the cap uppercases so if you don't want everything in uppercases then again ctrl shift l everything into lowercases right ctrl shift u and ctrl shift l so changing the values into uppercase and lowercase and sometimes while executing the program you don't want this particular prog step to be run but at the same time i don't want to remove also imagine you have 1000 lines of code in the thousand lines of code around 10 lines of code you are not using it because that particular 10 lines of code maybe it's not solving your purpose for a while in future that is definitely required so what we do in that time you know we will comment that particular 10 lines of code how to comment and what is comment and what is the purpose so generally if you are not commenting or anything default the 10 lines also will be executed sometimes it may cause some issues or maybe sometimes it may not cause some issues maybe you can see some not required output you may generate it right so in that case what we can do is we can comment those lines that means that particular piece of program will be with us but once you execute it won't execute the 10 lines so how we can do that by just mentioning control with question mark select the piece of line lines where you don't want to run it so i'm in this case i'm interested to just not to run this particular two lines of code so i'm just selecting it then i'm using an option control with question mark so it just got commented whenever you see something in a green color lines that means this particular program is just commented even though you execute your program don't expect your output and output window there is no errors you just go there and check it there is no error still you are not getting output and output window because we just uh just what i can say we just masked it we just stopped it not to execute this particular piece of lines right so that there is no chance to execute it and finally the output you won't get it so see in real time imagine this particular piece of line is again required for your real program then you do control safety with l so that no undoing a sorry uh control shift with question mark so that undo comments and then you can execute your program then it will work whenever you see something in your program with the green color that particular lines of code will not be executed by default or else either you can manually give your comments like this okay yes you can manually also type it like this you can manually also type or else you can give control shift with question mark or control control with question mark or control shift with question mark you want to undo comments you just write ctrl shift with question mark and one more there are certain certain situations you wanted only one line not the multiple lines only one line not to be executed then what you can do is just mention the star that's it so start with semicolon this is also another way of commenting it so there are three ways of commenting one is with control with question mark slash with star and again slash star with slash that is comment or else you just mention star with a line only this line is commented i again run line is not commented it still work so this particular line only will get commented if i write men if i mention the start here so what is the purpose of this comment line in real time imagine you written some program and you have done some actions over there so then the comment line should tell that exactly what you have done in your program suppose you written a program to import some external data into sas environment so that that is all the new patients information then your comments line should be importing of external data for a new patients so that no when somebody is looking into your program this particular step why you have written they'll get to know that so writing a comment line is always a good practice so gpp role so clean so that is your good programming practice always writing a good comment so before starting your program so that behalf of your url may be options of you or somebody else is looking into your program they'll be in a situation to understand each and every line what you have written so that is the use of this particular commenting lines so and apart from that so you have control what i can say control cut so that means cut copy paste and undo and all you have done so if you want to set something imagine i'll open a big program i'll go for google drive sas project i'm just trying to open some programmer so that no [Music] imagine this was a big program you have written here okay now you want to know that uh where i have calculated mean proc mean where i have written i don't know so i want to know that in this particular around 300 lines and all so if you want to do that just give a ctrl f then automatically it will ask me uh to search it what i want to search i want to search what i want it mean i have written where i need written a proc mean so i'll write it directly write it mean i want to search it click find next yes i written here proc means is the step i have written here so i can able to find out and again find next is there any other place you written me in here here here here so there are many places i have written a mean so yes i can able to find out and one more if i find any data set suppose imagine is there any data set written with the name as a kk suppose here i'm just using ctrl h ctrl h is nothing but replace so find and replace i want to find out wherever you have written a dataset kk and replace that kk data set with an ido so replace it where it is yes data kk you have written instead of kk you want to replace with naido click on replace then automatically it will get replaced and again one more time yes replace that's it there is no more values here so it will be just replaced your values by using find that is your control h ctrl f for find ctrl h for find and replace right so and apart from that here uh new library and explorer window i will leave it for a while because when i'm talking about explorer window in detail we'll just go out there and learn there and running by like a symbol so we use this particular symbol as you already know that we can submit your program and then we can execute it so that all the programs will get executed in our sas so that's possible right that you already seen or else you have written some programs here but you don't want to keep that program with you anymore then you can use an option called clear so once you click on clear automatically you're clearing all the programs what you have written either there are two ways to clearing your program one is you can select it and then you can delete it or else you can do you can select it and give a backspace of yours it will just delete it so that's up to you what you want to use it right so here so we can use an option to clear or else you can use a backspace to clear all and one more in this particular break option what we can do is suppose you written some program i'm just writing it so here i'll just uh um write the program like this so what i'll do is i'll not give a run statement here okay just imagine i forget to give a run statement i'm executing the program now so once you executed what happened you can see that the proc print is running so that means it is not stopping because of your run statement you forget it the program is keep on running it is not executing out so what happened the issue is i forget to write a run statement then i realized it so i have not written a run statement so this type of programs you want to stop it in the middle itself without executing then you can use an option called break so break is nothing but once you click on it then it will ask me what you want to do do you want to submit the cancel uh cancel the submitted statement click yes so you do want yes yes see the cancel submitted statement whatever the program you have written you want to stop it just you stopped it or else unexpectedly you clicked on it then you want to cancel this particular submitted statement first dialogue second dialogue is nothing but cancel this dialogue so because unfortunately you clicked on this particular icon so that this particular task manager is open you want to close it yes you close it or else you want to really terminate your sas terminate in the sense so it will close the satisfaction for today so click on this particular sas and click ok then automatically some system will get terminated so that is the use of an option this is called break this break symbol we use it whenever some programs are not responding to you imagine you written a program that usually need to be executed within a five minutes of time after 15 minutes 20 minutes and 30 minutes of time also still the program is keep on getting executed then you realize that okay there is something wrong with your program you want to correct it then you want to stop that particular action which is going on so then you use this particular option called break and once you click on the break automatically it will stop that executed program so then you can edit it and modify it and you can rerun the program if required so brick is the symbol we use mostly when we are dealing with loops right so we will see in day 13th class in detail so how it will work and there is one more icon called book color icon so that is your book is nothing but it's a sas help documentation so you doesn't require any um internet or anything if you want to see some syntax how to write and all what you have to do is generally just click on this particular help documentation then it will take a bit of time not completely more time it will take some time see this is your sas help documentation so you want to know that how to write your program how to start with your sas and all so you can see that you can see there are steps wise all the programs one by one one by one what to write you can able to see in this particular help documentation all the programs right so if you don't know how to write a accord statement just write it cards and click enter how to write a chord statement they clearly explained in this particular program data line statement or chord statement can you see now see the program is written for your cards or data line statement how to write it so you can able to see and you can able to copy paste the program and then you can work on it got it so this help documentation sometimes useful i can say most of your organizations is having access to the google so i can say better than this particular uh self documentation go for google you will always find the best result and which is suitable to you because you remember one thing you are not the first person or else you are not the scientist you just generating some issues or something like that imagine there are some people having the same issue in the world they already rised and they already produced some concern for the same so that there will be a resolution uh in the online always always available so you have to make sure to find out but don't search for each and every small thing also in online you won't get it if you think that the error is completely weird you don't know how to fix it then you type that particular error what you're facing it and copy it from the log and paste it in google so automatically you will get it the proper uh issue very exactly happening and all with a proper explanation so the sas communities website communities in the center like all the sas guys who are working and who are all experienced who are all specific specifically working for this resolving uh issues and all so there are some forums which is available in the google itself when you are searching also those forums only get it for top so you can see your result what exactly happening and all and if you want you can ask the question also to them right in the particular training period of mine yes i always available after training also i'll be always available still there are some situations you want to raise a concern about a particular program or something like that you can always write it in the forums which is already there in the sas website official forums so that you can get one or two days so within a business days you will get a reply with the issue what you are having with right so this is all about your edited window how you can write the program and how we save and how we done and can you just see into my uh edited window that t underscore demo table 1 is it got saved or not saved how you say is my program got saved no it's not safe no how can you say it's not saved because right you're right so there will be a small aztec sign it's appearing here this resembles your program is not selling then you just give a control s then automatically this particular stock mark is gone imagine you're writing the program in real time you want to go for a tr coffee something like that with your colleague so then you want to save the program so then you want to know that either this particular program is saved or not when you give a control s automatically the star mark will go off suppose imagine if i click even one enter i click on enter so then again the store mark came into picture because is there any unsaved changes with your program the star mark always appear once you click on save then automatically star mark will go off i hope i'm clear anyone have any questions am i clear to all yeah i have a i have a question about the um the formatting of of the program itself in terms of you mentioned something i think the other day about um submitting programs i guess to a client or to the fda so in terms of variables and the key words for uppercase lowercase or prop case or indentation is there a certain standard that that they want usually uh yes so all the variable names should be in a capsule letter in your data all the variable names should be capsulator the program you write it in a capsulator a small letter is fine so mostly we write it with small letters only all the program but the variable names once you save it in your data set you see and go to your each wise data set okay now go to your explorer window walk library okay it's overlapping i do one you created can you see the variable names are small letters right right now can i see this this should be in a capsule letter this is standard you have to follow except that there is no separate rules like definitely it should be capsulators or small letters nothing like that so you can write your program in a capsule letter as a small data but the indentation is must so the proc step should start from uh see the run step exactly need to be start immediately to your run statement proc step exactly this one and as well as run step you have to write it here got it okay yeah right so then it's follow the gpb so this is all about for today so explaining about editor window with the different options of what i have just covered right so in the last class we just learned about like um so what are all the different windows we have in sas in the each window wise we have seen like mainly editor window we have seen options like a new um what i can say is save open print print preview and running by like a symbol and as well as a break and all so we have seen so now we will move on to the next concept like a what are all the things you will see in log window and output window explorer and result over the same for that first of all let me just open sash right so now right so we'll write a simple program so data your data set name so you can write the data set name i'll go for naidu and semicolon so import i'm just specifying my column names like x is one column y is one column z semicolon so there i'm just writing cards so i'm writing it the value it's a hundred so 200 300 and again i'm writing 300 so here maybe 400 500 and 600 i'm just writing it click here semicolon and run i'm just writing it so that's okay so if i'm just executing this program what happened so you just clear your log see this is just a log window so once you run this particular once you run this particular program and execute it so now it's done so what happened we don't know so what we need to do we need to check in your log so log is the window actually we use it uh for checking of your errors and warning messages so now what happened you just go there and check it see log is not saying anything but still there are some messages in your log there are two types of colors you can see in your log so one is your blue color one and second one is called your black color one so the blue color one we call it as in it's a notes of your program and the black color one is called source source is nothing but whatever the program you have written so that is your source and the blue color one is all nodes so what is the difference between these two the blue color one is talking about how many observations we have that means how many rows we have how many variables we have and how much time it took to execute this particular program and all those stuff you can see in your uh note message where coming to the source message is just talking about uh from the top to bottom all the program whatever you have written so it is just displaying so that is the difference between so this tone actually it is not causing any issue or anything but in real time whenever you run any program default it will be get displayed okay so now the issue is here you can see so two messages that's completely fine there is no issue on that but imagine if i'm just doing some mistake here instead of cards imagine i try to spell it as a chord i know that it's a spelling mistake but unfortunately i don't know because i have around 100 lines of code exactly i don't know where exactly i have done the mistake so i thought of just running my program but i'm just clicking on running the program so now i just executed so what happened even i2 don't know that so what i have to do is go to your log and then you check it so what you can see right now earlier we see only two colors one is black and blue but now it is one more added so the one more added one you can see that is called green so the green color message we call it as a it's a warning so what is warning nothing but whenever you you have written a program so whenever you have an issue uh a minor issue i can say that it's a completely issue so that no it will stop your execution of the program so that no you can't able to create a data set and all go to your libraries and work library so there you can see that the naidu data set has created there is no doubt in that creating a data set but what is this warning is talking about warning message is just mainly for so to know that there are some some what i can say so ignorable messages i can say sometimes not all the times the warning messages so warning message right now it's a bit ignorable because uh you see that assuming symbol cards was misspelled as a card so that sas is just alerting us so there is a spinning mistake in your program but sas is working so that it is not completely stopping because of spilling mistake the program is not executing or something like that no it's not that so it is just a spelling mistake but sas will continue so that's the reason why it's giving a warning so how important this warning before submitting your report to your client or manager and all you need to make sure whenever you are submitting your report the log should have only notes and notes and source messages only you should not have any errors you should not have any warning messages so if you want to get rid of this particular warning message so you have to make sure to write a statement here saying it so cards so once you mentioned it's a cards and execute the program now and run it again and now you can see that the new data set has just got created so now you can see that everything is gone so earlier we used to get a warning message but now i don't have any warning messages and now you can see that and new data set is just created x is a value and y is the value and z is a value you are getting it fine clear any questions so what is warning is nothing but warning is sometimes if you write a spelling mistake sometimes if you forget to write a semicolons and all so you will get the warning so because of the warning you don't expect the complete output will be stop of output creation will be stopped or something like that so it will work there is no doubt in that so but with minute what i can say so that means it's not completely correct there are some issues in your program or maybe there are some issues in your output also sometimes okay but right now it's a small output you may not see that what exactly the differences are but imagine if you are working with a thousand lines of code so if you see some warning messages you should not trust your trust on your output at all even though the output is created so don't trust on it so you need to make sure to how error free and warning free of log right and one more imagine i'm just writing it okay i misspelled and i just corrected it i'm writing a program here saying it a proc means so i'm writing it frog means procedure print means i'm just printing it data equal to my data set name i'm writing it it's an ido and semicolon and run actually i forget to put the semicolon after my naido imagine it's a small mistake again when comparing with earlier one so when i try to execute the program and run it now now you can see it's not giving you output that means so it's see earlier at least the data set has created and it you can see that naidu data set in your work library there is no doubt in that but right now when i try to execute the program and run it now so what happened it is not executing and means not giving any output or anything let's see what happen what mistake i have done you can see that there is a one more color called red so there is red color whenever you see a red color it's a completely syntax error so what is the syntax error expecting one of the following sas is expecting either semicolon or comma in this particular place so maybe it's not giving exactly the okay after your naidu statement you forget to give a semicolon statement or something like that no it will give the 84 85 percent uh uh correct issue where exactly the issue is see it is highlighting near to your run statement what is the near to the run statement what is that before statement need to run that is your proc print data equal to knight do you forget it see these are all the possible options what we can write it with this particular uh space so that means in this part after naidu you can write double obs heading label n n obs and all but right now i'm not going to in detail about all these options what we do but yes so here we forget as semicolon so that it leads to a syntax error imagine instead of data if you write a spelling mistake as a imagine you corrected this one so instead of data you make it as a dda okay now you execute the program and run it once you execute the program and run it can you see that so x and y and z is the three columns you are getting it and go to the log so what happened it's again spilling mistake so assuming symbol data was misspelled as a data so something like this okay instead of proc you just give it a rock okay just give me and just give it like this so once you execute it and run it now you can see that it's a completely sas not able to recognize statement is not valid or it's used in out of proper order so sas is not getting it what exactly you have mentioned if the statement is not correct even though the statement is not correct we don't know what exactly uh maybe you have not written that particular statement in a proper order right so these are the four messages you need to keep in mind one is notes source error and warning so these four types of colors you can see in your log if you want to clear your log you just use an option called here click new so click on new so that all the log whatever you have created as of now will be get cleared so then you have to rerun your program one more time so that no you can get a fresh log and you can submit your report and guys remember one thing if you are going for any interview of uh giving a exam so interview giving exam in the sense they will a written test okay if you are going for a written test for a sas programming job so they will give us a software to you they may give you one task to you so once you are just uh start writing a task so that means start typing your program and all after few seconds later maybe few minutes later as you are a human being so definitely we do uh some mistakes so what happened in this case you know the mistakes will be automatically will be logged out right so everything is getting locked so after finishing the task maybe you have done with your task successfully but you haven't cleared your log the earlier logs so then what happens you know when somebody is looking into your program first they look into your log so what type of errors you faced it then how to how you overcome that situation suppose if you are writing a small thing like a a small mistake and then you are trying to spend much time on just fixing a small issue so they will they may doubt you are so doubt on that particular task or maybe they made out on your skill set and all so what you have to do is once they have given it so and you have finished your task you clear your log everything fresh all the log whatever you have it so just go to your log and you can give a control e or else control u means it's arrays or else you can go there and use this particular option either of option you can use it you just erase all the logs whatever you have generated and the fresh program suppose just imagine earlier i got an error but now i error fixed right now so i'll select it and run it so that no you can go there and check my log okay i have not fixed it data detail so first i need to clear my log again so freshly generate log one more time then go to log that's it now send this particular program reporter in whatever it is to client or maybe your team lead or maybe the person who is giving a task to you so they will you no need to send for them if you just leave your computer as it is so that they'll take access of your computer and they'll see how you perform the task what log messages and how you fix them all right so make sure don't judge someone by looking into your lock okay yes we do a mistakes but uh write a program and erase everything at last before submitting the report to the client is anyone have any questions on this yes please guys i'm just asking you because i'm into a limited internet connection i have an issue and i have a fear of always that maybe the internet is got disconnected or something can i just confirm that someone so you know no questions one question yes please regard regarding the warnings so is it correct to say that if you get a warning it will never stop if you if you only get warnings one or more warnings it will not stop execution of the full program uh see it's a ignorable warning message you see there are two messages you see one is d a t a so instead of d a t i have written d e t a right so sas thinks that it's correct and one more so we're coming to the cards i misspell it as a chords so i written a spelling mistake there sas can correct it but it's the same time instead of proc i written as a rro ck right rrboc so there what happened so sas is not completely recognizing that means whatever the system defined options when you are writing here and there sas can able to understand until it's a blue color whenever it is in a red color definitely sas won't able to recognize yes warning messages will not stop with this type of issues in real time whenever you have a warning so mostly it will stop your output even though output is created don't trust on that particular output no matter what okay is it executed or not executed at all so if you want to become a good sas programmer what you have to do is you execute the program check your log until unless log how any issues either earning warning or any error message then only you check your output until that don't trust on the output this is just a basic fund first of all yes sometimes if you have a warnings also it will be get executed sometimes it won't okay because i recall seeing in the sas certification um book i have something about if you get a warning does it stop does it stop execution of the program it will continue for next pros and next programs execution if it is yeah okay thank you right so guys and one more if i want to save this particular log why to save a log what is the purpose in real time so whenever you are submitting your reports to client so you have to submit your log also so what this log will do this is the proof that is this is a proof based on this particular program you generated this log log is exactly the proof you you haven't have any errors or warning messages and all and not only just to proof of your submitting your reports to fd or someone else so it is just a proof of your reviewer also what is reviewer who who is the reviewer so reviewer also a sas programmer just imagine we are right now as a team around 15 members in this batch right now i'm talking veda so imagine we work on the one project all the 15 members we're working on the one project i'm a trial programmer the person who is just leading the study so rs leading the project is the trial programmer so you people all are support programmers so there are around 100 outputs to be generated so all the 100 outputs divided into 10 10 10 10 10 each so that what happened so frank do 10 and karna do is going to 10 and pre-anchor 10 like that all the 10 members just having a 10-10 outputs to be generated so whatever frank has generated and will give it to karna so karna whatever she generated she'll give it to priyanka priyanka whatever he is generating so give it to the rundeep that means programmer is a tester a tester is a programmer in sas programming field so there is no testing team or else there is no reviewing team or no qc team you will be a chance sometimes to working as a programmer you will be getting a chance in real time sometimes you're working as a validator so we call it as a validator also so that's again sas programming job is only one thing you need to know sometimes you will get a programming job from sometimes you will get a reviewing job that is your validating job clear questions in this right so so vlog so somebody is looking into your log suppose you must imagine maybe frank is looking into the karna's output output so so mostly he'll he need to look into the kana's lag also when karna's log when she is when he is looking on it so definitely he should have only notes and error notes and sources only you should not have any errors or warning messages at all so if he finds something so that immediately write a mail or maybe there will be a excel sheet we call it as a issue tracker so in that issue tracker we will mention it okay this particular output how this issue and i find out so can you just rerun your program and fix that fix the issue and rerun the program and do let me know so that she need to rerun and she need to get rid of that particular warning then so we need to so send it back to frank so the frank will review again and imagine what if frank also misses that so imagine frank is reviewing it so unfortunately frank missed that particular point uh what she has done the mistake so that that me that i'm a trial programmer i'm the uh it's like a gateway for submitting all the reports from my end to some other other persons right so definitely so what i'll do is i'll also double check there are some standard macros with me so that what happened you know uh that macros it will read all the logs into sas environment so that no it will check is there any errors or warning messages not only one program the total uh folder containing around 100 programs logs also i can check in a single attempt by just using some macros right so then i'll take a confirmation that there is no errors and there is no warning then i'll submit reports to the higher authorities right understand how the log important so log place so sorry log plays a important role in checking of errors and warning messages in real time right so if you want to clear you just give a ctrl a and one more thing is the difference between your editor window and log window when edit when editor window when editor window when i'm just clicking on it if i'm just using an option called new so that new window will open but when you're coming to the log window when i click on new it will be just erased everything so you just go there and check it see everything is get erased you will not get it so control you you can use it or else arrays you can use it and you can option write it what you can write it yesterday i also have inform so clear if you write a clear in this particular search and enter it will be get cleared this particular log so this is all about log and one more when you are trying to save this particular log okay rerun the program again one more time and one more i want to tell you here see i always select the program and running it so why to select it without selecting can i run the program i can say yes so the thing is why to select it why sometimes why not to select it see when i'm selecting it that means i'm telling my sas to just execute only this piece of lines that means one to ten lines only i'm just executing imagine if i'm not selecting if i'm running it what happen imagine in this particular program around thousand lines of code we have it all the thousand lines will be get executed so in this particular program if i'm selecting also i'm not selecting also is there any difference both also 10 lines of code only right so you can run it but when we will select it and we'll run it when we have an a uh only huge lines of code you want to run only piece of information yes then you have to select it so without selecting also i'm just running my program yes i executed so that allah editor window containing all the programs will get executed and now you can see that log and now you want to save the log how you are going to save the log go to file click on save as so then you can save where you want to save it you just give a destination where you are going to save this particular log i'm saving to my desktops you drive d drive that's up to you maybe in your project folder so default guys whenever you are giving an option called save automatically it will give a location of where you want to save it in default in real time suppose imagine logs to be saved into that particular x folder extension so that automatically it will go there and save into that destination it will open immediately it will open like this then you can save click on save then you have to give a name and when you are giving a name so the log file also will have the same name of your program suppose my program name today i have created t underscore demo dot demo underscore table one something like that imagine log also should be saved with the same name because the program of this particular program name this is the log and the output also with the same name right so that no it is easy for you to track it what is the program what is the log and what is output all three uh what i can all three files in a one particular category you will have it right based on the name so here also when you are saving it so the file will be get saved with the name of dot loz so what is the log it's a log file extension so log file extension in the sensor so in real time uh each file have some extensions right as i said earlier the program files we have seen dot sas this is your log file extension log file extension is going to be dot loz is a log file extension when you save this particular file to your desktop okay let me just save it as a you on to my desktop i'm just right just doing it go to my desktop you here it is appear right click on it go to properties and there you can see that the file is dot log is the extension it is showing can you see uu is the file name dot log is the extension you are getting it here this is how the log file we just working working on it in real time so four messages are important errors warnings logs sorry error warning notes and source total four messages nothing more than that except from this four good so now we will go for output window imagine if i'm running the program data onwards up to one step what happen you won't get any output in output window you want you can run the program you can select it and you can run the program yes i'm just running it and go to the uh output see first of all this clear the output also this is my old outputs so i'm just running the program and i'm expecting output to be created in output window unfortunately i won't get the output so what is the issue what happens the output won't be created the reason behind that is the program what you have written is not enough so what you have to do then so you have to make sure so you have to make sure to write it a step called proc until writing a proc don't expect your output to be created so proc means it's a procedure it may either you can write block print proc means frequency proper correlation propagation from univariate proxy chart any procedures if you write it you can able to get your output right so i'm just writing it proc print i'm writing it so data equal to your data set name so the dataset name i'm just writing it it's naido and i'm just using it run so that no if i activate it i'll see if i run this particular line that means if i execute only proc step then you can expect the output in output window so now i'm executing it yes this then and output is got created can you see that now and now so if you just carefully observe in your output window a few things which we have not mentioned in our program still you can able to see in your output window the thing is first one is obs column actually we have a x y and z is the only three columns but there is no obs column we have given on our input statement but still the obvious column is appearing in your output window the reason behind that is so db default the obs column will be displayed so if you just open any ms office excel default you can see the serial number will be appear in your left side of your columns is the same way default whenever you execute any program how many observations in that particular data will be get shown as a obs column and apart from that the sas system is the title you are getting it actually the system is the title i have not given by my own so by default whenever you execute the program says default the sas system is the title it will give it here and one more like a system timer so my computer time is uh when i started my particular sas station so that it's a six o'clock uh three minutes or sometime like that in that time so that while on my size so that is the same time it is displaying so day of my system and as well as so the date and as well as you can see uh 2019 as a year and what is this five why i'm talking about five what is this five why it's appearing as a five it is your page number so whenever you just run this particular program suppose just imagine i'm running the same program one more time so that what happen execute it now you can see that page number six you will get it each successful execution of your proc step leads to a creating a new page in your output window every time so you run the same program let it be it's the same program but if i execute the program one more time so that new window will be open every time is it making sense yes no questions right so now what happen is so you can clear your um what i can say output also by just using an option called new so that output will be get clear so that what you can do you can rerun the program one more time so that you can freshly create output if required and you can print also if required and you can save it also when you are saving it the file name is l with lst lst lst so lst is the list extension we call it as a for output file so dot sas for program files dot log for log file dot lst for your output file extension you can able to see right so you can save the log also but this is like a text format of output this is not a general output what we submit to your client this is just like a text format imagine you are interested to produce the output in the form of a pdf or rtf document so then you have to make sure to produce that by using ods concept of output delivery system ods means that we will talk about later for a while so this is just a standalone rlc this is the default output when you are submitting or to your client it is in the form of dot lst so these are the three files extensions what we have in our output window is anyone have any questions on your editor log and output any questions no questions good so now we will move on to the explorer window right so explorer window is the window it is like a heart for a sas let's see what options we have it in explorer window when you click on this particular expo explorer window see the explorer window appear like this so default you can see that libraries and file shortcuts and favorites and folders and this pc so libraries is the key place where you can store your output in the form of a data set so in this library this you just see mainly like you you have all the libraries like helps as user and work is the three default libraries we have and apart from that uh you can see file shortcuts and this pc and all what is the important of these what exactly important nothing actually if we never use it and we never touch it in our real time file shortcuts and this pc and all we will not use it in real time but only libraries is the place we use it in the library is mainly three libraries we have in our sas you need to remember sas helps as user and work is the three libraries so sas help and sas user is a permanent library base and work is a temporary library if you save something into the work library so once you close the station and open again so that information will go off you save something into the sas helpers as user that is going to be a permanent so this is the category of libraries permanent and temporary work is a temporary and says help us as users are the permanent libraries in our sas okay so somebody calling me just hold on a second okay so right so now uh here i'm just executing it so proc print okay sas help and says user right see guys whenever you run the program up to first line to up to eight line this is enough to just to create a data set you just go there and go to your work library new data cities got created so with the name of so naidu here so just open it so now you can see that x is one column y is one column and z is one column so there you have the data set is created so this is a work library is a temporary library you know so what is temporary once you close the sash station and open again this work library you will not see any more so work library containing a naidu data set you won't see anymore it is just vanish like that so if you want to store this particular naidu data set in a permanent you have to make sure to save it in sas user and sas help but unfortunately what happens you know the real time we never ever save any information in work library so you have to mention which location to store this particular data suppose i am interested to store it in sas user then you have to make sure to write it sas user dot naido so that means you are telling ss to create a new data set so that means you're telling us as to create a new data set name naido into the sas user so that no it's a permanent once you save the program see i'm just running the program here yes so now it is just saved in sas user can you see that now data set is saved what i can do is i'm just go to file click on save my program otherwise know my program also will go off so i'll give my program name as a one i'm just closing everything see you know that one is one data set is created with the name of naidu in work library another data set also created with the name of naidu and sas user let's see which one is stay with us after closing my session i'm just closing my sas session yes everything is gone so now let me just open my program right so go to my libraries work library so work library containing naidu data set is gone that is not there with anymore so go to your sas user so in the sas user you can see that nido data set is with us right so sas user is a permanent once you save something into the sas user it will be permanent so default it will go for work library only you have to mention where to store right so i'm just storing it here right so you're just storing into this particular location and execute the program and run it now so you you are just storing it now work library sas user you are storing it it's permanent and i want to store it in sas help i said that there is one more library with me so that it says help also if you are interested to store the information inside self then you have to make sure to write it says help dot naido so that what happen i am saving naidu data set in sas help and execute the program and run it now so now you will see a surprise error message in your log saying it user doesn't have appropriate authorization level for the library's helper what is that means what exactly the difference is why we are why we can able to store something in sas user why not in sas help sas lp is a read-only access library so read-only access library in the sensor we can't able to store any information in sas help but if you just go there and check it in your sas help there are many data sets available but how these data sets are created then so the thing is just hold on a second can i hear any noise like a sound or music yes no is it no i don't you don't okay good my mic is working like fine so here you can see that all the data sets so the data sets you can see here uh many data sets are here it is because see one thing is very clear if you are not able to create it into self how these data sets are created then these data sets are created while installing a sas in our computer okay we are not doing it anything like a one one one data set creation it automatically gets saved by default once you install sas in your computer sas lp is ready then what is the purpose of sas help yes by using a sas help containing a data set you can use it for your purpose you can write it you can write it proc print data equal to your dataset name i can say it as a [Music] if i want to print it says help dot okay l r is i want to print l r is data set i want to print it yes you can print it so you can select it and you can execute the program now run it um is it lr yes yeah you're right is it i it is not l will write it in your right middle see so that information if you want you can use it for your practice or your while doing a practice and all and not only that so in this particular sas help there are some standard macros we will see in upcoming days so how to use this particular standard macro so what we have in our sas help right but one thing is you need to remember sas help we can't store anything and one more if you already using a university edition okay you cannot save something in sas user also if you are using a university edition sas user and sas help is a restricted access to you but if you are using a original version of sas this one you can store something in sas user also right so this is about your explorer window mainly explorer window libraries is the key place where you can store outputs in the form of data sets so this is permanent once you store it so if you want to store you can mention where you want it but in real time what happens you know we not store the data like this because imagine if i'm working on the project zero one we will save it in the sas user today if i'm just working on project zero two even i'm trying to overwrite the zero one containing uh sorry uh project zero one files is going to be overwritten with project zero two which is not correct actually so what we do is we try to create individual libraries by our own requirement imagine if you are working on a project called sum x so all the x data sets to be stored in your uh your ex library then go for writing it creating a library as a lib name after that your library name you're writing x and in your quotations you just mentioned the path so now i'm just mentioning i'm just mentioning the path so i'll try to create a folder on my desktop so i'm just creating a new folder i will not change anything what i will do is somebody is asking me how to copy the path and all so i think you just open the folder then you just copy it like this it will be going to be copied ctrl c you're just using it and then you are writing it ctrl v and paste that's it see this is the creating a library so now what happen if i execute this line of code libname that means i'm telling a library to be created then the library name i just specified as x and then path i'm just giving it where to store this particular information execute the program and run it now that is done so that you j just go there and x library is created so here you can see that the library is x if you store the information into your naidu data set into x then you have to make sure to write it x dot naidu so that execute the program and run it now the data will be get stored right now into your x library this is permanent got it so now you can store this information that means ultimately what happened it is storing their means and automatically it is storing into this particular location also the naidu data set stored into your desktop see it just got saved to your desktop there is no chance to delete it in future like that in real time whenever we working on any projects we try to create a libraries according to our project names so this is how we do anyone have any confusion of creating a library name yes no uh and i do i have a question regarding to the your university edition library yes please if uh if i'm not wrong you just mentioned uh like uh for this says uh studio we can we have the one is the work library another one is the permanent so we can do it so i'm i'm clear with this part but if any other organization they are using for uh university edition uh if i am a assess programmer and if i work on today and tomorrow when i'm going back to the office and i would like to you know i just want to save it and i just want to create the library permanent library like that so if there is nothing like that you just said there is no we can save it or we don't have any libraries there first of all yes i understand what your question is first of all yes so first of all the university is a non-commercial version okay so non-commercial version in the sense we can't use it for our financial generation things as a uh that is a compliance definitely so nobody is going i'm going to use it in real time imagine let's say they are using it okay so if they are using it we can create a server paths in the university edition by your own like this one so generally what i'm doing is yes yes so generally what i'm just doing is name and i'm giving a path of my folder where it is on my desktop am i right but in that particular university edition what we have it it is like a server paths we can give it okay okay i got right but stem statement same program will work there also okay yeah any questions good so now go to your result window so what is the result window is whatever the programs you are running in your editor window all the programs you can able to see in your result window i have closed the sash station otherwise i could have seen this particular many results this is the first result which i have created like that i can see many outputs like this how many successful execution of prox tab and those many times output will be generated how many times of output is generated those many times of your result will be there with you right these are all interrelated so that means everything will be listed down in your result window but we are nothing to do with anything with our result window but yes in real time whenever you want to see that i think earlier i executed one program what is the values i got it earlier so that you can easily navigate to the result window and you can see that what what output you executed there and then you can see that right so this is all about a different windows in sas so about all the options and statements so this is the fundamentals are so mostly these fundamentals not covered by uh any books or something like that so it's all based on the real-time exposure and practice only right anyone have any questions i just done for the day anyone have any questions you can ask me right hello everyone uh in the last class we just learned about what are all the different options we have in our editor log output and explorer window and now we will move on to another concept called fundamentals so we will see all the fundamentals one by one so that is my day two folder so go to my documents tutorial uncle day two right so we will just talk about all the fundamentals as of now whatever we have learned we will just uh correlate all into this particular class so that no so it is a day two of our folders wise so let me just uh explain each and everything so fundamentals in the sense guys we already learned like editor window log window output window explorer window all the options and how we use with this all the windows we have seen and now sas data set what is nothing but sas data set sas dataset is a specialist structure of file that contains data values so sas data set is looks like a ams office excel we have already seen let me just open my software right so this is my software i'm just writing a simple program so data data set name i'm writing it class and input statement i'm just specifying it so the values are sid student id is of the person and sex of the person and then mentioning a dollar sign and semicolon so i'm writing a statement called cards within a card statement you are just specifying student id 100 age of the person is so 78 or something like that and go for sex mail another person is 200 so maybe age of the person is 60 years and male or something like that just imagine run semicolon proc means so up to here only i'll write it let's see so data onwards up to run step i have written this is a data step the result of the data step once you execute it the data set will be get created i'm just executing the program now so that the data set has got created go to libraries and work library you can see that the data set has saved with the name of red ball like a symbol so you just open this particular uh this particular icon and there you can be able to see that what information you have but unfortunately what happens you know i have not mentioned the space i have so each space is nothing but a new column so now i'm trying to create it so the column names here so now you can see that yes id is a one variable and yes and as well as sex variable wise you have the information so a side device and all so this is a data set so this is called a special structure of file so this is called a data set so in this data setup we have two types of categories one is a variables and second one is observations variables is nothing but the column names is called variables and rows are called observations so even this particular data set is also divided into two types the data type and as well as a description type so what is data type the values which you have in the data set is your data type and the values uh like a sid is and all so this uh apart from that how many variables we have how many observations we have when it is created where it is created who has created so uh is this particular object uh is this particular variable how many characters we have how many numerics we have all the properties of this particular data set is comes under your description portion so actually it's has two types of portions one is data portion and second one is description portion so if you just zoom our uh what i can say data set few things we will identify let's see so this is a total uh structure of a data set last name first name job title and salary is comes under your variable names antenna john analyst 50000 is one record and smith's trash pilot and 60 000 is another record within this particular record itself it's in around three variables we have it so the three variable names are last name first name and job title is comes under three variables and one observation uh and so total four variables we have and within that the three variables are character variable one is a numerical variable that is your salary is a numerical variable so this we can call it as a variable values or else we can call it as observations also that's up to you you can call it anywhere so we can call it as a variables or else variable values or we can call it as observations in general we always go for observations so it's like a instead of rows we call it as observations instead of columns we call it as a variables so to browse the description portion of the data we need to use a procedure called proc contents as we already know that when you write a proc print default it will print the output in output window but if i want to know that all the properties so what proc print will do it will display the data portion of your data but if you want to get a description portion of the data then you have to go for a proc contents so if you want to go for pro contents then you need to make sure just write it the same program here what you have written up to run step just write a one more step proc means procedure let me just write print it first of all print data equal to my data set name i'm just writing it my data set name i'm writing it as a class here and semicolon and run statement i'm just creating a new data so in my output window so now i can able to run that yes the output is just got created so this is just a data portion so what is inside of your data set it is just displaying it so that's fine but if you want to get a description portion so if you want to get the description for some guided proc content so c-o-n-t-e-n-t-s contains data equal to your data set name so the dataset name you need to write it it's a class and run statement i'm just writing it so what this contents will do it will browse the description portion of the data so that means you can see there are a lot of properties of your data set everything you will get in so before explaining this one in detail what i'll do is i'll as a limit long ways so if you want to know that just imagine so there is a folder on my desktop just imagine in this folder how many subfolders we have how much of size of this folder when it is created where it is created and all the properties if you want to see what you do so you right click on this particular folder and go to properties so go to properties and then there you can browse all the description portions see it is created on your desktop and it has a size of 78 mb and within that around 59 files we have and one subfolder we have it is created on friday august 23rd of 12 o'clock and all so we are getting all the properties right it's the same thing if you want to get a properties of your data set also you can get it so generally as a data set when it's here i can right click on it and i can go to the properties and i can see all the information what is there in the data set but as a programmer as i said earlier so whenever you write a program the program need to speak in behalf of you so everything so how the another person when behalf of you are maybe an absence of you so when he is looking into the code where you written the code to right click on it and go to the properties and so that i can see all the properties of the dataset so that is difficult in real time we never ever do that so in that case what we do is we will go for uh so we will go for a proc content so so this procedure will give all the description portion of your data so let's see what descriptions you will get it now execute the program see now you can get all the properties so it is saying first one is data set name class data set it is saved in work library another one is it's a data type version nine because my sas version is nine version i'm just using it within that my system date and as well as my system time you can see that actually my system date and time creation date and last modified date is same because once i have created i haven't done any changes to there and apart from that some other things like it's a windows version of my software within that we have a two observations in my data around three variables in my data and remaining things for a while you need to remove no need to remember so these are all those things so that means all the properties of this particular data set if you want you can get it by default by writing a statement called proc contents and apart from the one important thing is so here you just understand the data set is appearing here in your work library that means it is saving something into your desktop or so whatever d drive somewhere in your system location right so the system location you just see see user naidu app data app local data temporary files so there it is just stored with the name of class dot sas 7bd18 so guys it's very important you need to remember this one so whenever you see some files which is ending with the dots as 7bd80 so you need to remember that so it says dataset extension right so group of files or maybe bulk of files they have given to you within that you want to identify only sas data set so very simple the names which are ending with the dot sas uh 7 bit 78 bd 80 so is the extension of your data set so this is all the information by default you will get it and apart from that how many variables you have created see is in the section pisid is created but default what happened you know it is just sorted based on my alphabetical order wise instead of writing alphabetical order wise if you want to write the variables in a proper order like a creation advisor because aside i have created first and then followed by age and followed by sex i have created that's the reason why the number of that particular values like a 2 3 1 or something like that it will appear but you don't want it an alphabetical otherwise the list of the variable you need it based on your creation otherwise so in the proc content so what you have to do is you just uh change this option so instead of writing proc contents and all you just write data um what i say uh var num is the statement so varnam is a statement is used to create variables in a number wise order so that what happen instead of alphabetical order of default whatever you got it so will be just going to be replaced with the new values and now you can see that 1 2 3 you got it in a like a creation order wise so this is the overall view of how the proc contents is working and to get all the properties of the data set you got it right now imagine guys you want to this is for only one data set so in my sas help library there are many data sets available i want to know the properties of all the data sets so then your what you do is write a proc contents data equal to so we need all the properties of the data set write it as a sas helper so dot and there you write it underscore all underscore you just write it so that's enough what happened you know so this will give you the properties of all the data sets which is there in your self around i can say around 70 to 80 data sets we have it in sas help you will get the properties of all the data sets but it will say take some time to execute one by one but yes see it will take some time it is just getting it executed see now what happened all the properties of all the data sets so this is the data set number name of underscore cmpa dix underscore or something like that the data set of all the properties again the data set of all the properties everywhere you will get it by default all the properties of all the data sets as the output if required you can get it and apart from that while displaying it you want to write a varnam statement write this particular statement so that no all the variables while displaying the output you see right now every data set is displaying the variables in a based on your alphabetical order wise you see e first and after that h and after that i p p and u or something like that that means it is just sorting the data based on alphabetical order wise the variables are so if you don't want the alphabetical order device you want to go for in a creation otherwise you'll go for a varnam statement and apart from that just imagine instead of client uh asking this information in the form of just output can we just send this all the properties as a data sets yes we can send this particular output as a data set if required so if you want to do that go to proc contents again so instead of writing a varnam and all so there is no use of a varnam right now do one thing proc contents so you write it out equal to so that new data set you are creating it my new dataset name is anything i can give it the name is i'm just going for kk is a new data set name if i try to execute and run the program so the new data set will be get created and at the same time the output also will be get created but if you are not interested to save this particular see this particular output in output window so you have to make sure to write a statement called no printer so that no it is not allowing uh to print it so that no you will not see the output but at the same time what you can do you can able to see yes it's done the output is not created but there is no errors and warning messages also go to your new data set kk it just got created you can see all the properties of all the data sets so you see sas helper we have aaa commp is a one data set we have and all the data set wise how many variables we have it the variables are key and lino no and locally and text and all so these are all like a variable names in our data so for that particular data set like that how many data sets we have in sas help and those many uh first of all how many variables in each data set wise in sas help you will get the data set list so that means all the observations list you will get it like this can you see that all the observations whatever you have it in that particular data set it's in around 16 845 observe variables we have it in our data set right so this is the overall picture of your data set so one thing is you need to remember prog print is just a displaying a description sorry proc print is displaying the data portion of your data proc contents is just to displaying the description portion of the data anyone have any questions until here please speak out no question no questions thank you any other questions from anyone good so now i'll move on uh to the next concept so here so you know that how to browse the description portion of the data so right so the next one is so some of the naming conventions we need to keep in mind while working with the sas what is this naming conventions so the naming conventions are nothing but um uh if i'm trying to create my data set name as a class it's accepted name there is no problem if i write my data set name as a one class is it going to work so let me just play with it suppose you created a data set with the name of a class and everything is fine so if i'm writing data class is your data set instead of this so i'm writing it one class so can we able to write it one class data set so data one class is your data set and input sid is in section called statement once you execute and run it what happen execute it now done support the log message and log will throw an error saying it syntax error expecting one of the following name so sas is expecting a name not a numeric because in your data set right now it is starting with the numeric which is not correct so the rule number one is you how to make sure the data set name must be start with a character or underscore so any character youtube letter any character or else it must be separated with underscore sign we have to get it right that's the default okay so now you are writing it as a data name as a one class that's fine so now i have another thing is i'm writing my data set name as a myspace class can we able to create a data set name as a myspace class will that work yes or no if i run the program will it throw any error uh-huh oh yes say two data sets so yes you're right so in this case what happened you know i'm interested to create my data set name as a my class is one data set but that is not working here so once i execute what happened you know you're right two data sets you will get it one is my and second one is class is the two data sets you will get it so i'm just executing the program now and run it so that two data sets are got created so one is your my data site and second one is kk data set so two data sets information you can able to see in your output window making sense so that means it is not possible to create as a one but you can able to create as a two if required but the only thing is you just use an assign called underscore if required in real time this is what how we do so my underscore class so that no it is accepted name except underscore there is no special character is accepted but yes underscore we can write it anywhere my underscore class now if you write it and execute the program so that new data set will be get created with the name of my underscore class which is perfect now you can see that good so this is a rule number two rule number three is it can be uppercase or lowercase any letters what you are specifying it suppose imagine data is a keyword if i'm writing it so ctrl shift u with upper cases then there is no problem data set will work even not only that the data set name also you written as a upper case here my class as upper class i am writing it here ctrl shift u so that uppercase is while printing it just imagine i'm writing it proc uh print so data equal to your data set name when i'm just printing it i'm writing it as a my underscore uh class is a small letter if i'm giving it no matter so still the program will work so that means the case sensitivity is not applicable for your data set names every variable names and your sas statements where it will be applicable it will be applicable only for this particular male and female information or any character data if you are specifying it there the issue is just imagine you i will write it one is male and another one is female right now so but even though i have a two patients and two students information but i'm still interested to produce only males information so if i want to get filter of one email then i'll go for a statement saying it why by using a where condition so i can tell that what information i want it i want it only female information in my data so if i'm writing where sex equal to if i'm writing it so it should be quotations uh because character data always should be in the quotations i'm writing sex equal to f like this if i'm writing it it's a small letter of my data and execute the program and run it and if you run the program and run it so that's then so even though you executed the program i'm not expecting i'm not getting the output and output window the reason behind that is go there and check your log log is clearly saying there are zero observations with this particular condition why the zero observations yes we have in the data female why it is not working the reason behind that is female f you mentioned is a small letter but in your data female jf is an encapsulator the case sensitivity applicable when you are dealing with a character variable values not the character variables also if you are dealing with the character variable values there you have to make sure to mention in a proper uh sexy equal to the proper value so this is all about your overall uh what i can say so like a rules and apart from that if i'm just giving you one more rule here suppose if i have a name variable so within a name variable i'm just mentioning it so like a raj shaker is a big name i have given so another one is i'm just giving it [Music] to naido or something like that i'll give it okay so this is the big names uh i'm just giving it i'm trying to read this particular names by just mentioning a dollar sign as we know that it can we can able to read a character values so when i try to read this particular character values in my output window but unfortunately i will see some surprise you can see up to raj shake only and chandra bob only it's displaying it it is not displaying a complete names of mine so why it is not displaying the complete names the reason behind that is so default what happens you know character values can read up to eight characters long only if you're interested more than that then you have to mention how many digits you want to increase it if i'm writing 20 dot so that up to 20 characters long i can able to read my name variable and execute it and run now so now you are reading it so default is eight characters long if you want you can read it up to 20 30 40 so the maximum range is 32 767 bytes or characters you can increase it for a variable name so these are the rules you need to keep in mind and yes the data set name you are writing it here it must be 32 characters below only if he exceeds more than 32 character you can't be able to create a data set name as well as variable name so the rules for dataset name and variable names it must be below 32 characters only if it is more than 32 definitely you can't able to create your data set name and one more yesterday i have created a use using a statement called libname in that library creation the data the library name must be within 8 characters long only it must be within it you cannot exceeds more than eight so it is eight character or below eight characters is accepted when it is a library names so these are the rules you need to keep in mind so it can be uppercase or lowercase and it must not uh have any special characters in the middle of your variable it must not have any spaces in the middle and it can be so character variable default it will read up to 8 characters long if you want to increase up to 32 761 bytes or characters you can increase it the data set name must be 32 characters below and the variable uh names also it should be 32 or 32 characters below and apart from that what else the library name it can be always eight characters below only possible so these are the rules you need to keep in mind while working with the data sets in default of your size is anyone have any questions on this please speak out what's the difference if you just have 20 instead of having 20 dot does that make a difference yeah if you mention the twelve that means you are telling a only twelfth position to read it if you are writing 12 dot so that means what happened you know up to 12 characters long or maybe that means starting from 1 onwards up to 12 you are saying it to read it so when i specify 20 dot so that means default s will consider starting from 1 onwards up to 20 character long it will take it otherwise if you write only 20 so that the 20 digit of your value you will get it understand you want to see the difference yes please suppose if i'm writing instead of 20 i'll just write don't instead of 20. i just written 20 let's see and execute it so you will see only one digit as a yeah you are getting it actually what is my 20 20 digit in my data so um what is the value of the year this is 15 17 20 can you see this this year you are getting it how i say this a only because when i'm just putting my cursor you can see my cursor position at column 20. can you see cursor position okay right so it's not it's not it's not just look so it's so am i correct in saying it's not just looking at the name variable it's actually looking from the start of the line you're right so starting off the line up to 20 characters long it will read it well interesting okay it's okay i didn't expect that okay yes so if you wanted this one only from the name then there is another options in the day three class we will see what are all the different input methods and how we can read different type of the data so that no how we can handle it smooth manner we'll see higher one in the last class we just learned about what are all the different windows what we have in sas we have seen like what is the purpose of editor window log window output window explorer window all the options and all uh the theoretical concept of us as all the options we have done now we will move on to the real time like what exactly uh the real-time application of this particular software with the different different uh classes we will say so today's agenda is mainly to talk about different info methods what we have in our sas so in file in the sense sorry uh different input methods what we have in sas so inputs in the sensor okay let me just uh open my sas so that i can explain so i'm just opening my sas i'm just opening here okay open libraries document sas tutorial sas classes so day three let me talk about input so in sas we have a different input methods so the input methods are list import a column input formatted import name input so these are the four input methods we have in sas so why to have these four input methods first of all input so input is the statement is used to read external data into sas environment in a proper way so generally every program when we write it first you write it a date asset name data your data set name so immediately you will write in a statement called input so the input is the statement what it will do it is just giving the column names so the column names i'm just writing it here name is one column score one is one column score two is the one column you are trying to create it so we already know that input statement is used to give the column names so we just specified but why to have these many input methods see the thing is sometimes the data is not in a standard manner so the data is is inconsistency manner at some times in real time too so in that case if you want to handle all the situations so what we do is we use this particular different input methods so in this particular program first of all what i'll try to do is i'll try to explain what is the list input method so the first one is called list input method so let me explain the list input method so in sas we have a different input methods as i said the first one the list input method we also call it as a default method of sas so what is this list input will do without writing any inputs or anything let me just try to read the data so i'm just writing it my data set name data scores is my data set i'm writing a semicolon that means i'm trying to create a new data set name called scores there i'm just specifying my values input is the statement in the input statement name is the variable so name variable after the dollar sign i have written because i want to read a character data for a numerics as you already know that you don't need to put in a dollar sign but character data definitely you have to mention the dollar sign score one is one variable and score two is one variable you can see that so you have a raj shaker and we don't have a data for score one and co two again we have a data as a one one eight seven another one is you can see that j prakash vardhan you can see that and the score one value values also one zero one five you can see and w102 and all you have the values so i'm not doing anything new here i'm trying to read the data as it is into sas environment so data scores and all the data set i'm just executing it and running it done now you can see that the data just got executed and two observations we have and three variables we have go to libraries and work library new data set created with the name of scores you just open it you see so name is the variable you have it and score 1 and as well as core 2 also we have the data but name variable what happened it is displaying as a rajashek and jprak only it is displaying it but we are coming to the score one yes it's a missing value one zero one five and double one eight seven and one one double one zero two and all everything is perfect there is no doubt in that the problem is here only the name variable having a issue you just see and compare your results with your um output what we do is we'll print this output in output window so that it will be easy to compare okay now what we will do is let me just put this with two windows side by side so that you get to know what program you have written here and what output you got it so so you see now i'm expecting roger shaker and jay what jay prakash what then i'm expecting but the both values you see raj is shake only it is displaying j pack only it is displaying it should be raj shaker and jay prakash why the names are getting truncated the reason behind that is default whenever you execute the program sas character value can read up to 8 characters long only right if you want to read more than eight characters you have to apply the length statement that is a rule number one default character can up to read eight characters if you want increase you need to use a length statement so i'm just using it length here length of your name 20 characters long i'm just giving it right now it is 20 maybe tomorrow it's a 30 or something like that based on your data you can read it so what is the maximum you can read it 32 767 bytes are characters you can increase this particular length of this particular variable so the name variable i increased up to 20 characters long that means up to 28 digits it will read it into sas environment so let's see now what happened can you see any difference once you execute it so now you are executing yes i can see the difference raj shaker it's working and as well as jay prakash but then it is working and one more so we used a length statement to increasing the length of the variable that's perfectly fine there is no doubt in that so now you can see i have mentioned yes i know that score one wise i don't have a data that's the reason why i have mentioned a period what i'll do is i'll remove the period sign from here i'll try to execute my program so now what happens you know once you execute it and run the program so default you will get the data in a messy manner so it is displaying up to raj shaker there is no doubt but score one we have a value as we don't have any value we are expecting as a missing value for score one but yes core two we have a value like a 1 1 8 7 but unfortunately the total data is messed up let me clearly explain why it happens so you see and execu you see this what happen when you don't have a data for your score one the 1187 value is moved to the score one place this is called flow over whenever you don't have a value so next value will over place is the missing value position we call it as a flow over so then j prakash vardhan is the value it is trying to move from this particular place to automatically from this place that's the reason why in your output window also you can see that the jpeg it is displaying it here because it is up to eight characters it is reading it the next line is trying to read it unfortunately the next line will not be get read anymore because it's a mess up so definitely the first variable should be read in a proper order if it is not read so it will get affected the total row itself that's the reason why the second record is not rated so to overcome this situation in real time what we do is we need to mention a period sign so generally this we call it as in not a dot we call it as a period in sas once you mention this period so that it will allows us to uh not to overwrite the next values so whenever you have a missing value that means sas will imagine yes there will be a value but unfortunately the value is missing because of this particular period sign of you now you run this particular program and execute it so that there is no change in your values everything is properly rated without any mess earlier the mess happened because you don't have any value there and one more so if you carefully observe even though i mentioned the periods in my period sign in my output that means in my program but in my output i can't able to see that period sign so it's a blank why it's happen the reason behind that is the character missing value will always indicated as a period and numeric missing value indicated as a blank so in this case i mentioned a dollar sign for a score one variable that's a reason why even though you mentioned this particular period sign still it will appear as a blank if you remove this particular dollar signs from the variable so that no you are making these variables as a numeric now it will be appear like a numeric missing value so numeric missing value always indicated as a period sign but character missing value always indicated as a blank now you execute the program and run it now can you see that the period sign you can able to see right now right so as per our rules rule number one we have already discussed you how to use a length statement to increasing the length of the variable rule number two definitely if you have missing value the missing value need to be assigned with a period sign and rule number three data must be separated with at least a single blank you see jprakashwardhan1015 i'm thinking that not to give any space let it be i know that j prakash verton is my first column and one zero one five is my second column if you want to read the data like this so definitely it won't work so because once you execute the program now you can see that the total data how it mess up you can see can you see that only one record the first record which you don't have which we don't have any issues it read it well so we are coming to the second record it won't because the data mess up happen because the variable you specified as a three variables but the data you provided for the two variables only sas will think so finally it leads to error if you don't want to have this type of issues so you need to make sure if you are specifying a multiple spaces or big blanks there is no problem but at least a single blank you have to specify that is mandatory when you are using a list input method so definitely the data should be with a single blank and the rule number four is the data must be read in a proper order what is this statement nothing but you see name is the variable you are reading the value exactly rajashekar at down only and after that score one then after name you are reading it then it will you will go for score one after that you are going for then it will go for score two and all something like that you will go and execute the program and run it now so what happen everything is reading in a proper order so it won't read like a uh name variable as a 1 187 and as well as a score one value as a raj shaker or something like that it won't read it it's a in order first variable first then followed by your second variable then followed by your third variable so something like that it will read it in size so this is the four list input method rules you need to keep in mind rule number one you need to use the length statement to increasing the length of the variable the length you can increase it up to thirty two thousand seven hundred six seven bytes are characters you can increase it rule number two the data whenever you don't have a data that means it's a missing data the missing data definitely assigned with a period sign rule number three the data must be separated with at least single blank and rule number four uh definitely what i can say so definitely the data should be read in a proper order these are the four rules you need to keep in mind anyone have any question you just speak out and ask me if you have any questions hello everyone with me no no questions no questions karna good you know any other questions from anyone no oh so i think we're also able to follow that's good yes yeah good right so good so now we will go for another method called column input method so now the question is naidu we already have a list input method to read the external data into sas environment why we need to learn this particular new method what is the purpose actually say yes so in real time uh what happens you know always data is not standard imagine if the data you got it in a inconsistency manner so then how you are going to read it let me just see this particular data so that you will get an idea why i'm just explaining this method so imagine i have a data with me okay so what is your name there are many spaces can contain embedded blanks without any spaces here you see can contain embedded blanks is the data which we have it without any blanks no matter so now my interest is the name is the variable what value i am expecting to relate that is called what is your name i want to read it as a name i want to read it score 1 i want to read it as a missing value score 2 i want to read it can contain i want to read it can i able to read it like this with this particular method without giving any length statements or anything so this is a right now you see this particular 61 onwards up to 65 line what i have written it's a list input method once i execute it what do you think will it read let's see how it will read tell me how many variables you are expecting that means how many columns you are expecting in this particular program if i execute i don't think so you can read because you have not mentioned the length here okay so then first of all what my question is how many variables you are expecting three variables may know the variable names name score one and score two good there is no doubt in that three variables will be rated so how many observations then one observation only okay may know that what is the value for my name actually with the list input actually it doesn't work but with the column this particular program you think this particular program will throw an error that's what your imagination am i right or wrong yes yes yes yes yes exactly if you're uh applying it uh it doesn't actually we won't get any output okay and for the score one you did not uh put that period sign like a like a dot symbol i don't think so it will give you any value there okay okay so now what we do is let me just uh execute the program so that you will get surprise i'm just executing my program that's done first go to the log is there any error is it displaying to you is it displaying any errors to you in your log the log is very smooth right no no no no not displaying any address but yes even output also displaying with some value what exactly you are getting it already so the problem is here what happens as we know that default when you have a space sas will think that it's a new column value right so what is comes under your name score one is your e's and third one is your that's what you are displaying you are getting it right now can you see that what is your getting it what i'm saying yes because of a single spaces sas will think that that particular what is comes under one value easiest comes under another value your is comes under another value that's what households will think which is not at all correct then how we can able to read what is your name under a name variable see you just use the list input method right now you failed then how you are going to read then even though you mention the length statement what do you think will this read length statement will work until it reaches to the space whenever it reaches to the space suppose you imagine you have written a length of 30 but until it reaches to the space up to 30 characters it will read it there is no problem for the length but whenever it reaches to the space here suppose imagine after that what itself there is a space then automatically it will read up to what only understand then how we are going to read from the w till question marker we have to read as a name variable we have to specify yeah exactly so that's my interest actually so so did you clear right now we can't able to fix this issue with the list input method agree yes or no because of those many limitations we can't able to read this type of data into sas environment that's the reason why we depend on another method that is called column input method today what we are just looking into now what we do you just use okay column input method what is this column input method and how it is different from our list input method column input method will work based on your length suppose you see how i can say that from w onwards up to question mark i want to read it to sas how i can say very simple you just to see can you see this my cursor is moving yes or no anyone so put my cursor exactly at w then my cursor position is column one can you see this at down the cursor position is column one if i'm putting my cursor at after my uh question mark if i'm just looking into it the value is 20 that means i can write it directly 1 to 20 as a name variable right so that means up to 20 characters long i want to read it as a name so the next value i'm writing it here score one okay score one i'm reading it from starting from here 23 up to this blank only i want to read it so what i written here then it should be 23 to 31 31 i am interested to read it as a score one is it really required to mention the period sign now because it this method also call it as a fixed input method that means this values won't be moved here and there once you mention the positions understand 1 to 20 means 1 to 20 positions whatever you have it it will read it even though you have a blanks no matter to sas it will read the values as a blanks only got it so score 1 23 to 31 whatever the values it will have it you will read it it will read it if you don't have it so even the missing values also will be read as it is score 2 you are writing it with the dollar sign can contain embedded blanks you are writing it so what is the value i have i want it from starting from 32 onwards can contain i want to read it up to 42 so starting from 32 42 so i'm writing it 32 42 i want to write it so let me just execute the program and run it now will that's giving the same output can you see so what is your name you are getting it i mean after that space i think online space extra we have counted you just give it up to 31 not sorry up to 41 is enough can contain only right sorry 3241 you see now and execute the program now so it's reading what is your name and after that you are getting a space and after that your writing can contain got it so this method is called column input method so how it is different from the list input method first of all rule number one we will compare so in the list input method definitely you need to use a length statement to increasing the length of the variable instead of length so here we use a a column statement so that now we can increasing the column so from 1 to 12 to 13 or something like that we can increase in the columns the next one is you have to specify uh whenever we have a space so definitely we need to mention with a period sign in your list input method no matter whether you have a period sign or not so definitely sas can able to read however it is right so it is not mandatory to have a period sign rule number three is the data must be separated with at least a single blank you see can contain embedded blanks is a data without any blanks but still i read it only the first sorry can contain embedded blanks so i want to read the first line so first two digits i want to read it as it is into sas just i read it by using 3241 even though you don't have a space but still i can able to read that means it doesn't require any space to have it to separate the variables so still we can able to read and the data must be read in a proper order your list input method rules what i can do is i can just swap what i will do 1 to 20 i want to read it as a score to 30 to 41 i want to read it as a name variable you see now and execute the program and run it now and run this particular program so now you can see that name variable reading as a can contain and score one is missing as we are not changing anything but go to what is your name that means you can change the variable order any way to anyway if required understand what i'm saying here nuclear yes yeah right so this is all the rules of your column input method so this is the last program for today's explanation so let's see this particular example how you can able to handle it let's see data employ one is my data set name input statement ssn i am writing it as a dollar one to nine characters long wt amt is another value i'm writing a values as a one to follow characters i'm writing a statement called data lines tell me how many variables and how many observations i can get it if i run the program two variables two variables i will get it and two variables is the right answer there is no doubt in that ssn and wt amt is the two variables how many observations then five observations so you're expecting five observations yes can i just justify how you are saying so first we are reading from for ssn it is reading from one to nine right so two three four five seven eight nine that will come under ssn and uh james smith [Music] amt is also starts from the first position to 12 but we don't get anything there because the first it will get only one value because it would read the same thing i don't think the james smith and the 356 is all taken into consideration because the position of the column is different the number is not on in the range of 1 to 12 or 1 to 9. okay so did i say anything like only one variable will read only one observation like this did i say anywhere no right that means the two variables also can be read by one observation the first observation will be read by both so one two nine you need it right up to one to nine characters it will read it no matter what digit you have it inside forget about it you specified one to nine characters means the one to nine characters it will read it if you don't have nine characters how far the values are right then up to that it will read it and now what happen two three four five six seven eight nine will be read it in ssn also even wtmt also will read the same observation understand otherwise where the wtmt values you are expecting to read it won't right so the same line the first line will be read by the all the variables in your input statement that's the default the first variable will read the values whatever you mentioned 1 to 9 again you are saying 1 to 12 months it's overlap 1 to 9 will be read by ssn the same values again it will read it by your wta empty also but you can see some difference in here so ssn value it's read up to one to nine characters long so james smi only it will read it because you see you just count it one two three four five six seven eight nine up to smi only it will read it into your ssn but wt mta what it will read up to james smith also read it into the same record again 356 356 both also same because this is the maximum length there are three characters long it will be fitted into both again this one also same and here jafri thumb only joffrey t you will get it in your ssn but where are coming to your wt mta you can see jafri thomas also that means tom also you can get it you want to check it to check it and execute the program can i see now right so ssn you will not see the difference for a first record because the first record is common for both so that means within nine characters below length so it will read it from there onwards up to smi only you can see for ssn and wtmt you can see smith also 356 356 and here also same but here joffrey t you are getting it but here you will get it jafri tom so this is the basis certification question in my so earlier uh uh what i can say so earlier papers i can say so this is the question they have given and they ask you so the question is how many observations you can expect if i run the program the observation count is five got it or maybe they may ask you what is the value for your ssn in my second record so then you have to be ready with your answer what is the value of your second record for your ssn right so this is the two input methods i'm just covering for you as because most of you are very new to the sas and apart from that few people don't have a software so so in your hand i will not go in detail explaining of the total class for today i'll just stop here all right so yesterday we just learned about like different input methods what we have in sas we have just the same like list input and as well as column input so we'll just continue from there so what are the different other methods we have in our sas so let me just explain one by one first of all open my sas let me just open the programs right so list input and column input we have done and now we will go for formatted input so let me just explain that right so this is called formatted input method so in the formatted input method so mainly we used to write a dot so that means we write it as a twelve dot five dot and six dot or something like that so what is this dot nothing but when you mention something with dot that means those many characters suppose if i'm writing name so with the tallow dot if you specify up to twelve characters it will read it so when i coming to the score with the five dot means up to five characters it will read again score two with six dot means it will read up to six character so let's see in this example data scores is my data set name input statement at the rate i specified so what is meant by the data so at the rate means i am telling a sas to take from which position onwards even in column input method also we used to tell like a 1 to 12 1 to 13 or something like that it's the same here also the only thing is when you mention at the rate 1 that means you are telling your position number from 1 onwards so up to 12 characters long you want it as a name and again at the rate 3 so that means 1 to 12 as a name from the third character third character again means this is your l so from there onwards up to 5 characters long so that means l u e yes with space also so this five character long i want to read it as a score one again at three four four means u u onwards up to six characters long six means like this ues is three character space also one character four character c and a so all the six characters you can see it in your score too so once you execute it and run the program and now you can able to see unable to run the program now can i just see that it just got executed so what happens values can see up to 12 characters long so values can see i just mentioned 1 to 12 it is reading it at the right 1 means starting question from 1 onwards up to 12 characters long it is reading it for name again at the rate three means third character onwards sorry third character onwards up to five characters long it is reading for a score one at the rate four means fourth character onwards up to six characters it will read it so that is the column input method so what we have in our sas sorry a formatted input method what we have in our size so the only difference is earlier program and this one so this one with at the rate signs and all we can read and one more so by using this method so we can able to read uh the data like an inconsistency with the column input method whatever we can able to do the same thing we can able to do with this particular formatted input also right so and apart from that sometimes if you want you can skip few points or skip a few letters if you don't want it let's see you're mentioning address one and then three and at three four and all so you are just mentioning a question number wise you are just picking up so you see this example data scores is your data set name name dollar trello dot i specified that means so i didn't specify any at the rate or anything so what happened default it automatically start takes position from the one onwards so up to twelve characters long it will read it so plus three what is that plus three after 12th character plus 3 letters you are reeling it that means you are leaving it 13th 14 and 15 you are just keeping it from there onwards again 5 characters long it will take it so default when you are not mentioning anything for the name variable it will start reading from the first position onwards up to 12th character it will read it so 1 to 12 it will read it for name there is no doubt in that after that name so around 3 characters you are men you are skipping it how you are skipping you mention plus 3 plus 3 means 13 14 and 15 you are skipping it from the 16 onwards up to 5 characters it will read it for a score one so now 15 16 plus 5 it's a 21 so 21 plus 4 character you are leaving it that means 22 23 24 and 25 you're just leaving it from the 26 onwards up to six characters it will read it for your score too so now what happened one two twelve for name so we're coming to here it's in a 16 to 21 for your score one so 25 to up to 32 character 31 character so is it really for your score too right you want to check this particular information also so execute it and run it can i see that name and score 1 and score 2 so the name variable wise values can say and score 1 and we have a values for score 2 also is it making sense yes no able to follow me yes it's neither right yep so we're coming to here if this is your formatted input method you can write it with at the right signs also you can write it with a plus signs also okay the other right signs we call it as a absolute input method within the formatted input method there is a one more name called absolute input method so you can use it with the rate sign this plus signs and all this is called your column pointer method that means you are just mentioning a position from where to pick up so that is your columns so you can just mention it with the column pointers so we are coming to here so data scores is your data set name input statement name dollar true dot and score one with five dot and score two with eight you're writing it so data scores is your data set name input statement name with the twelve dot means up to 12 characters it will read it guys so if you understood the above example can you just tell me how this particular data will be rated yes please we will get three variables yeah three variables there is no doubt in that name and score one and score two okay next okay with the with the name variable um the name variable it will read from first place until 12 places right so starting from one onwards up to 12 characters it will read for your name variable yeah what next yes yes um for the score one uh from the first place until five places sorry five characters married uh-huh because yeah after that is score uh one that it will delete the file until the five characters so that means 12 characters so here we are not giving any spaces right yes plus three we are not mentioning otherwise we are not mentioning that the rate also so that's why i'm thinking maybe from the first character only it married five characters that means every time it will start taking from the first position onwards up to five characters first position what's up to eight character first position onwards up to total character you're expecting yes yes because we didn't mention at the right at the rate otherwise we didn't mention any plus three or plus four we are not giving the spaces so maybe yeah so by default what happens you know madam it will be start continuing from the previous variable suppose the previous variable is taking the information name with troll dot so 30 onwards it will pick up for the second variable 13 plus 5 that means 12 plus 5 means so it is going to be 17 from there onwards it will continue for the next value understand what i'm saying so default when you are not specifying anything it automatically continue continuing from your previous variable okay got it got it right so name variable it will read up to 12 character for score one thirteenth character onwards up to five characters it will read it for your score one from the score to tell me what happened for the score too and then another and it will be the we could end so input name with a dollar so twelve dot and score with five dot and score two with eight so if i write it 8 dot then up to so 12 5 17 17 plus 8 up to 25th character you will get the data for your score 2 but unfortunately it is just 8. when you are writing 8 only the 8th character data will be get printed and now you can see that only c will be get printed eighth character data understand so only the eighth character data in your data set so in your values is c so that's the reason why the c is printing here right so column input method and formatted input method so and one more this is the formatted input method all the examples there is one more method called name input method so in this name input method whatever yes please uh i have one question yes can you go yeah is that eight i understand it is counting in the c like the eighth position is yes if you put in the dot yeah if you put it the dot is there uh i would like to see result so then it will read only the eight no no you're right up to eight characters it will read it you want to check it you see up to eight characters it is reading yes from continuation of your previous variable so 12 plus 5 17 from there and 17 onwards up to eight characters it will trade okay thank you sorry yes so so this is about your formatted input method now i'll go for a name input method there is a one more input method data games is my data set name input statement name with the dollar sign score one and as well as score two so data line statement so here uh what is the exactly uh the thing we are doing is name equal to we are writing the variable name directly as a value as a relay score 1 equal to 1 1 3 2 and score 2 equal to 1 1 8 7 we are writing it again name equal to 9 and square 1 equal to 1 1 1 1 and score 2 equal to 2 to 2 you are writing it and executing the program and run it now now you can see that see so name equal to relay and score 1 equal to 1 1 3 2 and score 2 equal to 1 1 8 7 you will get it again name equal to naidu and score 1 equal to so 1 1 1 1 and score 2 equal to 2 2 2 you are getting it then why you are getting missing value let me just remove that and now we execute the program and run it so now you can see that name and score one and score to all the values relay with one one one three two and one one one eight seven naidu one one one one and two two two two you'll get it is it clear any questions hello so no question yes what happens you know in this particular values name equal to you're writing it that means even in chord statement also you're writing name equal to your values relay and score one you're writing equal to so that 1 1 3 2 you'll get it again score 2 equal to your writing it's go to equal 1 1 8 7 that means if i want to create a one more record also i have to write it as a again name equal to again square 1 equal to again score to equal to how to specify so this method we call it as a name input method you don't need to mention any lengths or anything how much value you are giving it as it is as we can as ask unable to read for this particular input method so this is called name input method but we rarely use this particular name input method in real time first of all all the input methods also we not use it in real time the problem is whenever we get a data from the client mostly you will get the data in the form of excel sheets are in the form of csv files like that so we can directly read the data into sas environment without writing input or anything but imagine for your certification exam if they have given some questions like how to read this particular data and different input methods yes you can easily answer now after listening this particular class right these are the four input methods what we have in our sas list input column input formatted import and name input so these are the four input methods not only the four input methods there are some times so you see some of the examples what we can do is you don't need to depend on any input method at all so you can directly write uh data my data set name is a kk a equal to 20 b equal to 30 and c equal to high there but hi there in quotations i'm writing it because it's a character data so that's it so i don't need to create any uh input or cards and all without writing input cards also we can able to create it if i run this particular program and execute it and now you can see that the new dataset is just got created a and b and c so a is 20 b is 30 and c is high there so you are getting it right so you will get that by default imagine it is one variable with sorry three variables with one observation containing a data is ready for you you just open the kkk data center so three variables and one observation containing a data is ready for you a20 b30 and c hi there so that one observation containing a data is ready if you want it okay if you want to create one more record then what you can do so you are just writing it again a equal to 200 b equal to 300 c equal to in quotations i'm writing it as a hi here i'm just writing it so what happened now what do you think how many variables and how many observations right now if i execute the program just tell me three variables and uh two observations you are expecting two observations three variables is the same but you are expecting a two observation but unfortunately yeah maybe that otherwise oh okay yeah that i'm going to about to say right yeah maybe right so it just override the world values with the new values whatever you have given a equal to 203 b equal to 300 c equal to high here whatever you have given the old values just overwritten that one and created with the new values but now imagine i need the both values also i need to have my old values also i need to have my new values also then what we do if you want to get that type of information you need to write a statement called out equal to within out put you write it semicolon that means all these particular observations you are creating it and we are creating one record and again you are creating one more record and write it output so what this will do output what it will do it will try to create a two records one record is got created so that no there is no chance to overwritten with another record so another record also will be get created into your data set now you can expect two observations with three variables containing a data can you just see now right like that we can able to create it in real time without using your input and format and input and this particular column input method name input method no need to use it you can directly we can use yes in real time whenever is required to just setting up one data set with another data set values this is what regularly we use meta instead of writing cards and all if you want to create a records we'll go with this method clear any questions so we is the name of the last method uh there is no name with the data there is no category for that so because we cannot say it as a name input method because name input method if you say it should be with a data line statement within a data line statement only we are writing all understand what you are doing it here right so this is your name input method but this is not there is no code statement there is no a data line statement still you are writing it so there is no name for it but still we can able to create a uh observations like this by using this particular method and one more imagine acknowledge what you have it right now can i just see how you can able to read this data imagine i have a data with me with the name of naido okay i'm writing input with an input statement i'm writing ssn that is my social security number or something and place also so in the ssn for the first row it is an ido sas online trainer i am expecting and second one i am expecting place as hyd for the second row what i'm expecting only in ido but the place is mumbai can be able to get it if i run the program what do you think understand what i'm saying if i execute the program what is your how many observations you can expect and what is the value for each observation ssn wise what is the value let's see one by one if i execute the program and run it now what happen ssn is missing and place is sas and mumbai will get it why the ssn is missing because there is no character dollar sign i'm just making a dollar sign execute the program now so first naidu i got it and again i do i got it sas and mumbai i got it is it right somebody please put the mute you're near to the kitchen i hope thank you so what happened here so ssn you're writing it and as well as place also you're writing it here so but i'm expecting naidu ssn you are getting it that is not correct what i'm expecting naidu sas online trainer i am expecting as a ssn and place i am expecting as a hvad can we do this how we are going to separate this type of data i need naidu sas online trainer is one column and i do is going to be a first column each word here mumbai will be the two column tell me the knowledge what you have given can we apply that so we'll try to apply starting letter from one onwards column 1 and ending letter is your 25 so i'll write it 1 2 24 i hope i'll write it 1 to 24 i'll write it for your ssn and place is i'm just writing in 27 to 30 i'm just writing it 27 30 i'm writing like this execute the program and run it now let's see what happen so there is no problem for this naidu says online trainer it read and again i do mumbai it is reading actually the mumbai should be read under your place but why it is moving here because the length what you have specified yeah so in that case even this also considering it right we need to tell not to consider but just mention a colon let's see what happen if i mention the colon what happened the total data itself it is not reading the total secondary card itself it is an error generally colon is the sign we use when we want to read whenever the space is you're reaching it you want to separate the data from there i'm just using a colon here and let's see what happened i'm just using colon i do naidu you're getting it after then i do remaining data you are not getting it because what happened so you mentioned 1 to 24 but whenever the column what it will do whenever you reaches to the uh 1 224 letter or else if you specify if you reaches to the space the data will cut there so the data is cutting here and data i'll cut here so that only i do not do i'm getting it it's as online trainer and remaining all the data you are not getting it anymore can i just see hyd places hydro you are getting it and this one is mumbai is missing because there is no value for it even this particular column method also not solving your ratio so then generally how it will solve if you want to get rid of this particular issue or else if you want to read right so if i'm just specifying with the only colon sign in here with the 24 dot imagine instead of column input method i'm writing a formatted input method will be will i be able to read it up to 24 characters i want to read it as a ssn and from there onwards up to 25 characters i want to read it as a place let's see what happened execute it yes what happened neither you got it but unfortunately naidu says online ryan or hyde are getting it as a place and naidu mumbai is correct right now there is no problem it read but of how we are going to get naidu sas online trainer as a ssn so one thing you need to carefully understand here whenever you have spaces you see this the spaces are double spaces here also naidu and mumbai the double spaces so we need to tell to the size whenever you met double spaces and split the data from there how you can say it's a double spaces by just mentioning of at the rate sign sorry uh end sign what this ensign will do until it will take the data of up to 24 characters and within the 20 after the 24 character whenever you reach us to this particular spay double space automatically not only double if it is more than one space automatically ssn is a separate variable and place is a variable from there onwards it will read it and execute the program and run it now now you can see that see naidu says online trainer and naidu hid in mumbai it just got separated is it working right so what this ambition sign will do ampersand sign will separate the data whenever you have more than one space imagine if you have one space here can be able to separate this data what happen everything is comes under one column only if i want to split it again so what you have to do so you may need to use another method to solving the same issue right so default what you have to do is so this is just the input methods what i have given you cannot directly straight forward use it for only one particular program or something like that you need to use a combinations so suppose imagine sometimes you have to use a mixed input method also what is mixed input method if you are using more than one input method in one program that we call it as a mixed input method for the first column the list input method is suitable then try to use it for the second column the column input method is looks like suitable then go for it third column you can go for formatted input method that's up to you according to your conditions and all whichever is working then you can use it that type of input method we call it as a mixed input method in our sas so these are the total input methods what we have in our sas you don't need to learn more than this so mostly this is enough so you can able to read the data into sas environment these are all the different input methods it is one space then what are you gonna use uh there is a double use the at the right but if his space is a one then how i can read it so this is what your data is right right now so what we do is in real time we will try to read everything 24 and 20 okay it's reading right so once it's ready so you don't need to play with it and so it what how it is reading so now mumbai is here right we want to keep the mumbai into right so if data new dataset name set right now you don't know this one okay if underscore n underscore equal to two and scan off my second word spanish ssn second word i need it second word then place equal to okay right now you don't know these many car conditions for a while let's see so go to my kkk data set you got it is it okay yeah right so it's really in mumbai still here also here ah so then what you have to do is you just write then do place equal to mumbai and you write data ssn equal to assessment equal to just nida and is it okay now yeah yeah thank you right so this is how we can able to manage it's not really we are depending on the input methods yes you can search for a different input methods for this so that you can get fix this particular issue so why to learn uh the new things and all the knowledge what we already have it so mostly that's enough to solve our issue understand what i'm saying it is not mandatory uh so definitely you have to learn some input methods and all to just to figure out the issue the knowledge what i have already have it means after few days later so you are going to learn this particular effects conditions and all so yes you can able to manage this particular program so with your knowledge so let it be however you want to read it into sas first try to read it so then later on you just do a post processing so that will work out right so this is all the different input methods what we have in our sas so we just completed so in the last class we just done with uh our different input methods what we have in our sas we have just seen like list input column input formatted input and all so today we are going to talk about uh how to use a different dates in size see dates are nothing but not a character and not a numeric so how we are going to uh read this particular date format like imagine you have it as a month year a date month year format so if you want to read this type of date so how we are going to handle it so we will see in this particular class so let me just open my software right so this special concept we call it as a format and informate concept so let me just explain one by one see data i have a data set name with the name of midi so there i have input pid age and jdate joining data of the patient i have it here like this so the joining date of the patient is so 21st 05 of 20 and 0 five zero eight of 1991 so zero seven zero nine nineteen ninety two so zero one zero one nineteen sixty we have it so without writing anything you see i'm just giving a general input like a input is a pid as and jdate i'm just reading this particular value as a just numeric format let's see what happens if i try to execute the same program and run it so default the jdata that means joining date of the patient will be missing you won't get it so pi device you have a data is wise you have a data but jdate you won't get any values so all are missing so if you want to fill this particular instead of missing you want to fill your original values so you have to write it so how you do how exactly is asking able to understand this one if i could have given as a character then yes it will read it so what happened up to eight characters long default it will read it so but uh don't expect this is a date because why i'm saying this is dead if you write something in the middle saying it's some ggg in the middle still it will read it as a data and execute data see it is reading as a gg so that means it's not a proper date it is just like a text format of your data it's reading into sas environment again so this is also not required for us so then how we are going to handle this situation so to do that first of all what you have to do is you have to write it the statement called here you write it after the date write it in format information statement is used uh to tell to this as this particular date as a some date how we can communicate for j date you write it j date you're writing it in which format it is first date yes write it dd then after that month write it after that year write it 10 digits length up to you're writing it so dd means date month and year format we have a data right now in this particular program so that we are just giving accordingly the same without writing this information statement sas won't recognize this particular value so that's the reason why so we have to write it ddm by way 10 dot so now let's see what happen if i run this particular program if i execute it you can see that instead of having some missing value you will have some numbers so what is this number what exactly these numbers so the numbers are default right now it's a big number forget about it try to find out the small one it's a zero why it's a zero remaining all at least some values why this particular one is a zero so this is different from others so that we try to find out why it is zero you just go there and check your data the last observation is zero so january 1st 1960 is zero why the january 1st 1960 is zero why not the remaining as we already know that i already informed earlier exactly you're right sas default date will be the january 1st 1960 you're right madam so the sas defaulted january 1st 1960 so here it's also says january 1st 1960 then i'm expecting to display it as a date but why you are getting a numerical value some number as a zero i'm expecting to get some value as a zero there sorry and january 1st 1960 the reason behind that is all these numbers whatever it is displaying this is your january 1st 1960 onwards to this particular date how many days difference you see um it's a 2020 21 that means uh 21 of your may 2020 is going to be how many days difference from january 1st 1960 so each year will have a 365 or 366 days so january 1st january 2nd january 1st of your 1960 1979 1960 and 1961 62 63 like that each year 300 300 will be 366 will be added so keep on so that the total number of days is nothing but two thousand fifty six days the twenty two thousand the fifty sixth day is refers to your twentieth of your may uh two thousand twenty we're coming to here this date is your january 1st onwards 1960 onwards so so this is august 5th of 1991 so how many days so for a while what i'll do is i'll write one more value i'll make it this one 0 1 0 1 i'll make it as a instead of january i'll make it as a uh i'll keep it january only but i'll write it as a second that means january 2nd so how many days difference now january 1st to january 2nd how many days difference one day one day so execute it see now you will get it instead of zero you got a one day difference from the january 1st 1960 onwards to the january second day of your 1960 so one day difference the one day difference you can see that but as a human being we won't be able to understand what this number is this is just a sas unable to understand what date it is so twenty two thousand fifty sixth day is refers to may of twenty first two thousand twenty saskatchewan able to understand but as a human being we are not able to read this particular value you are interested to read this particular value into sas environment in a proper way so you have to make sure to write a statement saying it what you have to do so you just need to write the same statement whatever you have written in format and try to write one more statement called format so within a format statement just specify jdate joining date of the patient in dd mm yy 10. format i want it and semicolon so now you execute it and run the program and you see now you can see that the date is appearing in the form of a proper date right earlier the dates are not in a proper format you got it it is used to display with numbers but now you will have the data with the proper numbers 21 0 5 20 and 0 5 0 8 19 91 and like that so you can able to get the values ready right not only this the format is always your wish you need it as a ddm y 10 dot or else maybe in i do i'm in us mostly the people are writing a date in the form of a mmdd wi-fi format not as a ddm mm-hmm format that's up to you once sas know that what is date what is month and what is here then you can change it to any way to anyway and execute the program now now you can see that month got first then followed by date and followed by your year so you got it right now right so informative statement is used to convert a non-standard date into numbers so format is statement is used to convert that numbers into a proper date so that is a use of informant and format so it's very simple i can say that it's a goldsmith with gold concept imagine this particular data right now what you have it is a old gold that means imagine you have a world ornament like a some necklace or maybe uh that's what i can say some i don't know yeah names some bangle or something like that just imagine it's a world format of gold so this gold you're just giving to the goldsmith what he'll do he'll not give the shape what you required the new one he will melt it and he'll give a shape is the same thing even sas also whatever the date you are giving it to the sas first it will convert it the converting into a number format then the numbers you can if you want you can convert it to proper date same thing in our gold also so the world gold whatever you have given they'll melt it and they'll give a liquid format then so then once it's a liquid format then they'll give a shape whatever they want it it's the same thing here also we don't this is all about your format and information is anyone have any questions in this please speak out uh hi nido yes please format format statement do we have to give in the proc step also or only in the data step so you can write it in the proc step also madam but the difference is if i write it here yes i can directly write it here and execute my program and then i can able to get my output ready but the problem is you just go there check your data set of your work library the midi data set you open it the media data set still with your numbers right so in real time what we do is mostly we use this particular format we use it in the data step itself so that we can see this particular numbers also in a proper date format so not only in output if you see you write the same step or whatever you have written here and you just write it from remove it from here and write it from here and execute it now you can see the dataset also it's appearing in your output at the same time you can see and you look into your dataset also will have a proper dates is it working yes yes okay so no need to give in the proc step right in the data step if you write it that's mostly enough otherwise your interest is not to apply any format let it have your numbers then don't write your infor format statement anymore so some of the people have the question naidu can't be able to directly use my format statement so why to use informat can we use a format directly to print it the value let's see will this print or not is it printing without writing a format statement it won't information format is important yeah because that is the basic statement right to convert in exactly so information statement converts your diet values into a standard form that is your numerical value then only you are just applying a format if you are not writing in format then don't expect and one more so when i'm just writing my output why the all my output is displaying in the form of okay let me just okay when i'm just running it so default all the output you can getting with the slashes did i say anything to get the slashes no so here in your program you see one is with slash one is with dash one is with points but everything why you are getting as a slashes so that's the default of your size whenever you write it ddmy 10 dot you will get that uh so that is your slashes only and one more you got it as a 20 but this 20 is displaying as a 2020 but client is interested to read this particular 20 as a 1920 how we are going to read it as a 1920 so this 20 default whenever i'm writing it it automatically take me as a 2020. now i decided no no it's not a uh 2020 it should be 1920. how i can read if you want to read these two digits of your ear if you want to read it in a proper format so then you have to use a statement called options ear cutoff so if you write it options here cut off onward and options here cut off if i'm giving as a 1900 so 1900 onwards up to 2000 years up to 200 years of span it will take it so when you are giving it two digits of your year it is automatically read as a 1900 to 2000 means what is the range 20 where it will fall is it 1920 or 2020 understand what i'm saying 19 19 20 19 20 right rs maybe imagine if i'm writing 1950 so what happened 1950 onwards up to 250 100 years of span where the 20 will fall it's going to be 2020 right so if i'm writing it as a uh 60 where it will fall so if i'm writing it so 20 watts 0 5 and 60 which 60 it is 1960 yes so from 1950 onwards up up to 100 years of span by default it will take it if i'm giving a 60 it is going to be a 1960 not as a 2016. execute the program and run it now so now you can see that 1960 you got it understand so like that so you can use an option whenever it's a two digits here it will not affect on your four digits of your data at all only for the two digits of your year the 60 you want to read it as a 1960 yes you can read it or else you want to read this particular two digits as a 1860 so then you can read it by just mentioning it so write it 1800 so 1800 onwards up to 100 years of span it will take it and execute the program and run it now so 1868 just got ready so 1960 onwards up to only uh 1800 on what's up for a hundred years fan it will take it up to 1900 so you'll get it is this particular concept is clear to everyone shall i move to the next yes or no yes please options here cut off options here cut off a statement where exactly we have to give you can write it now you can write it anywhere in the sas environment menu okay it's a global option we call it as a we can write it anywhere in the sas environment global in the sense imagine the input statement we can write it always after data set name only chord statement we can write it after that input statement only always right there are some limitations if i'm writing options here cut off it's a global options you can write it anywhere in the sas environment but you need to make sure before you using it the option should be early rain understand so where i'm using it i'm just using it here so definitely the option should be above this particular two line anywhere you can write it above these two lines you can write it somewhere that's enough right 19 and 20 you write it after after your 18th line also that's fine or else after your 17th line also fine you can write it anywhere in the sas environment okay thank you thank you right so some case what happens you know sometimes you don't want it as a mm ddy by 10 dot format if i make it eight will that solve my issue still it is it will work but everything the two digits here will be displayed can i see that it's a 91 and it's a 92 and 60 you'll get it got it the year is just reduced from the four digit to the two digits or else you write it here all right let's capture later on oh yeah or year four dot what happened why you are getting like this only the year we will get it instead of the total date only the year is enough for me 1991 1992 1960 1860 and all yes you will get it only here year four dot if you write it only the year you will get it right so we are coming to here some cases client will give the data to you with slashes sometimes it will be dashes sometimes it is a points sometimes it's the columns sometimes it is a blank how we are going to read all this type of data so either of this particular format it may be slash or it may be dash at maybe point but the informat statement is fixed we will not change the informat statement at all the informat statement always will be the ddmy way ten dot format only but the format we will change it how we will change it we will change it as a ddm by by 10 dot okay so that up to 10 digits length you will get it ddm y d 10 dot so that you will get the dashes ddm y by p 10 dot you will get the points ddmm yes c10 dot you will get the collins ddm by web beat and dot so that now you will get the blanks information is fixed but the format you can change it however you want it let's see in this example i'm taking the information data midi 2 is my data set name input statement pid age and jdate and yell date is the variable you are just taking it in format for jdate and mmddy10 dot format yell date you're reading it as a ddmm wi-fi 10 dot format card save statement i'm trying to create the data so that what happened so the data will be in the form of some numbers so midi 2 you just go there and check it yes all the midi 2 with some numbers you can see some numbers with minus values also so why we will get the minus values can you hear any uh screaming sound of baby yes no yeah yes okay just hold on a second all right so here so we have some minus values so whenever you have a minus values so that means the value before your 1960 we call it as a minus value so you see here the values you before your 1960 i think some values we have it so 1992 and this is your 90 so 90 means we said that it's an 1800 onwards right so it is going to be really 1890 when it is 1890 so 1898 values will be read as a missing value so by default you just go there and check your midi 2 so 80 90 values is minus minus uh 25439 what is this mine is the values before your 1960 is going to be a minus values values after your 1960 will be your positive values at that 1960 it is a zero so before values is minus and after values it is going to be positive right so now what we do is even these values also will be get converted how i wanted format for jdate and late i'm writing it like this ddm and wi-fi standard format now my question is how the j-date is going to be appear is it with a dd-mm why wait d dot d-10 dot format it will be applied rls nothing will be applied to the j-date what will be your answer i'm just writing a format dd mm-y d10 dot only for l8 what is going to be happen for jdate now if i execute yes please maybe dd my mm yy d10 format may apply to the edit also yes that's right not sure yeah yeah you're right so this particular ddm yt d10 dot format will be applicable for the both variables also not only this both imagine if you are writing around 20 variables also the format you are expecting to apply for these 20 variables also that's fine matter execute it you see the d so that means the dash is format i need it right ddm why wait d10 dot you written so that you will get the dashes everywhere can you see this instead of just two slashes you will get the dashes or else yes i want to write it in the form of uh imagine i'm writing it like so ddmy um maybe c 10 dot so that i need a columns so j date will be with the columns and remaining values values with the dates you will get can you see that so ddmny by c10 dot you will get the columns and l8 will be ddma this one yes yes got it right so we're coming to here sometimes the date in the form of some dates like this also 12th december 2003 12th iphone the eci fund 2003 rls 12th dac 03 or something like that the dates we will write in general so if you want to read this particular data as it is into sas environment we need to write it as a date nine dot why it's a date nine dot including the date total how many digits it is nine digits length only you see nine digits right now so many one two three four five six seven eight or nine so nine digits length if i want to print this particular date as it is just write it as a date nine dot or else if i'm just writing it here as a um 12th december iphone with 2003 you you have it in a 11 digit format if you need it as it is you will write the eleven digit or else client requirement is make it this one also as a date nine dot format yes we can make it or else sometimes the data in this format 12 gsa zero three only that means year will not be in a full manner it is just only for two digits then you need to make sure to write it as a date seven dot and while printing also it should be date seven dot format you are writing it so data lab info is your data set name input statement pid age and jdate and ldate information will be date and ldate will be date11.format i'm reading it you see both the values not only just one value let it be even though it's nine digits format and it's in 11 digit format no matter but the both variable i'm trying to read it as up to 11. format i'm just executing so now you can see that everything will have in the form of numbers you can see jdate and late also will have some numbers now my interest is i want to write it clock print data equal to lab info format jdate ddmm y way ten dollar yell date will be date nine dot format you are writing it and executing it now you can see that jaded with this format late also with this format you will get it right so we are coming to here so date values so john 2003 john 0 3 john iphone 2003 or something like that so okay so the question is here so i read it the date in the form of 12 august or 2003 and 19th november 2003 or something like that you read it but the final outcome is ddmy by 10 dot format you are writing it so that means yeah that's fine that's up to you so once you read it the data into sas environment you can change any way to anyway that's up to you whether you will write it in ddm and wi-fi format mmddy format our date niner format date seven dot format that's up to you the output how you want it but how you are reading it it will matters actually right so date nine dot format you're reading it and execute the program now you're just printing it yes please ask the question yeah yeah actually in this case uh now you give the format in the proc step right prop print time yeah so if you are giving the same statement in the data step also it's going to work the same yeah yeah it's the same you you want to this one you're asking right this line you write it this one no yes yes format jd ddm y by ten dot and uh date nine dot format and execute and let's see is it giving same yes yeah yeah same okay so sometimes what happen you know you won't have a date only month and year in which case we generally have like this only month and year so when we have what i can say uh suppose just imagine we are collecting the patient information so patient history we are collecting uh what type of diseases he already faced and all so maybe imagine patient they suffer with some jaundice he know the month and year of that particular date but he don't know what exactly a particular date is date is missing this type of dates we call it as a partial date suppose imagine yes i suffer with uh uh john disand january 2003 i hope if he say so what happened january 2003 is a date so that means there is no date there that is month and year we know there is no date then this type of cases how we are going to read in our sas let's see to explain that so we have a special concept called um first today of that month we will consider as a date let's see first of all so john 0 3 john 2003 if you want to read it monthly year 700 format you need to read and if it is in a john 0 3 if you want to read it this one also month year 5.4 man and john 2003 if you're writing month year eight that format you are reading it so the format again monthly year 7. format and month year 5. format month year 7. format as it is you're writing it but here you don't want the iphone you want it as it is then write it monthly years you'll not forget now the thing is for a while i'll not remove i'll not write this particular value here and one more if i'm just removing this particular column that's my interest if i'm selecting it what happen it will be selected like a horizontal no i don't want it i won't i don't want only this column just click on alt and select it only that column will be deleted so now you are writing it let's see what happen i have a month and year only but i don't have any date so what my interest is i'm just reading it into sas environment what happened sas will give some numbers to you in the info lab data set yes some numbers you got it so what these numbers exactly let's see format for jdate i'm writing ddmy we know mm and yy but we don't know the date so how we are going to get the date execute the program the date will be zero one zero one two thousand three zero one zero two two thousand three zero one zero three two thousand three what is this zero one means the first day of the month everything happens like that default it will take so that means whenever something happen in a january means the worst case scenario it will be the january 1st if something happened in the february the worst case scenario is at least it should be january february 1st am i right or wrong so yes first day of the month by default it will take so that's as default whenever you are don't have any date first day my day of the particular month will be considered as a date and executing the program and now you are getting that the value is proper and one more i'm just writing it here see now i have this particular data can you just tell me what date it is what date you are expecting all right yeah maybe we have to subtract we have to take the difference from the jan 1960 not sure actually this date is nothing but 2003 is the correct there is no doubt in that 2003 is the year plus how many days it is 32 days okay 31 days for your january right how many days for january 31 days only right one day is left right one day is your first february of 2003 this date is refers to understand what i'm saying 2003 plus 31 days plus one day so because 2003 plus 32 days 32 days 31 days for your january and 32 day is nothing but your february 1st tell me about this date 2003 plus how many days so seven 75 days uh 31 days 31 31 plus yeah plus 28 for uh feb why it's a 28 it's not a leap year right 2003 is not a leap year so 28 days for your february otherwise it's a 29 yeah then how many days yes 16 may yeah 16 days is spending so that is your march 16 the date refers to tell me about this one 2003 plus 31 days for your january 20 how many days for march 31 31 31 how many days left then so 20 is nothing but it's in april 28th that's april 20th now what we do is we'll just see is the same values we are getting it or not we will see execute the program and run it now now you can see that 1st january 1st february of 2003 16th march of 2003 20th april of 2003 is it correct same you got it the required one right yeah so this is called a julian format right we call it as a julian dates if they are providing a data in this format still we can able to read by using this particular format so there are some other formats also let's see data demo data is your data set name input statement pid agent jdate is the variables information mm month year seven dot format but i need a week also that means imagine you you know uh what day you born so you don't know what week it is you want to know the week also yes you can get the week also by using this particular uh format that is called week date so you will get the week date also let's see january of 2003 that means first january 2008 february 2003 first march 2003 how sas will be considered what is the first january 2003 what day it is is it monday tuesdays or thursday and all yeah you can get it so that is your week date 34. i will give it this max i'm writing it 34 dot and executing it can i just see so wednesday january 1st of 2003 saturday february 1st of 2003 saturday march 1st of 2003 you'll get it understand so that means you will get the week also instead of week uh 34 dot i'll make it as a 24 dot can you see some difference i'm writing weekday 24. instead of 34. you can see some difference instead of having a january you will have a john feb and mar earlier you see january february march you can have it but now it says john feb mar you can able to get it wednesday saturday saturday and all you'll get it right i'm just giving is a 20 so weekday i'm giving 20 dot so now we execute the program and run it now so what john 1 2003 start fib 1 2003 start march 2003 1 2003 i'll get it understand what i'm saying so that means you're reducing your size automatically once you're reducing it automatically it will try to give a meaningful output it won't give any wrong thing so it will try to give the meaningful output you see both the all the values still it is the same meaning so we're done today january 1st of 2003 so what happen if i reduce the size completely to the 10 digits if i'm giving it up to 10 so execute the program and run it now and now you can see that so wednesday saturday saturday something like that only you will get it you won't get it any other format of your date at all it's just like a wednesday saturday saturday something like that you'll get it understand able to follow me yes no yeah yes yes good so this is all about for today's class so tomorrow we are going to continue from here saying it so different uh uh what is that replacing a quality modifier and reminding stuff we will see so by tomorrow we are going to complete this particular session hello everyone and today we are going to continue the class where we left in the last class we just learned about different uh dates what we have in our sas we just talked about those and now we'll just talk about some numerical formats and at the same time so we'll talk about some of the um what i can say date and time formats also we'll see one by one for that first of all what i'll do is let me just open my sash open program go to documents as tutorial go to sas class chemical day 3 format and in format good so now we just done with uh all these things like uh dates every date we just come uh completed and now we are just looking into a new program here replacing informat statement by using a column modifier so what is the replacing informant statement what exactly we can do with it let's see data patient info is your data set name input statement patient id is of the patient jaded joining date of the patient and as well as a living data of the patient so joining data of the patient you are just writing as a ddm y by ten dot so l date will be in a date nine dot format so you're writing it code here statement you're trying to create a new data set name so with the name of patient info execute it and go to libraries and go to work library patient info data set it just got created can you just see all the values like a j date and l date values are numbers how it is numbers because we have not used any informat statement so how this particular numbers and everything you got it so without using informat statement we can use a column modifier or without using column modifier also so we can run the program either of it whether you are using it or not using it what happened jd there is no problem for yell date it's not reading it let's see what mistake we have done here um okay so default ddm y way 10 dot it will read into sas but date 9 dot it won't read if you want to read date nine dot let's see if i'm giving a colon and execute the program now you will see the numbers can you see now what happened so for a gpp good programming practice always you have to use a colon modifier either you go for input in format or else you can go for a column modifier so that we can avoid creating a new line for the informat so just within the input statement itself we can finish our job so we can able to read the data and then output is your wish how you want it you want it as a ddm by ten dot mmd divided by ten dot so that's up to you so however you want the output you will get it right so this is how we generally manage so with this particular call and modifier so either you go for a informat statement or else you can go for a quality modifier mostly it will solve your purpose is anyone have any questions right so now i will move on to another concept called some of the numerical value suppose i'll just ask you to write so twenty five thousand so generally how you write it twenty five thousand twenty five comma triple zero because this is how we learn from the childhood onwards so to write this particular karma way to put and all if i ask you so 25 lakhs 25 000 as you are in india so maybe just imagine you will write it as a 25 comma 25 comma triple zero because 25 lakhs 25 000 so that's fine or else if you are in us if i ask you to write 25 000 dollars so that dollar sign first 25 then triple zero you can write it let it be either of these values just 25 000 with comma 22 lakhs or 25 lakhs 25 000 or else dollar with 25 000 all this data if i want to read sas directly you see in this example i'm just looking into uh you just say data employee is your data set name input statement employee salary and pf is the variable and cost is a statement so employee id you are giving is at 23 000 and here you are giving as a 30 000 and salary you are giving as a um what i can say so this is your salary and pf they are giving it as a 2 lakh 23 000 and 300 000 or something like that so we have in the data let it be no matter i'm thinking that as it's a numerical value i'm thinking that sas can able to read these values into sas environment and execute the program now and run it so can you just see that salary and pf values are missing the reason behind that is default sas won't able to recognize what values it is what is this comma what is this dollar and everything so if you want this particular value to be rated in a proper order then you have to make sure to write it as salary with the dollar sign you have to make sure and if i'm writing it so that what happen it will be read as a character again it won't be read as a some numerical value now i am interested to read this particular value in this case what we do is we have to go for informant if i want to read total six digits of your 25 25000 to be read so then you have to make sure to write it as a comma 6 dot if i want to print it as it is it should be comma 6 dot we are coming to the 25 lakhs 25 000 if you write it it's a comma 9 dot and we are coming to here format with comma nine dot you are writing it so we are coming to here twenty five lakhs twenty five thousand dollar twenty five thousand you are writing it here dollar seven dot format and here also it's a dollar seven dot format so you'll get it so data employee is your data set name input statement employee id salary and pf and all so if you want to read this particular value into sas environment so first you write it a salary with the column modifier because i'm not using a information statement anymore so comma six dot including comma total six digits of your length again pf also i'm writing including the dollar total nine digits of your length you're writing dollar nine dot so let it be what happen if i'm not giving a format statement what happens to this value you execute it you can see that the final outcome will be without dollars without commas or anything this is how the raw output is looks like twenty three thousand thirty thousand two hundred twenty three two hundred uh twenty three thousand and three hundred thousands you can get it by default if you want to get it the values in a proper way like as it is so you can write it a format statement you write it as same you just write it uh format within a format just specify that's it so whatever you have written in format and write it the same thing for format also but don't write this particular columns here columns is not required in format statement at all i'm executing the program now and run it and you see now you can see that twenty three thousand twenty three thousand dollars or something like that so two like twenty three thousand dollars this is how we write it so when we are writing comma nine dot comma six dot automatically has no way to put the comma but if you see this actually if you are asking me to write in indian standards 2 lakh 23 000 we used to write it but as it says is made up of you as default sas will speak about your standards so that this is how the people they write it there two hundred twenty three thousand three hundred thousand twenty three thousand and thirty thousand and all they'll write it understand right so this is the default how would you also appear so in your output window so you will get it so we're coming to here employee info is your uh okay imagine instead of comma if i'm writing the both values also comma 9 dot if i write it what happened even these values also will be displayed with the name of comma don't expect you will get any indian standards still it is the same like a u.s standard only dollar is gone but remaining all the data is as it is with this one and guys when you are when you need a dollar sign and at the same time if you need a comma dollar nine dot or something like that the length mostly it's enough you don't need to write it separately for comma you need to write it comma format for dollar you need to write it again dollar or something like that don't imagine in that way so if you write a dollar nine dot including the comma and dollar also you'll get it by default right so this is how you can able to read the values into sas environment any questions as of now please speak out no questions i do right so we are coming to here i have some data you see carefully observe so in this particular program so data employee info is your data set name input statement employee id salary i'm just writing it as a comma eight dot format and pf i'm writing as a dialer format because including my total all the digits it's up to 12 characters long so i'm just reading it now you execute the program and run it what happened so you have a value like a salary 23 000 and uh sorry 2 lakh 23 000 and 30 000 you are getting it and award from that you will get the pfl is also with the decimals and everything what i have done i have not done any formats or anything this is the default how the decimals and everything is appearing everything is perfect what i'm just writing is imagine if i'm writing the same thing into my format okay whatever i have written in my in format just writing data format within a format statement i'm just specifying it salary with the comma eight dot and pf with the dollar twelve dot and i'm just writing a semicolon execute it and run it now so now you will not see any decimals or anything can you see this first remaining values you will not see any change much changes in your salary but pf value actually i'm expecting to have some decimals because you just scroll up earlier you have some decimals like a 6 7 and 8 0 but now when you are applying a format called format with 12 so then default what happens you know the decimal places is gone so that it is just rounding up the value two hundred twenty three thousand and three hundred thousand it is just displaying by default understand what i'm saying so here in your pf so salary comma a dot and p of dollar 12 dot is not enough because if you are making 12 up to 12 digits of your length only it is taking it but unfortunately the decimals won't be displayed if you think that the decimals also need to be displayed in your output window you have to make sure to count it like 1 2 3 4 5 6 7 8 9 10 11 so i can write it 11 total length plus how many digits we have two digits we want it so write it 11.2 is the format so that what happened you know execute the program and now you can see the decimals six seven and eight zero that means the total length plus how many decimals you want it the total length is how much you want it plus how many decimals two decimals i need eleven digits with two decimals if i'm writing it that's enough mostly i will so it will solve the issue right suppose if you need a three decimals what happened yes you will get the three decimals also 11.3 but unfortunately what happens you know there will be one more comma gone earlier we use it to have a comma in the middle of your twenty three thousand and thirty three m sorry two hundred twenty three thousand and three hundred thousand there will be a comma but now the comma is gone only 670 and as well as 800 you will get it by default right so yeah so that that's the default if if we are giving as 12.3 then uh are we going to get uh comma at the decimal point you're right so you have to give it as a 12.3 because including you see you just count it so total this is uh how many digits length it is three how many digits total right so if you want to add extra one more digit you just add that particular one more digit 2 instead of 11 make it 12 and you see that can you see that now comma yes right so if you want to have a three decimals plus the total length the total length plus your three decimals you have to specify got it okay okay yeah so we're coming to here so data demo is your data set name so input statement employee salary comma six dot and pf with the dollar nine dollar i'm writing it but this time i'm writing in a word format what is word so nothing but if you just go to bank or maybe if you're writing something on checks generally how you write it like 23 000 30 000 2 lakh 23 000 only like that right generally you we used to write like that if you want to write your values in that way yes you can do it so by using words 34 dot or something like that you can increase the size up to 34 or 36 i hope so you just increase maximum and let's see what happened so 23 000 30 000 220 300 three hundred thousand why it is not giving us a two lakh twenty three thousand and all because as i said earlier so sas is made up of an us so mostly it will speak this particular slang only if you interested to display the information in indian standards so then you have to apply a statement called proc format that we will see in upcoming class so by applying a format we can change the values how you want to display if it is in a rupees yes you can able to display the rupees also by applying a format but it's very early stage to discuss that so just remember by default if you want by default it will just speak in a u.s slang only and votes 34 dot means up to 34 characters long it will read it the sas into so this one if i reduce that 34 to 24 yes there is no doubt in that you can reduce two but while reducing it definitely there will be a reduction in your output also you can see 233 3 after that star the star work whenever you see in your output window so you need to remember one thing that means there will be a truncation on your output so that means due to some reason the output is getting truncated so you have to make sure that should not be happen by seeing a star mark in real time so that you just need to increase the format size how much you want it so then you can increase it up to 34 or something like that you will need not see that particular star mark anymore everything is perfect right so this is all about your numerical formats how we are reading into sas even though numerics also required a format mainly for commas and dollar sign to be read let's see there is a one more case called time formats sas default count able to read even time also so what is this time nothing but so 10 o'clock 12 minutes and 30 seconds you're writing it so in format statement you are writing it and as well as format i'm writing it so it's a time a dot and here also you're writing it's a time 8 dot and we're coming to the data values 2 12 30 pm you're writing it so if i want to read it it should be time turned out so guys imagine one thing is very clear if you want to read the time in a 24 hours format or time 8 dot format is enough if i want to print it as it is in a uh 24 hours format just i made that format is enough or else if i want to write it that time in a 12 hours format am or pm then you have to write it as a time 10 dot and here also you need to write time am pm 10 dot you have to write it so that you will get to know that is it am rpm or else sometimes if you want data system date and time combined together if you want to read this type of date and time combine together values date time 18 dot you have to write it the maximum length is up to 18 if i'm printing as it is so you need to make sure to write it as a date time 18 dot or else a date and time included with am or pm you need it that means so date your writing item but time i'm displaying it in am rpm format so that date time 20 dot but format should be date am pm so the format will be deferred from am rpm see time ampm20 dot date am pm 20 dot is enough to read these values let's see in this particular program how we read so data my data set name i'm writing it lab input pid j time and l time leaving time also i'm writing it so in format i'm writing it for a j time i'm writing time 10 dot format including total time up to 10 digits of your length you're reading it real time also time 8 dot i'm reading it because it's a 24 hour time format if i run the program and execute it by default what happen you can see some weird output in your output window can you see that j time is eighteen thousand seven hundred and seventy one or else uh five lakh one thousand rs fifty one thousand yeah fifty one thousand uh uh one five or something like that you are getting it so 115 or something like that you are getting the value so what is that mean just hold on a second so default you can see so some numbers you are getting it actually these numbers suppose imagine if you are dealing with a date then we know that the number of days from your january 1st 1960 onwards what about this one then so what about this eighteen thousand seven hundred seventy one and five and fifty one thousand and all this is your number of seconds how i can say number of second you see it's a sixty so what is the 16 you just go there and check it 0 0 1 0 0 can you just tell me what time it is anyone what time it is uh one o'clock hey it's one o'clock check it out seconds minutes hours huh okay correct so 12 o'clock one minute means one minute means how many seconds 60 seconds 60 seconds you see that the 60 is nothing but number of seconds it is storing so that means all the j time and l time all the values is storing as a number of seconds by default so 5 hours right hour how many seconds three thousand six hundred seconds am i right or wrong yeah right so five hours five into three thousand six hundred plus twelve minutes fifty one how many seconds it is so it will add that also so the total number of seconds is nothing but 18771 seconds agree that's default so time will be stored in the form of seconds as a units date will be stored number of days but time will be stored number of seconds okay now tell me so i'm just reading this particular value as a time format with some numbers and all that's okay as a human being we will not able to understand if i want to print it as it is what we can do can we write a format yes we can write it format within a format statement you have to specify what you want it so 5 o'clock 12 minutes 51 a.m that means am rpm it's there means it's a 12 hours format if you want to write it in a 24 hours format so you have to write it j time okay so joining time so you have to write it so 24 hours means time 8 dot is enough so that automatically you see my j time will appear in the form of 24 hours format can i see that 5 12 51 only there is no am rpm that's correct but here 2 o'clock 11 minutes 55 seconds pm earlier but now 14 11 55 you'll get it by default but the l time is still same because we have not applied any format for the l time that's the reason why the l time is as it is so if you want to write something for real time also imagine the l time i'm just writing later so i'm writing it here yellow time i need it time time am pm i'm writing 10 dot so that what happen the 24 hours time format is going to be converted into a tall followers format can i see now is it correct yes agree yes at the same time sometimes we have a date and time combined together madam so you see data your data set name some data set name i'm just writing it td input pid drug and time also imagine some side effects happen for a few patients drug name we have it and as well as time just hold on so here so data dd is my data set name input pi day drug and time date and time combined together here so that means my system data also that means date also there and as well as time also combined together okay so some of the drugs they have given to the patient because of that they got some side effects the side effects the date has taken into consideration here execute the program and run it now so what happen what do you think is going to be store the values now let me just instead of writing a format let me just execute and let's see what value you'll get it my data set name i'll write it dd let's see what happen do you know what this number is anyone guess so what this number read the number are you asking to read the number a few seconds ah seconds means which seconds it is is it hourly seconds and i i think that the time you showed in the past see i have a system date also madam i have a time also okay yeah i'm getting some numbers ah tell me that might be 12 august 2003 the threes like i don't like how many days what if those are the seconds you're right so what happens you know so january 1st 1960 onwards 12th august 2003 how many days maybe some 19 000 days remember so in the nineteen thousand day per day how many seconds one hour three thousand six hundred twenty four hours right yeah twenty four hours into three thousand six hundred so that is the one day seconds that is so into 19 000 days yeah right so plus your seconds again 12 hours 20 minutes second the total value here it is your number of seconds matter date and time combined together number of seconds you can able to get it this is the number if i want to print it as it is then you can write it directly write it saying it format within a format i can directly write it saying it date time 20 dot yes as it is will be printed can you see now yeah right so system date and time printed together yeah or else instead of that what i can write 18 dot also i can write it what happened the difference is there is no am rpm earlier also there is no am rpm yes what is the difference earlier also i don't have am or pm but still the data is there can you see some small difference earlier year should be four digits but now the how many years how many digits for a year two days it's two digits it automatically reduce and try to give a meaningful output even though whenever the length is not enough but whenever it crosses through the limit no then automatically it will show the message in your log so the format is out of range or something like that it will show by default got it so this is all about how you are going to read different date formats and as well as time formats and as well as numerical formats what we have in our sas we just seen hello everyone and today we are going to talk about a info class so like a we just done with our different date formats how we can able to read into sas and all we have done so now let me just import some external files into sas environment by using an option called infile for that let me just open my sas software go to sas tutorial i'm just talking about infile so what is meant by this in file in file means you are importing a xml file into sas environment that we call it as a infile so what is the behavior of the same file and all we will see one by one so before that how sas will handle the missing value we will say data trials is your data set name input statement center trial and subject is variable and currency statement so here you have values apollo phase 1 with 78 and nims with a missing value with 89 carry with phase 3 with 56 and apollo phase 2 with missing value nim space 2 with 79 and care phase 3 with missing value once you execute it and run the program and now what happened new data set will be created that trials see center trial and subject is the variable so there you have apollo and all the data but one thing is very clear so you have a numerical value missing here sorry character value missing for your trial here is one missing value and you can see there are some missing value for numerics also but that means i want to know the difference exactly how the character missing value appears and as well as how the numerical value appears if i run the program and execute it so now you can see that the character value appear as a blank and the numerical value missing value appear as a period sign as a still with dot right that's a default character missing value always indicated as a blank and numeric missing value always indicated as a period that's the default of size there is nothing special in this so now so this is how the sas will message will deal with this missing value for character and numeric so now what i'll do is i'm trying to import some external data into sas environment data your data missing in file you are just mentioning a part of that file where it is located so let me just go there and bring that particular file where it is located go to my sas tutorial folder go to day 3 there are many files we have it let me just go for filter out only the text files because white text files by using in file we can import only text files csv files and dot dat files only these three types of files only we can import it so now so i'm interested to import from the text file let's see the text file name is called missing so this is my data you see that i'm interested to import this data into sas environment as of now we use it to type the data inside of your sas but in real time what happens you know you don't need to type it you need to as it is you have to import it by using the in file or proc import procedure so if you want to import external data into sas environment so you have to make sure to copy the path of the file i'm just copying it right click on it go to the properties go to the security and i'm just copying the path of that file where it is located i'm done so now i'm just go to here data your data set name missing and after that you're just mentioning the path of the file where it is located i'm just mentioning a path so that is my c user desktop as tutorial day 3 missing dot text so this is the file path where it is located and then in your writing input statement i know that it's a three variables the variable names which is not available in the program sorry in that particular data so i'm just creating x y and z is the three variables you're writing it execute the program and run it now and now you can see that x is one variable y is one variable z is one variable it's got created and you have the so you have the values like this so x 11 and 12 13 and 14 y one two three uh two again zed wise all the data it is just displaying it but unfortunately go to log and check it so log is having some disturbance so log actually reading six observations containing a data but unfortunately only four observations you are getting it right now how i get to know you do one thing you just keep your output open and keep your program also to be open then put this particular value side by side and now you can see that so 11 178 12 89 13 3 56 and 14 2 with i'm expecting to have this particular value as a missing but unfortunately what happened this 15 is moved to this particular place that means whenever you have a missing value the next value will be our place is the missing value position that's a default of sas so that's a happen so because of this what happened ultimately that last two rows not ready into size only one two three four lines only needed even the fourth line also not correct so this is how the default uh happens whenever you don't have a value the next value will over places the missing value position is called flow over automatically it will over places the missing value so then how you can get rid of this type of issue if you want to get rid of this issue so you have to write an option called missover so what missouri will do okay so what missouri will do whatever the values are missing that values only for your last variable only the missing value will be filled so there are two functions with miss over one is without just filling the missing value like this you see this see that wherever you have a missing value the just dot ascend with a period sign and one more here also if you have missing value so it just period sign so that earlier we have six records in your text file now also i got a six day cards can you just see so all six records is populated what is the problem what we have done the only thing we have done is we just used an option called miss over so automatically the last variable we have a missing value it just filled right and apart from that we go for the same thing what we have done we are using infile with external data importing into sas environment and we are feeling the missing value that's fine can we do the same thing if the data is inside of yours as okay yes we can do so data your data set name i'm writing it here it's a missing in file statement cards i'm missing or so that means by using infile you can write a path of the file or else by using infile you can write a cards also so what is the difference between the do both in file with path means you're just telling us has to current power to read the path containing a data or else in file with cards means you are telling a sas to read this particular uh cards containing a data what you haven't given inside and apart from that miss over you're writing it as you already know that without writing this message or what happened so default it will read up to four four observations only if you want to read that missing values also you have to write an option called miss over so miss over automatically hand is the situation and now it's the same either you go for in file with the path and in file with chord statement both also same meaning it is just reading actional data into sas environment so by using an option called mesover so miss over can we write it without writing anything like in file and all can we able to adjust dismiss over no so mess over will work only within file only it is comes under in file option so in file you can you miss or you can write it on when you write in in file only without writing in file don't expect this message to be work so that's the default and one more let's see what is flow over as i said earlier whether i have not mentioned or mentioned let's see this how the flow over is working data numbers is your data set name input cards test number i'm just giving it here with xx what happen if i run the program you execute it and run the program now what happen test number is taken to 2 and xx is taken 330 again test number taken for four and xx taken as a phi phi that means when you don't have any value for your x automatically it will read from your next line that is called flow over whether you can write it if i'm writing it also flower it'll be the same meaning without writing also it's the same meaning the reason behind that is flow over is the default automatically it will try to read the data from your next line whenever you have a missing value that's what happened is called floor stop over so what this stopover will do so whenever the data is lesser than what you specified then it will stop reading the data uh into the next line that means ultimately it will throw an error saying it that particular data we don't have a values or something like that you'll get it so if you want it the stopover you see um let me just uh no document which one to be imported no document text okay so this is my data actually so i just specified two two two two three three three three there are some missing value again five five let's see what happened you specified a test number here i'm trying to read it but this time i'm using a stopover so if i execute the program and read it first you just check the path the path is not correct then make sure to copy proper path so right now what happened so this is reading it so unfortunately imagine if you specify um the value of five dot only specify imagine there are some records so which you have a length is lesser than five character so now what happens if i run this particular program see without writing this one there is no use of stopover whether you are writing it or not writing it there is no doubt so as default it will read these values as a two two two three three three missing value five fifi and now what happened i'm writing a stopover and at the same time i'm just mentioning a the test number with up to some values like a four dot or something like that if i execute it and run the program so now you see go to check your log it will show that the record statement exceeds the record length that means default stopover will give you the error message to you that means whatever you specified the length okay if that length is not enough to read your values definitely it will show error in your log saying it so this particular length what you specified is not enough or something like that you'll get it so that's a problem if you can able to read it up to six characters long let's see is it giving the same error still it is same that means always this particular stopover what you have to manage is you have to give a proper length when you are using a stopover if you don't want to read if the proper length is not available then try to write a stopover go and check your log log will tell that is this particular length is not enough or is it enough and all those stuff you can get it from the stopover all right so what happen first of all miss over default automatically whenever you have missing value the next value will over places the missing value position what stopover will do whenever you specified a length if the length specified the values which we have it in our data is uh smaller than your specified length then automatically it will throw an error and what about this one miss over with another option we see right now so the same thing like earlier we are copying it from the data here i'm writing here is called missouri so what the missouri will do so you said that naidu number with four dot imagine so what happen if i run it whatever the values up to four letters long only that values will be read four are above four but the values which are lesser than 4 it will be leads to missing value can you see the values with up to 4 letters it is just reading the values which are lesser than your 4 letters long it is just going to be missing so that's also miss over will do another one is filling the missing value another one is the length what you specified if it is not enough then automatically it will take it right so this is called miss over and one more is called trend cover so trunk over what it will do no matter whether you have the length is not enough or enough or whatever it is how can sas can able to read up to five characters long by can that will read it by default you can see that so i think the path is not correct yeah so now you see that what trunkover will do so automatically it will read the data up to five characters long even though the values are smaller still sas can able to read up to five characters lang whatever the data is available and remaining values also will be read it so now if you just compare all the value uh compare all these options of infile flower means as you know that if it is a missing value the next value will replace is the missing value so that's it by default of size stop over if you want to read the values with specified length only if it is lesser than that length you are expecting it some error to be displayed then go for a stop over another one is called miss over so whenever you specify the length is lesser than your character so that means the character length is up to uh two decimals or three decimals but you specified up to five small whatever is it matching with your five or that will only display remaining all the values are missing in your missouri option what trunk cover will do no matter it's in a two digits or three digits no no matter everything up to five characters long says can able to read it that is called transcover so now this is the classic example of this particular all these options so with the column input method we will see one by one i have a new director a new document text three i have it so this is my data i want to read this data if you see rome we have paris we have london we have new york new space york actually as we know that whenever you have a space then what happened yark will be continued into the next column that's default we know so meriden as well as acid m and all and some values we'll have it here three eight and six six six and three and three seventy and 4 and again we have some space that means you see some of the values are smaller and some of the values are bigger but all the values i want to read in a proper order without having any mess if you want to read this type of data what you do is let me right click and go to the properties and go to the security and copy the path of the file where it is located and now i'm just writing it here but i'm just writing i'm mentioning a path without writing this particular trunk over let's see can i just put the mute i can hear some disturbance so now data uh our tours are something like that we have it so in this we have a city so city variable i want to read it one to nine characters long nights i want to read it only the 11th digit i want to read it as a night and land cost i want to read it from 13 onwards up to 16 number of events i want to read it on 8th character 18th character only event description i want to read it from 20 to 36 uh two guide values i want to read it from 38 to 45 and backup guide is i'm reading it up to 45 to 57 that means i already know that the lengths and all from okay let me just open that so all the lengths and all i know that that's the reason why i specified the length how much i want it i specified here so if i try to read it without writing any uh what is that so trunk over let's see what happens if i execute it and run the program yes you got only three records and one more the new arc it just read it in a different way can you see that how the new york is reading what happened so even to description so what happens here here you know so the backup guide is taking into the second line why the backup guide values are it is just it is reading as a uh london so six we'll just compare the values so that no you will get it side by side huh so rome 3 750 and 7 4 m 3 z and dm echo and here i'm expecting to display the information a paris guide as a taurus i'm expecting but unfortunately what happened it is reading from the data of paris because what happened actually this length what you specified it's not enough it automatically reading the values from your next values that's default happens like that automatically it will try to read the length is not enough for this particular backup guide automatically read it from the next line so because of that it's a total mess happens if you could have written a statement saying it turned over what happened if the length is small still the values will not move here and there can you see that now what happened backup guide torus and lucas and lucas and dimko and all whatever the values you are specifying it as it is you will get it and apart from that new york will get it even though you have a space in the middle still sas can able to read it so turn cover option what it will do is whenever the length is smaller but still sas is assigning you see city variable wise we said one to nine characters to be reading but unfortunately what happened rome and paris and all the length what we specified is not nine characters long it's lesser than that but still sas can able to read it up to nine characters long by default because you specified one to nine so in the city name it automatically reads so that's your trunk over how the data will be get ready into sas environment and one more here some of the values is just operating with the tab space you see some of the tab files we have it in our says see so this is not a default space you just see this data is nothing but a tab separated delimiters if you want to read this type of data into sas environment so what you have to do is make sure right click and go to the properties security and copying the path so what you do is you just write it data your dataset name and path of the file where it is located and if it is in a uh a text file you are writing it as a text dlm equal to that means delimiter equal to what delimiter today is tab separated delimiter if it is a space operator delimiter you don't need to write anything but it's a tab separated delimiter if you want to read this particular tabs operator denominator data into sas environment you need to write 0 9 with x okay input with x y z and 0 9 with x you are writing it and execute the program and run it now and now you can see that the values is populated properly fine so without writing 0 9x let's see how the values are read without writing this particular dlm equal to 09x and all and execute it this is how the data is that means that particular tab separated space will not be able to read by the sas default so if you want to read this particular values in a proper way so you have to make sure to write dlm equal to 09 with x so then it will read it execute the program and run it now everything is perfect live yes what is 9x so 09x is the code to read the tab separated delimiter files made up okay right so now what happened you know there are some times the data in a messy manner sometimes the data with comma sometimes the data with dollar sign sometimes the data with ampersand sign let's see without giving this will this particular data will be read into sas in a proper way yes no data clean is your data set name input statement pid name and age and gender so 123 comma current and dollar sign 24 and efficient male again 145 and kumar 25 and male 134 ramya and 25 uh female and all if i run the program what happens if i run it tell me it'll be misread yeah so definitely it will be so once you execute it this is how the outcome is what happened as we know that as per our list input method rules what is the default the data must be separate with at least a single blank right if you have a multiple blanks also that's fine but at least single blank we are expecting to be displayed but unfortunately what happened the 123 and kiran we have a comma and kiran and 24 we have a dollar actually if you have a dollar sign after your variable name that will make some sense but what is the use of having a dollar sign within a data so there is no use of it again amphigen sign also so i'm not interested to have this amphigen sign also so if you want to get rid of this amphigen sign too so we can remove it by using this particular options right so what we do is i'm just writing it execute the program and run it now that's it this is how it output if you want to read these particular values in a proper way so you have to make sure to write it a statement by using dlm equal to what need to be separated yes i need to separate the comma and i need to separate the uh ampersand sign this is your end sign and i want to remove the dialog sign also i just specified and i want to remove the space also you see 134 and ramya there will be a space because if you remove the space automatically sas will give a proper space to you right that's by default so you are mentioning space also to be removed in the dlm statement dlm equal do quotations with comma amphisense and dollar sign and space also you are expecting to remove it let's see how this output is looks like can you see this the output is very clean and this is how the output is looks like so pi device name wise is gender wise all the data is just appearing it because you have remote comma ampersand and dollar signs from the data yes the data is messed up earlier it's a mess up now it's also clean so we can able to read these values into sas environment right so we're coming to here i have a data with me so data demo one so the same thing if you are importing the data from reaction file by using this one dlm yes we can do right so the same file you can do but i'm not explaining here because it's the same action what we have done with the dlm the only instead of writing cards we are writing a path containing a data nothing special remaining all will be the same imagine there is a situation like this i have a data with me data clean and in file with cards can you just see all the data is operating with comma is it yes or no is it correct all the data is separating with comma right so all the data is operating with comma i'm interested to separate this particular data with space instead of comma can we do it we can do it can you just tell me how to use it by using blm statement you write it dlm equal to what you have to write in a quotations you have to mention what do you want to remove is it a single double quotations that's up to me and then you have to write it commas to be removed yes i'm writing comma and executing the program and run it now so unfortunately you got a two records but in your data you have around three records but only two records it read even the two records also i'm not sure yeah the two records also not correct so it's not reading into pro or properly into sas the reason behind that is whenever you have commas like a concurrent commas that means comma after gamma immediately dlm equal to comma will not work in this type of situation only we use a statement called dsd so data sensitivity delimiter so what this will do it automatically separates these two commas and then automatically it will create blanks for you you just go there and check it see all the data is printing as it is when you don't have any data for your name it is just reading it as a blank can you just see that it read it as a blank and this is how it looks like so we're coming to here so here so dsd same what we have done is it is just part containing the data you are trying to read that's okay so let's see data your data set name clinical in file with cards and i'm writing in a statement called dsd input pid name and age and gender you're writing cards is statement so what happen so when i'm writing a dsd it will remove the commas at the same time it will remove the single quotations and double quotations also let's see it will remove automatically commas and as well as everywhere you have a single quotes and double quotations so dsd can remove that also can you just see and execute it yes not only just removing commas it will remove single quotes on double quotations that means whenever the data is separating uniformly mostly dsd will work there and it will separate the data and we are coming to here data clinical is your data set name there is a situation can we able to do the same thing with dsd data i'm writing my data set name as a clinical info with cards and dsd input statement pid name and age and gender is the variable in courtesy statement so within this i'm writing pi device 123 and dollar and all so i want to use the dsd sign to remove all execute the program and run it now it won't be separated if you want to remove and unders at the rate sign and comma and quotations and all you have to write dlm see in this situation we can able to finish everything with the dlm dlm equal to inner quotations that's the single quotation the double quotations that's up to you so i'm interested to remove the dollar sign yes i specified interested to remove the single quotations so i specified and after that i'm interested to remove the comma also i specified and interested to remove the space and apart from that i am interested to remove uh what i can say at the rate sign also i'm just specifying it and double quotations also to be removed i'm just writing double quotations also so we specified a comma and space everything we specified with the dlm statement let's see will this work or not yes it's working right so by using a dlm mostly we can able to manage except that particular concurrent spaces a concurrent commas when you got it right comma after comma so that type of situations the dlm won't work but remaining all the situations we can able to manage with the so dlm so dsd will work only the concurrent situations does anyone have any questions until here what if you had a txt file um eliminated by by pipes and you had two pipes together what would you use then um imagine you want to the data is separating with this one like this yes okay let's see i am is it reading yeah but what if you had missing data like you showed before instead of having two commas together you had two pipes would would this dlm work for that uh sorry missing value okay that means um okay well i'd say that name wasn't there for example yeah and they had to pipe two pipes together so that means you just pipe like this you're expecting yes it's leads to error and now okay in this example we'll consider so wherever it is a space replace that space with a pipe symbol is it okay yes where is that yeah even first observation itself it is not reading that means we need to see something to separate for a pipe um write it dlm equal to quotations with pipe that's the same and write dsd can you see now is it working i just used a combinations okay okay i could see it now right so all those five symbols separating with the dlm there are some situations it not handles right these type of situations so then i write in a dsd if i'm using the both so it's working okay great thank you yeah so now here i want to just i'm just providing input data to this as a data lab is your input data you're providing it input at the rate with care trial and subject so if i run the program can anyone tell me from the 210 to 222 how many variables is going to be created yes please maybe three variables we will get it but only with the care once only um we may get it i'll see 215 observation 200 um [Music] uh so instead of three variables you will get a two variables meta okay because at the right carry is just for filter the data so data lab is your data set name input statement at the rate care means you are picking up it is just for filter the data of your care wherever it is possible for your trial and subject you see and execute the program now now you can see that trial with subject phase 1 with 89 and as well as phase 2 with 89 you will get it okay got it got it so this is just for filtering purpose we are not displaying anything the care apollo names and all just to filter the data and one more so let's see i have a data with me okay so all the data on my blood dataset here where is my blood so blood dataset here total thousand patients information which is there with me so all the data is just separating with some spaces here i'm interested to remove this one so so you read it this one go to security and let me copy the path i'm copying a path click ok now what i'm just writing data blood one is your data set name in file you are mentioning a path of the file where it is located i'm just mentioning a path of the file and without writing anything i'm trying to read the data into sas environment input pid gender blood type is group and wbc rpc and crucial i'm writing it so execute the program and run it now so the data just read it so one two thousand observations is just written into sas environment you can see that all the one two thousand observations is just read it so now there is no doubt in that that's okay that's very clean but unfortunately what happened you know client doesn't require all the thousand observations only first three records only they need it then i'm just writing it f i r s t o b s equal to so first obvious equal to r else i need only the first 10 records so obs i'm just writing it obs equal to 10 if i'm writing it so what happen only 1 to 10 records only it will get imported you run it now seeing only 1 to 10 records only you can see so obs is the 10 means the end limit is up to 10 letters on 10 lines only what is the start limit then starting reading start reading from the one onwards up to 10 days 10 lines it will read it by default and again i don't want it like this let it be read it from the starting observation 10th onwards up to 100 observations they need it then i'm writing f i r s t o b s equal to first obs equal to 10 and obs equal to 100 i am writing it here so i'm just writing it here it's a hundred so what happened now if i execute the program starting from 10 onwards up to 100 observations we need it so now you see 1 onwards 51 so see 91 records you will get it why it's 91 starting with an 100 starting with the 10 until 100 so including 10 total 90 records general 91 records you'll get it so 11 onwards up to 100 up it's a 90 but even 10th record also included so that default 91 records you will get it so that is a first obvious option equal to 10. imagine if i'm not writing obs equal to 100 tell me what happened now if i execute it what happens 10 trillion from 10 onwards it will be displayed it will take until end right how many suppose you imagine i i said that i have a thousand observations then 990 observations is it 990 one yes 991 you're right so 991 records you'll get it right so first obvious is the option is the start limit and obs is the option is your end limit suppose you need only one recorder what you do first record only we need it rls may be only 10th record i need it first will be a c called one then what obs equal to [Music] one how many records you are expecting only first record right suppose you need a 10th record first obvious equal to 10. [Music] obvious equal to 10 can you see only 10th record so like that if you want only one record yes you can able to pick up by using this special vs and obvious concepts and apart from that so i have a data with me so where it is um is the same i have it here rod 83 yes can you see this the total data is just like this one seems the data is messed up anyone have any question you just ask otherwise please put the mute marvin i think it is from you so please put the minute i can hear some noise man thank you so let me just uh don't try to see this is my data here so i'm interested to read this data into sas environment so you one thing is very clear all the data is operating with comma so i can read it but unfortunately control number is the variable the it is more than 8 characters long you see it is reading up to 8 characters long or something like that so default 8 we know that but it's more than 8 so for that what we do for that variable control number we mention dollar with 11 dot for those we have not mentioned anything dose is within the 8 characters range only again patient number is the variable we have a length of up to 13 character long because the patient number again dose and fat number so the path number you see up to 13 characters long you are taking it from each way variable wise so if you want to read this type of data so definitely the length should be 13 but remaining all within that limits only if you execute the program now all the data is inciting importing into sas environment i think we just imported um just go there libraries work library raw data t3 can you just see all the data is imported got it so what happen all the data is operating with comma dlm equal to comma you have mentioned i'm reading a data from the second observation onwards because i know that first observation is my variable names so i'm just reading observation from the second onwards i'm trying to read the data into sas environment so yes i did it if i want to read the same data imagine if the data is available save as the raw data t3 in the form of csv file dot c s v comma separated files also we can able to read what is comma separated file means how it will appear so yes yes you're right so it's a comma separated file means dot csv can you see microsoft excel comma separated files yes so you see radiator t3 comma separated file it will appear like a excel sheet see this is how the comma separated file is you are interested to read this type of data into sas environment so how we can do very simple right click on it the same it's everything is same the only is instead of just mentioning with the dot txt the extension will be dot csv we can read this type of files also into sas environment so if i run the program either you have it in a dot text format or dot csv format still sas can able to read go to the raw data yes it is reading no matter it is a dot csv or dot text sas can able to read it by using infile we can able to import external files into sas environment and today whatever options we have seen so like starting onwards like in file miss over we have seen so stop over trunk over right miss over stop over miss over stop over trunk over and flow over and dlm equal to zero nine and dlm equal to some other values how you want to split it dsd also we have seen and apart from that at the rate value so that we can filter the data and apart from that first obs and obs options we have seen and csv files also how to import it into sas environment we have seen in this class so this is all about for importing of external files into sas environment which is done right so in this this class we just learned about how to import external files into sas environment and there we have seen about csv file and as well as uh text file how to import into sas environment we have seen so today we'll just move on so global and global options what we have in our sas we are going to see today so what is nothing but these global options see as of now we have written some options like import and cards and all so these are all the local options so that means we have some limitations these options we can write it within the sas environment with a particular space only you see the input statement always you write it after your data set name so card statement you will write it after your input statement so like that we have some limitations so apart from that so in sas we have some global options that means these options we can write it anywhere in the sas environment that means you can write it in the top you can write it in the bottom you can write it in the middle of the program anywhere it's accepted except a card statement you can't write it in the card statement after that you can write it anywhere in the sas environment so what is this global option so how it will be important so these global options once you activate until unless you close the sas session these options will be continued throughout your program running imagine if you apply some global option for one program the same options will be continued for your next programs also if you think that that's that's particular options not to be continue for next programs either you need to kill that particular option what you have activated or else you need to close the sas station so once you close the sas session and open again everything will be fresh so that no so there is no effect on that but let's see how this particular global options how we can play one by one we'll see so you can see that the list of global options what we have it regularly what we are using it for your certification purpose and as well as real time and so here you can see that title footnote no cap center d8 errors equal to 21st obs nf material line size missing nodes number obs page size page number and replace and source and ear cutoff so guys if you try to remember these things with a one by one so you will not remember because all the global options you can't able to recollect it like this so what you do is you try to remember this particular global option with purpose each global option have some purpose so based on your requirement you have to use which global option so suppose imagine your interest is to just give a title to your program so that the global option title you have to use if i want to give a footnote to my program then you have to use a footnote i want to make all the letters in my data that means in my report i want to make it capsulator then you can use this particular center means if you want to display the output in the center of the page if required then you can get it so by default system date will be displayed at the top if you don't want data so then you can write it no date or something like that so we'll see one by one we'll just play with a simple program we'll see and we'll just have all these options so i'm not writing anything here new so i'm just writing it a data mat is my data set name and input statement pid name and edge is the variable and console statement i'm just creating it so i'm just running it there is nothing special the default data set will be get pre created here so so the default output you can see right now the system system date and system time and all the information you can able to find out here so the thing is the sas system is the title by default you are getting it but i am not interested to have this particular dasa system so instead of that you are interested to give your own title yes you can give the statement called title so within a title statement which title you are interested to give it in a quotations it may be single quotations or double quotations that's up to you so you just give it in a quotation so make sure to write it so the title imagine i'm writing this is my data i'm just writing it so semicolon here and execute the program and run it now so that the title will be displayed so this is my data is the title it's got displayed not only that if i just run the another program see in this particular program i haven't given any titles or anything if i try to execute this program also you will get the title as it this is my data for that particular output also that means how many output you are running it in this as and all the outputs will have so this is my data is the title you will get it by default right so if you don't want it imagine for the next output i need instead of this is my data i want to write it as another value so then you can write it so title and you just mentioned in a quotation you write it so this is your data so give a semicolon and run the program so once you execute it and run it now so now you will get it so this is your data you will get it so earlier this is my data but this is your data is the title so now onwards it will be continued unfortunately what happened my next program i don't want to continue any of the titles let it be the system also not required this is my data also not required this is your data also not required i don't want any title to be displayed in my output window so very simple just write title just write semicolon that's enough so you are just deactivating the title not to print anywhere from now onwards you see there will be a no title so title statement you can specify what title to be given and then if you don't want the title you just write the title with semicolon so it is going to be blank and some cases if i want to write it multiple titles suppose man this is my data uh again i'm writing it title 1 and i'm writing it title 2. so the title 2 i'm just writing it this is my data and this is your data this is my data of today i will write it of today i'm just writing it here so semicolon so once you execute it and run it now you can see that so this is my data of today you are expecting to get it the value to be displayed yes you are getting it so this is my data and this is your today information it is just displaying it so like that if you want you can write multiple titles how many titles you can write it like that title 1 title 2 so the max you can write it sir title 10 so within a title 10 you can write it saying it end title or something like that so what happened these many titles you can able to get it title 1 title 2 title 10 see so title one this is my date so title one you see this is my data title two of today you'll get it from there onwards so third onwards up to ninth title you will have some blank the tenth title you specified as the end of the title yes you are getting it so like that you can write n number of titles if required why to write these n number of titles you just go there and check your real-time data so let's see in real time how in which situation we use so go to project project rw273019 go to the documents and cells so there this is the blueprint of the output exactly how the client required so output so you see that they need output like this but the title they need it as a big pharmaceutical company is the first title at the same time i need a system date and uh as well as which program you are using to running that particular uh output and again the project code and again page one out of 20 or one out of 12 30 or something like that the page number and apart from that you can see that and another title you have it here as a subject demographics and baseline characteristics and again they need another title around safety population that means around six titles we need to write it so first title is this one second one is this one and third one is this one the fourth one is uh we have to maintain the blank because if you want to maintain the gap between these two titles you need to maintain one blank title by saying that just title with some title with colon in quotations with face if you write it so the blank title will be generated so again fifth title will be this one and sixth title will be this one so like that the number of titles if required you can create it by using an option here by using title 1 to title 10 you can activate it imagine one of the certification questions they asked me so title 1 this is my data title of today and title 10 you have given and immediately what happened due to some reason i'm writing title um okay so title one you have given and title two you have given again title one i'm writing end title if i execute the program how many titles you are expecting in your output window you return a title 1 this is my data title 2 of today and title 1 end of the title again so that means what happened if i run the program yes so that means how many titles you are expecting to get it in your output window so you are expecting it to detail so one is your end title another one is off today am i right but unfortunately what happening you know only end title you will get it why only end title you are getting the reason behind that is sas it's resetting it so what is resent you given a title one to display the first title and second title also you have given and again title one you are specifying that means sas will reset all these titles above what you have specified and freshly you have given a new title as this one that's what how sas will create right now onwards if you write title one title to title three and again it will continue but if you just miss something and again you write some some value again like like a title one if you write it again so then it is going to be issue suppose imagine if i'm writing as a title one title three and if i write a title 2 what happen execute it now what happen so this is my data you will get it so that is my title 1 and second title you are getting it as a and title so you are getting this title that means the titles when you are using it you need to make sure to follow the order even while following the order if you're given a same title again one more time so automatically it reset all the titles again so you need to make sure title statement you can write it so up to 10 title statements you can write it title 1 to title 10 so it should be following an order title 1 2 3 4 5 6 7 8 9 10 only it should be in order always and apart from that you can write these titles anywhere in the sas environment let's see i want to write this particular title so so within my program after my data statement yes i can write this particular title and execute the program there is no doubt and go to and check go to your log and check it there is no errors so that means you can write these titles anywhere in the sas environment again the same titles if you are interested to write it in the proc step so you can write it here after immediately to your proc print so you can run it so now you execute it and there also it's working that means you can write it anywhere but you should not write it after called statement if you write it after card statement it is going to be an error so we should not do the mistake so this is your title statement you can write it anywhere in the sas environment you can write it in the bottom top left right anywhere you can write it so this is all about your global option of your title the same thing we can write it with footnote also so title is one statement so one global option what we have used and we have one more called footnote also suppose imagine like what we have done as of now playing with the title the same thing we can do with footnote also imagine i want to write a footer what is nothing but footer you just go to your program you can see that the reference listing uh 6.24141 or something like that so this is your reference listing and apart from that you used somewhere as a sd in the program so that means in your output what is sd refers to it's a standard deviation there is somewhere i used as a min what is the min refers to the minimum value so i refer somewhere as max what is the max refers to the maximum value of your data so if you want to write this type of footnotes at the bottom yes you can write it you can write these five footnotes also anywhere in the sas environment no matter so as for the gpp we always write the titles and footnotes within a proc step only so that will be more convenient for our uh outputs so if i'm writing footnote so how i write footnote you just write foot no auto so then just mention it what footnote you want it so let me just write it footnote 1 saying it um the same footnote i'll copy it from here so i need a reference listing of 16.4 or something like that so i'm just writing the same footnote here and semicolon and again i'm writing uh footnote to [Music] two i'm writing it so here it should be semicolon and i have to make sure to give a single quotations footnote 2 i'm just writing it here so i'm just writing it so a reference listing so i'm just writing it here and execute the program and once you run it so now you can see that the reference listing is this one node std standard deviation minimum maximum and all you will get it as a so the values is something like this right so this is my reference footnote so this is my standard deviation minimum maximum and all so i'm interested to get it yes i got it right so like that how many footnotes and how many titles if you required you can get it if you want to stop all the titles and footnote not to display for my next program just write title with semicolon and again write footnote semicolon that will just solve your issue from now onwards don't expect any titles or footnotes is it clear anyone have any questions on this particular titles and footnotes yes yes um how can we get the title at corner site okay so imagine you activated the title right now this is my date this is your data i want it in a corner side you have to write some other global options so write it options okay i'm not interested to have my results in the center of the page then you can write it options no center so we can control with the options no center what happened even the title and as well as a result also will be printed on the left side can you see this now this is your data the right so in real time we use a concept called vds output delivery system in that output delivery system we have an option here in the title itself we can write it so title after that j equal to l so what is the j equal to l justification of title equal to left side alignment if you give it automatically it will go so but right now j equal yell option will not work in this particular program because we are not using any concept called vodius output delivery system we are not using it for a purpose so right now if you want to solve the same issue if you don't want that particular title to be displayed in the center of the page then you can write it options no center so that it won't display the information in the center of the page and execute it yes it is in the left side of your page you can able to see right now i want only title on left side and data is on something so again in that case so the problem is what happened you know so options no center again option center so here the problem what happens you know madam so if you want to center that particular output you can't able to make it right now because the j equal to l option only it will be the solution for data if you are using a concept called oda system output delivery system when you are using it so then only you can write it so title uh it's a j equal to l option will work for a while you try to remember so in real time what we do is if you want to get this particular title to the left side so there is another way to control it suppose imagine the big pharmaceutical company to be displayed here what we do is um let's see take the same so i need my system date and as well as this one as my first titles so i am writing it here options no center you are writing it so write it option center only so option center but the title i'm just specifying like this so big pharmaceutical company i'm writing it can you see you got the title the big pharmaceutical company report in the center the title in the left side alignment you got it right right you can do that also if you try to maintain the space between your values so that no automatically one value will be assigned at one side another value will be assigned to another side you will get to see any other questions nigel on that example you just showed what happens to that date ddmony it is just uh so what happened this one so this this is just write it options ls equal to you make it up to 200 can you see now actually the earlier whatever the length i have given it's not enough man so that's the reason why it's just truncated because default so earlier output you see the default page size you can write it default page size up to here only earlier but now what i have done by using an option called ls that's also global option line size i increased up to 200 characters and now you can see that the ddm yy it is just extracted that means you can see the ddm and yy also and as well as big pharmaceutical company also everything is printing is it making sense yeah so i don't know if this is a silly question but in terms of landscaping for reports like that is there is there usually a standard size that they want uh every organization have their own standards so with this how you need output because if the output size is bigger then they'll go for a less landscape manner if the output's my size is smaller so that they'll use a portrait mode so by default in vodius concept we have an option called orientation equal to landscape or portrait automatically it will adjust your page okay okay thank you right so we no need to uh give this particular length and all so in the vodius concept because we will not send this output as it is in the same format this is not your output what we regularly sending to the client we will send this output in the form of pdf or rtf or html or xml formats so that files you can generate it by using a concept called ods only right so now i'm just displaying the results in the center of the page every time but i am not interested to display the results in the center then you can write an option called no center so you write it options you have to write it option are options either of one is fine you write it options no center the results will not be displayed in the center of the page so that it will be displayed in the left side and apart from that you will get the system date and time by default so i am not interested the system date to be displayed then you can write an option called options no date when you write a note 8 automatically time also will go off if you run the program and no date you see in my output the system date is not required so the system date is gone and apart from that you can see i'm not sure the page number you can see it or not let me just show you yeah page number is 21 right now you can see it down that means in this particular total actions around 21 times i have generated my output that's the reason why the page number 21 you will get it i'm not interested to display my page number also in my output window then i'll write an option called no number so that you won't get that particular page number also to be displayed and execute the program now and run it so that there is no number also in my output window right so and if you want to increasing the length we just seen right now so you think that the length is too much but i want to i want to increase the length but not that much then i can write it option so you already written ls equal to if you write it 100 so that means 100 characters you can increase your base uh page length you see and run it now so now you can see so this is your 100th character value and you just go there um so if you want to see that don't write make your page number to be displayed as a number so that now we get to know that how the page is displaying how far the page is displaying yes the page size is just you can see earlier the line size up to uh somewhere it's a 200 characters long but now i reduce it to off around 100 i specified so that the page number is displaying exactly at the corner of that particular page so that means by using this particular ls option we can control uh the length of that particular output how much you want it so the maximum you can increase it up to 256 characters only you cannot exceed more than 256 character this is upper limit right within that 256 we can write it any length that will work so now i'm just making it 100 and sometimes what happened you know uh imagine i'm displaying some outputs so what happened it may have around how one lakh records so while printing it what happened everything all the one lag records will be distributed to several pages because when you're printing it one page will not be get enough to print all the data in one page so if you think that you want to make sure let it print all the one lakh records in space number one only yes we can do it by using an option called page size if you write it ps equal to the psi is equal to you can write it how many lines per page you want to write it so in if you just see our child's homework books and all so the maximum lines per page maybe it's in 5 15 to 17 lines per page you will have it but if you want to increase more than that but we can't do it as it's a book or something like that but in sas what we can do is the output page size you can increase it but still it will display it as a page number what you specified so if i'm writing page size equal to if i'm writing 500 so that now i can print in my program so if i execute my program 500 lines up to 500 lines i can write it in the one page after the 500 at the one line is going to be continued to my next um page right so up to 500 lines i can interested if i'm interested to print it yes i can do it so is it 500 lines is printing or not how we get to know that when we display some footnote suppose you just write it in a quotations so that you just mentioned some footnote this is end okay so i'm writing a footnote as a this is end execute the program and run it now from now onward so up to 500 lines per page it will be printed so now you see that see this is the end it is displaying it down but where is my output you just scroll up all the way up up up up up somewhere yes you can see that so from here onwards so that means in this particular page around 500 lines you can able to print it so this is your page size but you see this particular page size the number is page number 25 only one page in the page number 25 itself you can able to print around 500 lines per page if required you can increase it so what is the maximum you can increase it up to 32 767 bytes or characters you can increase it this is these many lines you can write it the maximum page size you can write it 32 761 bytes so this is just to increasing a vertical space we use an option called uh ps if you want to increase the space between your horizontal we use an option called ls so these are all the global options what we have it and apart from that so you have the results is printing you see right now all these options are activated for my next program i don't want any of these options then what you do you write it before starting the program itself so i need the results to be displayed in the center of the page write it option center i don't want uh date should be printed in my output also just write it date and numbers i want to print it yeah you're writing it numbers so all those options you can just deactivate data so once you run this particular program what happen so you remove the no from your data then automatically what happen you just go there and check it yes the results will the center of the page and apart from that system date you are getting it and as well as the page number also you are getting it by default you can see here right system date and time and page number and everything you just reset it to the default and it's getting displayed so this is how the global options we use not only this global options we have some other options also like you have a capsule letters also if you don't want the caps if see in this particular program what i have written i want to make everything as a capsule then i can write it options i'm writing caps so that what happen now onwards you execute any program output will be [Music] all the data what is inside also will be displayed everything is a capsule at us so now you just go there and check it everything is a capsulator you are getting it so no matter what data you have it inside all the variable names and everything should be a capsule later so if you don't want it most of the time client requirement is let only variable names to be a capsulator but reminding all the data we should not change it according to our real time scenario so you just see um just go to the project here so instead of project go to the daytime dtm implementation guide you see this so as per the implementation guide when you are submitting some data to your fda so the rules are so definitely the variable name should be in encapsulators only so you just see here you just open this data set this data set name is called demography it's not okay copy ctrl f searching for something so you see all the variables variable names study id domain use subject id subject id reference start date reference end date site id investigator name and all you see that all the variables should be in a capsule letter they are expecting not a small letters or something like that how we can make it only the variable should be capsulator if i'm writing an option cap so that what happened everything the data also is getting capsules and pid is named pid name yeas also is getting capsules and everything so no that is not the uh our interest so then we write it option called no caps so that it won't get any capsulators at all execute the program so you will not see the capsulators for a while you deactivate it only the variable name should be in encapsulator then you write an option called options valid var name equal to you just write it up case so this function will allow only the variable should be in a capsule letter you execute the program and run it now only the capsule the variable should be capsules and remaining all smalls can i just say no matter you are written in a small letters of your data capsulator of data so everything output when you are creating it the final data set will have a capsule address only so it is not mandatory definitely you need to follow and you need to specify the capsulator by using control shift u every time so that no you can make it the variables in a capsulator so that you can use it no it's not required you can write it directly use it options valid wire name equal to up case so that it will make everything into upper cases by default so right so that is the use of options valid where name equal to options we are just using it is there any questions until here and apart from that yes please any questions anyone hi neither yes please for the title statement we are giving up to 10 right title 10 like that for the footnote also 10. yeah you're right okay good so we're coming to here you're writing it if you don't want the capsule letter then you can write it option center you have seen just now if you're writing in the center of the page to be displayed then you can write it and date so if you want system date to be displayed as a in your output window you write it options so you don't need to write it default the date is active if you don't want the date to be displayed then you write it options no date errors equal to 20. suppose imagine you are importing some data like yesterday thousand observations containing a data you are importing it so you want to know that first to 20 observations with errors you want to see see you're importing the data due to some reason you got an error so you got an error for all the thousand observations also but i decided not to see all the thousand observations at one attempt i want to see only the first 20 observations if i'm writing options errors equal to 20 only the first 20 errors you can able to see but in real time so we are not using this option anymore because in real time whenever we have an issue so just having it about your errors we try to see all the errors at one time only yes if you want to limit it you can write an option called errors equal to 20 so that only the first 20 observations which we have an error you cause data so that you can see it by using this particular option and first obvious option so i think yesterday also we have used the first obs and obs concept let me just go for a proc print data equal to so in my sas help library i have a class data set i'm just printing it so what happen default it will be printed so in this we have around 19 observations in my data set yes 19 observations also will be get printed there is no doubt in that so now i'm just writing it saying it the global option writing obs that means options right so obs equal to if i write it 10 what is going to be happen so you execute the program the output you can able to see only 10 records only even though you have around 1 lakh records the output will still it will be display up to 10 records only that means by using this particular global option you are controlling your output window how far you want to display so only 10 records every time it is going to be 10 whether you remove also from here the same program and the program will give the same meaning because as you already know that it's a global option once you activate it it will be continued for next program okay just imagine this program the 10 observations it's fine but next program you want to make it update so maybe it is 20 observations you want to read it then you have to make sure to write an option here again for the next program to change it to a 20 so then you run the program then it will read it up to 20 characters long so now you can see that maybe all the seven 19 observations will be displayed got it so that means we can limit your observation how many need to be displayed by using an option called obs imagine for the next program g right now what happened this program 20 i increased it that's fine for next program i don't know how many observations to be increased so if i want to read the maximum observation from the data how we do very simple uh automatically to read the maximum observations you write it an option called max so that means what happened you are telling a sas to read how many observations you have it in the data set let it print all the observations as it is without any truncations now you see all the observations will be get displayed so right now if it is a 30 then all the 30 will be displayed if it is 100 then all the 100 observations will be get displayed so there is no limitations in that so you return obs equal to max default first obvious is option will work first obvious equal to 1 onwards it will take the data suppose if i'm writing an option called first obs equal to if i write it i'm writing an option called 2 yes i have 19 records i know that but i'm writing first obs equal to 2 when i start writing it from here execute it now you can see that you can see only the 18 records to be displayed so starting from 2 onwards remaining 19 that means in your log also it will give only the 18 observations will be get printed by default if you are using an option called options first obvious equal to 2 so starting observation is 2 and if i am writing an option called obs equal to 20 so that up to 20 records or 2 onwards up to 20 records it will read it is not for only one programmer so throughout your session running how many programs you are executing always it will read the data from the second onwards up to uh 23 cards only so that means once you activate it these options will be continued for your next programs also so that is your global options for first obs and obvious concept if my terror i will not attach this for a while so i'll just remove it and tomorrow i'm going to explain that one and as well as a replace option also these two things and again line size you already know that you can increase the line size up to 26 characters long yes i can do it and missing equal to dot what is this missing equal to imagine in your data there are some numerical missing value in my data set you see there is a numerical missing value imagine yes there is no data for it so that's the reason why it's amazing execute the program and run it now by default what happened you just go there and check your data so [Music] the first obs should be active now you have three records in my huh so now you see that so pid name and age-wise and yes wise we have a missing value it's a numerical missing value so but even though it is a numerical missing value client is interested to see it as a blank not as a character not as a period sign so how we can make it this one as a blank instead of just period so by just using an option here saying it options options so you write it missing valid name you remove it because we are not using missing i'm just writing it equal to what you want i want to make it blank then write it blank and execute it just write double quotations is enough automatically the character missing value in your data will appear in the form of blank instead of just period it is just appearing as a blank apart from that zero to nine characters any character you can write it suppose you are interested to display it as if it is missing i want to make it as a zero then write it options missing it's a zero then now you can see that in your output window it will be displayed in the form of zero instead of just missing right by using this particular option statement what we can do is we can just fill the numerical missing value as a represent to a character missing so how it is a character missing as we know character missing value always indicated as a blank and numeric missing value always indicated as a period right so this is the options options line size you have missing you have no notes no source so by default what happen you know every time the log will go log will give you some messages like you see some blue colors and black colors you are getting it i interested so when i'm just executing this program not to display any of the log information to be printed then you write an option options if you write it no notes and no source so that means i'm telling my sas not to print any notes and source messages in my log so now onwards you just see activated so now let me just clear it once i have already activated if you execute this program again one more time or else not only that any program you executed log will not give any message as a blue color and black color because we said clearly not to display any notes and source so now the question is neither is it errors also going to be stopped like that no errors and warning messages still will be displayed suppose imagine i forget to write a semicolon here and execute the program and run it now now i will go and check it so the errors is displaying it in your log there is no doubt errors and warnings will be displayed only notes and source message you are not interested to display it then you can write an option called options no notes and no source yes it will work and apart from that so you're writing it options no notes and no source so number as you already know them know that so page numbers default it will be displayed if you don't want that particular page numbers to be displayed then you write an option called no number obs equal to max means you never know how many observations in my next upcoming data set but still i want to read all the observations in my data then you write an option called obs equal to max and page number equal to one you see that i'm nearly at page number somewhere page number at 43 right now but i just client requirement is can we make it every time when it's printing this particular data make it as a page number one every time yes i can make it you write it phase number equal to right so page number equal to how much you want it the page number i want to write it as a one for this particular output to be printed so now you run the program and execute it so i'm just executing it somewhere it's going wrong okay so i have to fix this issue also because earlier we got an error so now i'm running it so now you can see that the page number will be displayed it's a page number one that means we can reset the page numbers if required from now onwards you execute any program it should be continued from one two three four five six seven eight nine so like that it will be continued for the next so that is your page numbers and we are coming to here so obvious equal page number you are writing it page size so page size you are making it as a up to 78 characters long or something like that so you can make it so page size the value is up to 78 characters you can make it right that you already seen options source if you write it you don't want system source to be displayed and you write an option called no source and one more i think you used it ear cutoff options air cut off equal to 1900 you used earlier when you are working with your uh date and date formats so from once you activate options here cut off equal to 1920 so that from there onwards all the two digits here will be displayed up to 100 years of span as a suppose imagine you have 88 so 1988 it will be displayed as a two digits of your year automatically read it as a um general four digit of year because if you are using an option called options ear cutoff so even that also we have seen once you activated a top that will be continued for your next programs also because it's a global option so these are all the options you need to remember so it's a global options what we have in our sas so now you know that how to give a title so if you want to give a title and footnotes yes you can give it if you want to make your variables in a capsulator just you write an option called caps if you want to display the results in the center of the page by default it's a center if you don't want it you write it options no center the date will be displayed by default if you don't want the date to be displayed in your output window then you write an option called no date so default all the errors will be displayed even for thousand errors also but if you don't want it only the first 20 errors if you want to see that then you need to write an option called errors equal to 20 and first will be a sql option so by default it will be starting from one only you don't need to tell that but if you want to read the observation from your data set from the fifth observation or 20th observation onwards then you use an option called first obvious option line size option if you want to increase the space in a horizontal way for output to be printed in your output window in a proper way then you use an option called line size and missing option if the numeric value default it will be displayed in the form of a dot that is your period sign if you don't want that to be happen you want to make it make sure to display the information in the form of blank then we can use it an option called line size sorry missing and no notes so default nodes and source will be displayed if you don't want the nodes to be displayed then you write an option called no notes so no source if you don't want source also to be displayed and number so default the page number will be displayed if you don't want the page number to be displayed anymore then write an option called no number obs equal to max when you don't know how many observations is going to read it into your size you want to read all the maximum observations by default it's a max only if you activate it with some rbs equal to 20 or obs equal to 30 like that if you want to deactivate those particular options either you can close the sas station or else you can just use this particular obs equal to max it automatically read the value so page numbers you can reset the page numbers how you want it so imagine while executing your program you are at page number 30th or 50th page but still you are interested to continue your programs to be displayed from the page number one onwards then you can write it page number equal to one so that it will be continued page size by default if you want to increase the observations number of lines per page if you want to display up to 300 or 400 you want to print it per page then you can write an option called page size source so as you already know that no notes no source so automatically the source message will go off if you want my next program to have my notes and source again you write it options notes and source instead of writing no notes no source you remove the no from the data automatically issue will be fixed and apart from that ear cutoff so if you have a two digits of your ear if you want to read it as a four digits then you write an option called options here cut off it will read everything and apart from that i have active i have explained one more option that is options valid where name equal to up case so that everything will be displayed in the form of uppercases of your data so this is all about your global options what we have in our sas for a two days concept right so in the last class we just learned about what are the global options so what we have in a sas we just discussed and now we'll just move on to another concept in the same folder that is called proc format so what is this particular frock format and how it will be useful let me just open my sas first as we already know that we know uh in format and format so informate statement converts a date values and as well as numerical values time values so it will read but this one is a converting a and numeric to character character to numeric and character numeric to numeric and character to character so we can able to convert data by using this particular proc format so let me just explain so that now you'll get an understand imagine there are some situations so mostly we will get a data from the client like this let's see data your data set name lab and input statement pid and age and race and sex is the variable and card says statement you are trying to create a new data set name with the name of lab so now you are just creating it so now you just go there and go to libraries and work library so the data set lab is got created now you can see that it's a pi device age and race and sex is the variable just got created so imagine this data set directly you got it from the client but unfortunately you carefully see um patient id and yes there is no problem but the race is the variable so there we have values in a numerical value like a 1 2 7 3 8 and 88 and 77 all you will get it as a race we are coming to the sexer so sexy we have it one two two two two two one two two and all you will get it so what does this mean actually i'm expecting a character value here raised like a black american initiations and all we are coming to the success i'm expecting as a male female and all unfortunately so this is the numerics we got it directly from the client so now client is saying convert this particular race and sex variable to be a character how we do yes if you have a chance to edit your program then we can edit your program sex and well make it dollar sign again raise also i'll make it dollar sign then i'll just update the values accordingly imagine unfortunately we don't have the chance to edit the program we have only data set really so how we are going to apply or else how we are going to convert this particular value into a character format so then this particular proc format come into picture by using a proc format what we can do is we can convert a numerical value into character let's say i have a data with me so proc format and value naidu i'm just giving it what is this naido actually you see in our real time so uh when you are applying a data as a ddmy by 10 dot mmddy by 10 dot and all so those are also format names which are created by sas default we don't need to worry about it as default we have some formats so that whenever we are applying that particular formats to the numbers automatically the numbers will be get converted into a data that's we have already seen so now what we are doing you know we are trying to create a user defined formats in sas so that no whenever we call that particular value so automatically so this should be applied so that's what we are expecting so for that we are writing proc format and don't expect the data equal to or all so proc format doesn't have data equal to statement just write it proc format and semicolon and value and you're writing the value name anything you can write it it must be a character or underscore anything is fine but the only limitation is the end value that means the name should not end with any numerical value at last here so neither one is not accepted name so definitely it should not end with any numerical value so let it be i'm giving a format name as an ido so then i'm just applying my format one quotes for caucasian two codes for black and three codes for asians and seven code for native americans eight code for pacific calendar 77 code for unknown and 88 code for other how would i know that one codes for caucasian two codes for black and all so client will give some specifications to me so based on that specification so we will get this information how client will get that specification so you just see in your real time data go to google drive my drive says sash tutorial project documents crf you're just seeing see the crf information so it's already there so race wise one for american indian rls canadian and native persons so this is the information when we are taking uh information from the patient we will give this particular a paper to them so that so this paper will be filled the patient is belongs to asian then we will take mark the asian like that number of patients right around 200 patients all the 200 patients wise we will have a number like 1 2 3 4 or 5 or six or 99 or something like that you will get it so one code for american two codes for asians and all by seeing the craft itself client will get to know that what to specify and he'll forward that particular specification document to us we need to follow the same again here sex y is also you see one and two one quotes for male and two codes for female so you can able to get it here so now i'm just writing it so one code for caucasian two codes for black and three variations and seven for america native americans and pacific islanders unknown and 88 equal to others and value you're writing one equal to male and two equal to female i'm executing the program and on it now that's it we've done so after ex uh after creating this particular program what happens you know the format catalog will be get created in general whenever you run any program what happened default data set will be created into work library by using a proc format what happened you know the format catalog will be created you open the catalog and now you can see that so this is the catalog information how it looks like so the format name what you have given is naido so the length is up to 16 characters you have given so there is a max in your data number of values how many values you have given so around 7 values you have mentioned so the minimum value length is 1 what you specified the maximum value length is 40 you can write it so that's the default and the default length also it is going to be 16 that you have already used it and so here you can see that um start and end so you can see that what is start and what is the end start is nothing but right now you don't know that this one so in upcoming programs in the same class itself i will explain what what exactly the difference right now what happens you know start value and the end value both also same but when we are doing a grouping we will see what is the start value and what is the end value and one codes per caucasian two codes for black and three for asian seven for native americans eight for pacific island 77 for unknown and then other so you're just mentioning it here the catalog it just got created now i'm trying to create one more catalog also so that is for your value sex wise you are just creating it that means value s one for male and two for female as we need to specify i'm writing that also continuous manner or else i can write a separate format for it so i can write it like this so after semicolon i'm writing a run statement and and again i can write it proc format and semicolon i can write it as a two formats but in real time also what we do is we always write one format only within one format so mostly we write it whatever the formats are required so one is an ido format another format is value yes is the format we are trying to create it now you check it and run it so the two formats will be created but the format catalog is so you just come back the format catalogs are only one thing within that you can see again an id is one format yes is one format you have created two formats okay you have created the format then what is the use then how you are going to apply that to your data set so let's see if i'm trying to run this particular proc print data equal to lab and run and execute default it will show the numbers so instead of the numbers i'm interested to display that value with the original values then i'm writing here saying it format for race i want to apply the format as an ido dot sex is the format which is already there i'm writing s dot why to write the dots here as we already know that ddm yy10 dot mmddy by 10.9 dot and all whenever you want to apply any format to a variable the dot is must so i'm writing it a format raise with naidu dot sex with s dot i'm writing it so now what happened while displaying the values in your output window you can see that all the values you just got converted into a character format of your caucasian black native americans yes in specific calendars unknown another and all you'll get it any questions until here applying a numerical value into a character so applying a that means converting a numerical value into character any questions from anyone deepak karna no no for the pro format we don't need to put it the data set name no in the proc format data set name is doesn't require many so it is just like a imagine imagine so you are constructing a building it's in a duplex or villa no matter it is a brick that's how you want to use it maybe you will use this brick in your duplex house to construct it or maybe you can use this brick for your apartment so no matter it is just like a just a building block the first one i can say you can use it only for not only for this program any program whichever is applicable you can use there also it is not mandatory but definitely how to use it in the lab data set only once you have created a proc format and you can once it's created here that means you can use it for other purposes also in real time what happens you know we i just created here just imagine so maybe the same formats is required for you also at some point of time so then you want to use this particular same formats in your programs too so what you can do is you can directly use this particular programs you just take this particular no i understand what you did in the like how you converted to numeric to a character it's my just for my clear concept like uh because then how uh says wheel knows that it will convert it to the last updated um what is called the program you run so it will changing in that last updated update in the sense what you are expecting last update means what is that uh i don't know is am i saying the right way no my question is uh like you wrote it down the proc format and then you given the like a number and you're given the name like what i want to change but my question is is if there is some other program also the same thing one is equal to this this this so but here is i didn't declare the uh data set name you said there is no problem so my i understood so in that case what we do is suppose imagine if they are trying to create again values equal to yes it will be a problem suppose if they are creating value with another name if they specify and there you are there they're specifying as a one equal to male and two equal to female no matter it won't overwrite if we execute it run it now you will have one more format created so that no it won't overwrite off your essay anymore oh okay thank you i got it yeah so you can create it number of this uh like this but imagine if they have written yes again okay just imagine i'm writing a format yes again and execute it and run it so go to the log so it will show that yes is already in the library of work dot formats still it will out it will overwrite but at least it will give a note message it's already overwritten is it okay yeah yeah i got it now yep so now you are just applying this particular format and run this yes you applied so how to apply very simple right format for race what format you want to apply like our ddm by way format how you apply is the same so date nine dot so naidu dot and again sex also i'm just applying it sex dot so finally what you have done is converting a a numerical value into a character in your output window so why i'm saying it in your output window only you just go there check your data set of your work library containing lab data set open it it's a still number because the format what you applied it is only for your output window only will get active so for a while you can't use it in a data step so that we will see in upcoming class day eight and nine so but here you try to remember one thing we can apply this particular formats only for your output purpose only we can't save this information into your data sets all right so now i'll go for another example there are some situation to convert a character to character conversion actually what is the purpose of character to character conversion which situation we all say let's say data mat is your data set name input statement pid center drug is a variable causes statement so 14 names a and 17 care b and 19 kim's c and 30 apollo d and all i'm just writing it executing the program and run it now what happened a b c d we have a drug names so what a drug codes were what is b codes for what is c codes for what is the quotes for i don't know so once client has revealed yes a drug is quotes for i'll screen 300 mg beater gives codes for unscrewing 150 mg silver gives quotes for ice cream 75 mj and they drag his codes yes you can write it so what we do is here we will see proc format with semicolon a value and i have to mention the dollar sign here so earlier why i'm not mentioning a dollars and why now i need to mention the dallas and so earlier the problem is it's just converting a numeric to numerical so dollar sign is definitely not required but when you are dealing with a character to character or character to numeric definitely the dollar sign is required because we are dealing with a variable of character so that the dollar is required but even though the dollar where i'm just writing it should be before of my format name see generally dollar sign we always write it in the input statement after your variable name but here when you are writing a dollar sign you need to make sure to write it after my sorry before my uh dose format and one more thing the most of the student do the mistake here they try to put the semicolon after the value created so which is wrong so you need to make sure after the proc format onwards value onwards up to until this particular before run statement all are comes under single statement only so don't write any semicolons in the middle so quotations yeah i'm writing alex 300 mg quotations with ba with all screen 150 mg and c and d also i'm writing it yes i'm trying to create a format name so let me just go there go to format yes the dos is the format got created now you can see that so a b c d a codes for b codes for c codes for d codes for everything is ready with us now i'm writing it so proc print data equal to your data set name med format drag with the dollar with dose dot format i'm writing it when you are applying a format called dose dart so now you can see the drag rs giving 300 mg i'll screen 150 mm 75 mg andromeda 5mg you'll get it is it clear any questions drug is a variable you are applying with a dose dot so that once you apply that and finally it will get converted into a character value so instead of a b c d you will see i'll screen 300 mg on the screen 150 mg i'll screen 75 mg and ram apple 5 mg you'll get it right so this is how you are going to convert a character to character and now how to convert a character to numeric in which situation we do this so imagine i have a data with me data labs is my data set name input pid is in pulse client has given wherever the missing value the missing value instead of putting just dot the client is specified as a null okay so now if i run the program what happened so if i want to do the average of my pulse if i want to take it okay so just go to my labs data set if i want to take an average of my pulse it won't work why the average will not work here because it's a character data so character values we cannot able to sum or multiply or divided or else average it's not working so that's the default if you want to take an average so you need to make sure to convert this particular variable into numerical then only we can do sum or mean or anything is possible so how we are going to convert a a character value of your pulse into numeric very simple if you remove that particular null signs so that will solve the issue to get remove that particular null science what we do is we are writing a format so proc format value dollar with ja quotations with null because this null is matching as it is you are writing it suppose null imagine if it is a small letter while you are applying it if you are writing a capsulator so then don't expect this null to be converted into zero zero so you have to make sure to give the same for like a format and everything should be the same null it's a small letter of n then make it a small letter of your n then followed by zero zero point zero i'm just giving it let's see i'm trying to create a format as a je and i'm just mentioning a dollar sign also as i already know that it's in a character to character to numeric conversion so definitely i need to mention the dollar so proc print data equal to data set name labs and format pulse dollar with je dot format i'm just using it once you are applying this particular je dot format to my pulse now you can see that the pulse variable appearing just like a numerics can you just see 908 and all the values whatever you are just specifying it you are getting that value here and the problem is client is expecting instead of zero zero zero zero point zero client is expecting to put a single zero so what i'll do is i'll update my format instead of zero zero point zero i'll make it single zero whenever you have an l value i want to make it zero because of this let's see what happened and execute the program what happen when you are applying this particular format with a single digit number automatically it leads to a truncation in your data and finally all the single digits you can able to see in your pulse which is not correct so why it happens the default length what you have given to your format when you are applying it the default length is 1 for this particular value the one length will be applied for this also now the issue is no let it only have this particular value to be 0 but remaining values would be i'm expecting as a 68.8 and 89.7 and all i'm expecting so to do that i need to specify a format so length you have to specify how many digits you have specified roughly i specify five digits as i said we should not use any numerical values after my format name that still agree but that is only for while creating a format you should not use it but while applying it yes you can definitely use it how much length or else you wanted to apply that variable i'm giving up to five digits length so now instead of just taking in a single digit now you can see that all with the 998.7 and all but wherever the values with the missing so those values with zero and it will appear instead of zero zero point zero and remaining all the values is same so by using this particular length up to five dot or seven dot or six dot actually in my in my proc format while creating it it won't be there but later on you can use it by just mentioning a number automatically i can increase the number uh length so that i can use it whenever it's required can i just see that so all the values with missing values is just filled with zero i hope everyone able to follow me anyone have any questions here or here what does mean for that uh dollar ge is that the given name you given huh je is the format i have created otherwise you do one thing no okay so you just write it is r okay i got it thank you right so you just write it isr here also okay that's fine so any name it should be a valid sas name that's it valid format name now there are certain situations converting a numeric value into con numerics how to convert a numeric value into numerics you can do this by using proc format so data vital is your data set name input pid visit one and dose and card statement you are trying to create a new data set name vital so now my interest is if you find one make it as a 0.6 dose if it is a 2 then 0.8 if it is a three zero point five so that means each patient wise we are just giving some doses like a first dose second dose and third dose the first dose value is zero point six mg second dose is going to be zero point eight mga third dose to that patient if we receive it's a 0.5 mg or something like that we are writing it proc format value dos is the format and guys you see here again the dollar sign is not there because we are dealing with the numeric to numeric conversion or else numeric to character conversion definitely the dialer is not required when the dollar is required whenever you have to convert a character to character or character to numeric the dollar is required so now so those with 1.601.06 format i'm just writing it so two with the zero point eight and three with the so zero point five and all you're writing it executed the format it just got created and now go there go to formats and so those is the format just got created one with zero point six and two with zero point eight and three with zero point five so you're writing it so procreate data equal to you're writing it your data set name the format you are applying as a dose dot so automatically what happen the values instead of just one two three you will have the values as a 0.6 0.8 and 0.6 and 0.5 and 0.6 and 0.5 and all so this is how we can convert a numeric to character character to numeric and character to character and numeric to numeric yes we can done so with this particular applying formats let's see i'm trying to create another format values rock format value num i'm writing f equal to 1 and m equal to i'm writing to what happened i'm just creating a new format as a num i'm just keeping that format with me just go to there so go to your work library format so now is the format you created f and m and all yeah it's there with us now i'm creating one more format also proc format value fgh is another format if you find the value as a 63.5 at somewhere make it as a 77.0 i'm writing it yes i'm just doing it so another format i created one one that is called fgh now what happened you know so default or here in your proc prints tab rock print data equal to self dot class when while i'm printing it so it will print all the information what is there in this particular data set around 19 observations containing a data with us it is just getting printed so the sex variable wise mail information female male female male female male female and all the data you will get it if you want to make male okay i want to make this particular male as a one and female as a two or something like that i want to apply so what i can do is simply just writing it format so sex with num format i'm writing it when i'm trying to apply sex with num format let's see i'm expecting to have the values as a one and two instead of male and female but you see still it is m and f only do you know the reason is there any error there is no error but still what happened the output you're not getting updating with the one and two so what is the mistake you think that you have done here till it capital m and capital f are there exactly you're right so it should be a case sensitive as i said earlier so while applying the format you need to make sure this mf should be capsulated because in my data when it matches it should be capsulator so you have to make sure to convert this value into a capsulator then you can create the new ones and then you apply it then you can able to get it the value can you see that it's still not converted right why it's not converted that is it off you should m equal to one i think you have ah so make it m equal to one and f equal to two i'm creating it now i'm just writing for sex variable i'm applying a format is it converting it now fine instead of male female you're just displaying it as a one and two that's fine i have a 63.5 here i want to make it 77.0 can we do yes definitely we can do so what do you do write it for height variable h e i g h t right variable i want to apply the format f g h format i want to write it that's it automatically see 77.0 you got it instead of 63.5 so like that you can apply the formats in a default and one more in a olden days that means in 9.2 or 9.0 and other software so you try to open this particular uh what i can say so for catalogs it used to give an error so that time we can't able to open it but 9.3 and 9.4 they have allowed us so that we can directly open the data open this particular catalogs and you can see the information but in olden days it won't happens like that so then how they use opening this particular formats in those uh that time by using a statement called fmt lib so what is fmt lib will do this all the catalogs you want to open it as it's not allowing you to open then you write it proc format fmt label and execute it will print all the formats which is there in your work library it will be displayed in your output window can you just see see the first format second format all the formats what i have created in my work library you can able to print all the formats in my output window by just writing an option called fmt label so that's default and one more so while creating your formats what happened you know so default formats will be get saved into my work library so if i close my session today and open again the work library containing the data will go off so tomorrow the log folder is empty then how you are going to store this particular formats in a permanent library so that you can re-utilize whenever it's required so if you want to store these formats in permanent library so you have to make sure to write a statement called while creating a format itself l i b r a r y library equal to it just mentioned which library you are interested to store these particular formats let me just go for choosing the library whatever the libraries we have it i think i have a kalpana data library does not exist is there any other library data x this is also not exist because i have deleted [Music] my pros deleted um i'll go for sas user so let me just uh there is no formats created earlier so i'll try to save this particular library into this format into sas user i'm writing says user i'm writing it and this is one format i'm trying to save another format which is already there the fgh format also i want to save it yes i'm just saving it and execute the program the formats will be get created into the sas user library one is fgh and num format what i will do is right now as i have saved into a different destination i'll try to remove it from the work library so work library formats one is num format second one is fgh format just delete these two formats yes so now what happened i created the format i saved into the sas user that's permanent so there is no chance of deleting this particular formats again so if i want to apply this particular format so nothing but num format and fgh format to my data and run it so it leads to an error message saying it so the format num was not found or could not be loaded so may know the reason what happened exactly why the format is not recognizing it as i have said i said that i have saved into my sas user library why the format is not collecting uh recollecting where it is located the default issue is always work library is the default automatically whenever you are applying a format sas will always think to bring the format from the work library only in this case as we know the format is saved in the sas user then if i'm interested to save this particular format here okay so that means if you want to apply that particular format then you can write it saying it options before that what i'll write it is so i'm thinking that i'm just imagine i written this program and i left the organization i left from the organization someone else is taking my work when they are just running the program suddenly this they got this message so they think that so let it this error to be minimized that's okay so if the format is not applied means it won't happen a big issues so let's see at least the program need to work smooth that's what their interest is because they want to see that is the program is working smooth or not so to do that so to skip this particular error what they have written is options no f m t e r r so what is that options no fmt error so right now the format is not there so that's the reason why it is related to format error you are suppressing not to give any format error once you execute it and run the program go to the log message log is not giving any error now it is just giving the output but unfortunately output you will not see any difference it's the same output like earlier but the thing is at least the error is gone so that now you can see the smooth execution of the program then you realized later on yes the male and female to be converted as a one and two that is not happening so then you'll come to your program again then what is the issue you will see so options no fmt error is really not solving our issue if you want to solve or else you need to tell to the size this particular formats available in this particular library you have to mention a statement saying it options f m t s e a r c h equal to that means format search equal to your data in which library the formats are available then only sas can recognize okay the formats are available in sas user so i'm writing it says user here and execute it so now you will not see that c automatically converted into 1 and 2 1 and 2. earlier we have m and f still the reason behind that is it is because of um fmt search option uh sorry because of default it is just not there in work library but now what happen if the format is available in work library it will take it from there if it is not available then it will search it in the sas user suppose imagine you are writing thousand lines of code few formats available in your sas user few formats available in work library few formats available in some something else library so then what you have to do if you want to mention all the library names side by side you just write it like this okay gg is one library name another library which we have it and there we you think that some of the formats are stored in this library yes you can write a multiple library just giving a space and execute the program then automatically the library is containing formats will be get read it into sas environment by default right so this is about a format search option fmt search so no fmt error and fmt search this is how you can store the data in a permanent and how you can call it and apart from that um as of now i just created the format right so now i'm interested all these formats imagine all these formats i want to make it as a sas data set so how to convert a format catalogs as data sets if you do that if you want then what you do is write proc format okay then c n t l o u t that means cndl out equal to you try to create a new data set name so that what happen all the formats from your work library will be get stored as a a new data set name so now go there a new data set is got created with the name of jj can i just see all the formats what you have created in your work library will be get stored as a sas data set can i just see this right so it's happening but unfortunately sometimes what happens you know we don't want all the formats as a data set we need only the specified formats then what you can do is you can write an option called select within a select you can write it what formats you are interested to store it as a data set i am interested do to be stored then just write it and i don't and another one is x form it to be stored so then i need to make sure to write a dollar sign with x because it's successful here i have written as a character format i'm just storing only these two execute the program log also it is just executed and without any errors go to my jj data set i can see only the two formats but why the x format is not getting out outputting it let me just go with then go there and check it x is just x only there is no dollar sign for the x so what you do is you just remove the dollar sign to the x and execute the program now so that formats get created i think go to jj yes x format also created and y format also got created so this is how we can transfer uh the formats from one place to another place either you can send this particular program what you have written to your colleague or else you can send this particular data set to him so that he can just use this particular format imagine you send this particular data to the someone in this class just imagine you send this particular i sent this particular information to the bubbin so how the bavin is going to use this particular formats imagine so bobbin have only let me delete every format from here says user also some formats right so delete all the formats there is no format active now if this is the bavin's pc imagine how the bavin is going to be uh use this particular format to load the formats again so how to convert data set into formats again now we have done by using a cntl out option you converted a formatted into a data set that's fine how to convert a data set into a format very simple you just write an option called proc means procedure i'm just writing it here and there i'm just writing it format i'm writing it so you write an option called cntl in equal to you read that format so that is your jj and run that's it so now what happened the jj data set will be loaded with all the formats now go there work library you will see some formats again back naidu is in x formats is the two formats we have it in the jj data set it just got loaded so cntl out option to store the format catalog as as data set if you want to restore back you need to use an option proc format cntl in with jj you're writing it and we use an option called proc format fmt lib you're writing it and that you already know and one more option you're writing it grouping so how to group the data so when you are trying to group it you see proc format value with exo low with 11 i'm making it as a n 12 with 15 i want to make it as old other equal to i'm writing x so proc format value x low with 11 as a younger group total with 15 i'm just writing as a older group and other equal to x what i'm just doing it here i'm just grouping it what i'm grouping 0 to 11 years any people in my data i want to make it those people as a young 12 to 15 is there any people in my data i want to make it those people as a world rest all that means other means accept this particular two groups so rest all the people is comes under your ex only i'm just executing it and run it now as i said earlier so start and end points i will explain in later program so this is the exactly the program how the format you can see i just created a format where it will store go to options first of all any error no error i just created a format to go to work library formats so we have it what is the format i created here so the format name is excel you just open the excel you can see that start and end is different so start is starting with low and the end limit is 11 again for the next one starting with 12 ending with 15 that means the start limit and end limit you can see while doing a group so 1 to low to 11 is a ang 12 to 15 i want to make it as old and other i want to make it as x so now you're just doing it the same thing and i'm applying the same format for ease-wise so i'm writing it here as x execute the program and run it now now you can see that all are so two persons are young because two 11 years has group persons in my data yes i know that from 12 to 15 all are old i got it but only one person is comes under x because the person with 16 years old so automatically ill comes under other so it is just x now the basis certification question on this asking it like if the person with 11.5 years where he'll fall imagine if the person with 11.5 years where he'll fall the person is young no i didn't get you if the person is with 11.5 years is still young you are expecting yeah it's other right it should be other right because low to 11 only we said to anger if it is 11.5 or any other categories it comes under other only it won't consider into the end if the person with 12 15 only hold if the person with uh imagine 15.5 where he'll fall is comes under other only right oh okay yeah execute it and run so that's it you got it right so this is all about your proc format what we have in our sas converting a numeric to numeric and numeric to character character character and character to numeric and apart from that you are applying some formats and you are storing that format you are printing the formats and converting a format into a catalog data set data set into a format and converting creating a groups and all we can do with this particular proc formats anyone have any question on this particular class right so in this uh today's class what we are going to learn is so how we are going to use a set concept that means slay so we just done with uh up to day four and so now we will move on to the day five so here we have some concepts called set options and as well as data set options so let me just explain the data set options what we have in our sas today one by one as of now we have learned some options so those are all comes under your global options we can write it anywhere in the sas environment and now we are writing an option so that is your setup since we we write immediately to the set concept so that means immediately after your data set name whenever you write it you write these options so let me just explain that let me open my software yes so data set options so you see here i have a data set with me so data try 3 is my data set there we have input pid is and name and center area is the variable and corsair statement you are trying to create a new data set name with the name of trial name and execute the program so that there is nothing special the trial 3 data set will be get printed in your output window and now we are writing data so another program saying it the same data set name like a data trial three only here also so input pid and age and card statement so in this case what happened you are also creating a new data set name trial 3 which is already there with the name of trial 3 so once you run this particular program what happened the whole data of your five variables for observation containing a data is going to be overwritten with two variables and two observations containing area so once you execute it that will happen that's the default it automatically you will have only two observations and two variables containing a data you just go there and go to libraries and work library only one data set only the new one will be there the old one is just overwritten so actually this is called accidental data loss sometimes we never know the data set name is already exist with the same name our different name and all when you execute it default it automatically overwrites the world value so if you think that so you don't want that to be happen how you can able to prevent this whether no matter whether you have used this particular data set name earlier maybe the data set is already available or not i'm not sure but still i'm interested not to overwrite the existing data set so how we are going to overcome the situation so let me just run a new data set with the name of trial 3 so trial 3 dataset with all the values like pidas and name and center area is the variable it's get created that's fine now i'm writing it what i'm writing you know so the same thing like this one also data trial 3 instead of writing the same name and write the same name butter you just mention something in the brackets after immediately your name so write it as a replace so within a replace option equal to no if you write it so what is the replace equal to no so now if i try to execute the new program of trial 3 and run it so now you go there and check it and the log there will be a message as a warning saying it data work.trial 3 was not replaced because of no replace option so that means so that means what is that the trial 3 data set is already exist so that it won't replace or anything so that you go there and check your try three datas that still you have five variables for observations containing a trial three data set with us without any issue right so pid is and the name and center area is the variables you are just getting it and all the values are ready so that's fine and now i'm writing data right three and replace equal to no so what happened in this case the old data set will be as it is so that where the new data set is getting created actually new dataset won't be created anywhere it is just stuck with the uh execution of the program itself then you des you realize that after reading your log so there will be a data set which is already exist then you can rename the data set to something else maybe i'll rename to my data set as a 31 so then there is no problem something like that let's see and execute the program yes i'm getting that new data set values ready and it's printing in output window that means i can use a new dataset name as a 31 there is no doubt so that means so by default it automatically overrides the world one with a new one so you know if you don't want that to be happen you write an option called replace equal to no so this is comes under your data set options so what you have written here it's a replace equal to no not only the replace equal to no we can write something else also suppose if you want to provide some password to your data set so what is meant by password suppose when you are giving access this particular data to someone but let them access all the data sets which is there in the library what you have given but only few data sets you are interested not to see by them so then you can provide a password for that so that they can't open those data sets so if you you want to do that then you have to write a data trial three and within a bracket so you just write it password equal to what password you are giving it so right now i'll go for apple is a password name i'm just giving it input pid is name and center and all i'm just giving data so there is no doubt in that new data set will be get created so with the name of trial 3 let me just open uh create that new data set as a trial 3 you just try to open it even though to open this particular data set it will ask you to enter the password as we already know the password is apple let me write it apple and then i can able to see and i can able to watch and edit delete anything is possible to this data set i can do so that means you're just giving a password to your data set so that nobody can access this particular data set until unless you share the password now the question is naidu the program is already written here when we are sharing this particular code they'll get to know so very simple thing is when we are just providing a password to a data set make sure we will not provide that particular programs to them so that no they can't able to open anything in the inside of the data right so default we can give a password by using an option called password equal to option so that you can give it and another one is i'm just writing it here and data i'm creating a new data set name called clinical password equal to apple and read equal to orange i'm just giving it so what is the two passwords one password is for your admin password second password is your read password that means so you can't be able to do anything and except just watching the data inside of your data set if i enter through a password called orange i can just see the data that's it if i want to modify anything if i want to delete anything so i have to again login through apple password only let's see how this particular two level password uh is working we'll see one by one i'm trying to create a new data set name with the name of clinical but possibly called apple and really called orange you have written and execute the program i think we are done so let me just go to the new dataset called clinical you just to open it then it will ask me to enter the password so as we already know that we have two passwords so what i will do is let me try to play this particular password to delete the data sets so that no we get to know that whether it's really deleting or not i'm trying to delete this particular data set by just mentioning offer a password called orange because o-r-a-n-g orange password it's a read-only access password you can't able to delete or anything so i'm interested to delete the data set from this particular place it won't get deleted because so it's an orange password is a read-only access password suppose you do the same thing now but this time what we do is we try to enter the password called apple and execute the program see the data settings just got deleted so that means this is the two level of password one is the read password and second one is the right password so which one you use it to just open the data or modify the data so will matters and this is just for applying a password for your data set and apart from that we can give observations also how many to be printed suppose you see in my data set we have already five observations so there is no doubt in that but i decided not to print all the observation only in fourth and fifth record i'm interested to print it then i'm writing proc print data equal to midi immediately after your dataset name you have to write first obvious and obs so guys don't confuse here first obs and obs will land as of now it's a third time the fourth first time we just learned within file statement when you are importing actional file into sas environment so there you can control it by using first obvious and obvious option and later on stages we used it in the global option as a first obs and obs but now we are using it in the dataset option also it's the first obs and obs so now interest i'm interested to display the information only first obvious equal to 8 and obs equal to 10 i need it sorry obvious equal to 5 i need it only that two records you can get it in your output window yes that's possible so these are all the options what i just discussed with you today so this is um comes under your data set options so not only the data set there are some options we write it in the a concept called set also so what is the set concept will do so as we know that if i want to copy one data set values to another data set either i can copy the program or else i can copy the data and paste it here but in sas you no need to do that so you just write a simple command to copy the values from one data set to another dataset so now you can see that the dataset name is lab data so input statement pid is a name and the center area is the variable and cards is a statement i'm trying to create a new data set name called lab data i'm not using any special functions or anything it's just normal data set to be printed yes it's printing so now what i'll do is i'll just copy this data to a new data set so but just imagine i know that lab data set have five variables and five observations containing a data with me but i want to copy the same information into the anthony so i can directly copy the program from there and then i can rename the seventh line to anthony or something like that so that i can create a new data set but unfortunately that is not correct in real time what we do is you have to copy the information from the data set only so the data anthony is there set lab data so set is the concept what it will do is it is just copying the information from that existing data set and creating a new data set so here anthony is the new data set you are creating it by using a set concept so once you execute it and run it now new data set will be get created with the name of anthony so you just go there and check it lab data set whatever the values you have it here the same information you can able to find out in anthony also so that means it is just copied as it is now so we are coming to here so data trial is my data set name set anthony i'm just writing a writing data so data trial so set anthony so proc print data equal to trial i'm writing it so executing the program what happened from the anthony if i want to create a new data set yes i can do it so now you see that uh new data city just got created with the name of trial so with anthony you just see new data cities just got created with the name of anthony so yeah i can able to do that and one more suppose if i want to drop a few variables while creating a data set will the original data set will get affected suppose imagine i have a data with anthony i want to copy all the information into the trial one but unfortunately i don't want the patient id and age so can be able to delete the patient id and age you execute the program and run it now so you see trial one so trial one so the patient id and age just got deleted it's not there with us so that means while copying the data set you can drop the variables also at the same time if you want only to keep these variables you just write it option saying it keep equal to pid and age execute the program and run it now so you are just keeping it keep means it will keep only the two variables drop means it will drop only that variable rest all you will get it so that's the difference between keep and drop yes we can do it while copying the information from one data set to another data set we can do there are certain cases what happens you know yes i want to copy the information from the anthony to the trial new but the limitation is here i want to rename the variable so while copying it so that means you just copy the information from anthony to trial note there is no doubt as it is it's copied but while copying it if you want to rename it just write it in a bracket so rename equal to make sure your rename statement should be in a bracket and equal to again you have to write a bracket what names you want to change it to what so pid i want to change it as a you subject id and yes i want to change it as a dm underscore age so in the rename statement always you write it the existing variable as a first then the renaming variable as an extra so pid is the existing variable you want to rename it together your subject id again name is uh what is that is the variable so it's there so dm underscore is the new data set a new variable you are creating it execute the program and run it now so this is how the output is looks like your subject id dm underscore is name center area is the variable yes it's got created so data trial new one is a new data set name set anthony where center equal to names what is that means suppose imagine in my data set of anthony there are many uh hospitals information is present available but while copying the data i don't want to copy all the hospitals information so i'm using a where condition by using a where i can filter what data i require suppose just imagine i'm interested to take the information from this data set only wherever the center values equal to nims only that data to be copied and execute the program and run it now so the data just got copied and now you can see that a is a name and center and area is the variable so it just got copied can i just see now right so this is a data trial new set anthony where center equal to so yes you can copy we're coming to here so data lab data is your data set name says help dot class so in my help.class i have 19 observations i already know that but i'm just copying it what i'm copying first obvious equal to two so default when i'm not giving anything default first obvious equal to one start reading it from the first observation onwards to a new data set but right now i specified first obvious equal to 2 so that you will get the information from the second observation onwards execute the program you can see 18 records in your output window because it starts reading from the second observation onwards until 19 so that 18 records only you can able to get it if i use an option called first obvious equal to two and this one in my lab data i don't know how many observations we have it the maximum chance of getting the observations is three only so you see data a set lab data obs equal to three that means i'm copying the information from the existing data set with the obvious equal to three means only first three records you are expecting you can't expect more than three records in this data set if i execute it right so lab data how many observations we have no matter but the final the maximum output that means maximum of the relationship will get it only three so you just go there the maximum observations you will get it only three because you are giving obs equal to three that means that is the end limit you are giving it so guys can you just uh tell about this one i have in my uh serp dot class data set available but first obviously equal to eight and obvious equal to ten how many records you are expecting in my lab data if i execute three right so eight nine and ten so three record you can expect so if i execute the program and run it now so you will get it three records eighth regard and 10th record and ninth record so you'll get it so in the data or else if i want to pick the observations randomly so what is the picking observations randomly so data shanta is your data set name set self.class if though if underscoring underscore equal to three then output if underscore and underscore equal to ten then output if underscore and underscore equal to fifteen then output what does that mean i'm just giving it a randomly picking up the observations as of now what happened you're copying the information from the top to bottom everywhere but i'm writing it so special conditions so saying it underscore and underscore means its observation number observation number three then i need output if observation number ten i need output observation number fifteen i need output from the self.class yes i can get it there is no doubt in that so that there will be a three observations in your data set one is from third record another one is from 10th record another one is from 15th record if you want to make sure to that particular value is correct or not so just go to your sas help and go to the data set called class you just open and compare i'll put these two data sets side by side so you see so the third record in my data barbara so that is correct and 10th record in my data john it's correct and 15th record in my data it's a filipino you are getting it so that means three so 3 10 and 15 record you are expecting from the data yes you can get it by using this particular concept and one more for your practice i can say so let's see in this particular data set what happen is data your new data set name you are creating as x input statement patient id is in gender you are trying to create it a new data set will be get created with the name of x now i'm trying to create another data set name with the name of y okay so x is one that is x is one data set and y is one data set i'm writing set x space y tell me how many observations you are expecting if i run the program so four are expecting four observations yes that's the right answer may know the four observations on the 420 male 200 or copy to nearly 101 2013 exactly so that all the records from the both data sets you will get it if i'm giving it like this so let me just execute it and run it all the four records you can get it but the problem is gender is present in the first data set but the gender information is not present in the second data set ultimately it leads to a missing value so sas won't think that it's a gender and success both also same variables or something like that this variable will be displayed separate and this variable is separate so this is your gender and this is your sex and now we have a success missing values in the first two records because the data you got it from the first data set so that's missing but sex variable is present in the data set it's present it's displaying like this so the matching is not sorry the setting is not a problem it's a properly set up so now i'm just doing a small change instead of writing set x set x space y i'll write it set x semicolon and again i'm writing set y what happen if i execute the program understand what i'm writing it so i'm writing it the set x semicolon with set y yeah clear four observations you expect ideas you got it but now how many you are expecting would it be two sorry so two observations how many variables first of all tell me how many variable variables you are expecting four variables can you just tell me the variable names pid is gender and six okay how many observations you are expecting tell me how many observations any clue okay so generally what happened you know you see this is uh how the observations you are getting it can you see now only two observations so what happened pid is and as well as sex from the second data set as it is without any change but gender i'll get it from the first data set because it's a pid is here and pid is here this pid values is going to be overwritten with the new pid values and age value here and edge value here so that age values is going to overwritten with the new values and gender is here but gender there is nothing to overwrite with here in the second data set so that the gender variable as it is with us and we are coming to the success the variable present in second data set but there is nothing to replace in the first data set that also would be will be with us so the total four variables and two observations containing a data will be get created if i use in a concept called set x semicolon with set y that means it just overwrites all the data from the set x by your set y so that means all the x data set is just overwritten with the set y data set so that finally you will have the values like this so this is all the options what we have created in today's class so this is all about data set options and as well as a setup sensor so what we have in our asses what we are using it in regularly hello everyone in uh today's class we are going to learn about how to import external files into sas environment and how we will play with it one by one we'll see so as we have already seen like importing of external data by using in file so we have seen so just importing like uh text files and csv files and one more dot dat file so we can able to import the external data into sas environment but imagine if you want to import uh excel files or csv files are also it's an ms office access files is there any other files if you are interested to import into sas environment so infile will not work so infile have limitations of only text files and csv file we can import it so if you want to import excel files so definitely you need to depend on your proc import processor so proc means it's a procedure import means you are extracting a you are importing external data into sas environment so this is a procedure method we are using to import actional data into sas environment so whereas coming to the info is a data step method to import actional data into sas environment so we will see some differences between your info and as well as proc import also first of all let me just open my sas software yes the software is just got open so what i will do is let me just open my program go to sas tutorial day 6 and 7 import and export i'm just using it yes so you can see it's in a proc means procedure import means i'm telling is us to import external data into sas environment so i'm just writing it at different files so excel file access file delimiter file csv file and tab file in the world each file has some extension so for just imagine if you are listening some good audio it may be dot mp3 is the extension or else you are watching some movie it may be dot mp4 you are looking into some images it may be jpg files like that in the its world so every file have some extensions in the computer world i can say so if it is an excel file the extension will be dot xls or xlsx so what is meant by extension let me just go to my desktop imagine i want to create an excel sheet on my computer i'll right click on it i'll go to the new and then i'll go to this particular uh microsoft excel workbook if you click on it then you can create an ms office excel sheet like this so this is called ms office excel you right click on it and go to the properties and go to the security and there you can see the file path is ending with the dot xlsx so this is the format for this particular excel not only this any file you open in this computer it may be audio file or video file let it be anything so it has some extensions as a dot xls is the extension or else if it is in a right now this version of ms office is the latest version so that's the reason why it is giving us the xlsx format in a olden days before your 2007 so in a world in days we can see um excel file it will be get saved with the name of xls actually right click on it and go to a properties and there you can see it is in xlsx format so if you want to save this particular xlsx format into xls you just open the file and go to file click on file save as and go to browse and then in the drop drop down just use xls 97 2003 and you're just saving to my desktop so now you just see there are two files one is xls file with the excel workbook that means it's a dot xlsx format and another file is with dot that is your 97 2003 format that is just xls format only you see it's a dot xls is this one but this file is xlsx you just go and see it so this is the difference between these two files this xls is a world format and xlsx is a new format why we are talking about these two it's because when you are seeing the compute here the extension excel extension it may be dot xls r dot xlsx also sometimes let it be no matter the two files also we can able to read into sas environment and apart from that i'm just writing an option here saying it dbms that means database management system i'm just using it as excel or it may be i need to use it as a xls or else maybe i need to use it as xlsx to import external data into sas environment so today we are going to learn only the excel file and remaining files we will see in upcoming class so today we will just go for excel file xlsx and xlsx format xl xls and xlsx and all the formats we will see one by one so what is the syntax how we can able to import actional data into sas environment so you just see i'm just writing some of the lines code i'm just commenting out so just don't worry about this particular green color so it just got commented even though this program is available here so it won't be again affect your output or anything that means you're just commenting these lines that means if you are commenting it or else you are removing this code it's the same meaning so there is no change in that so let me just explain in this way so that it it will be a bit clear to you so now what i'll do is i'll just go for proc means procedure import that means you are importing a data from your external source you are just using it the source so that means you have to tell to the sas where exactly the data is need to be read so when i'm saying something to be imported from your actual data so definitely the data should be located at somewhere so we need to copy that information so to get copy so you have to make sure to just go there go to that particular folder where that particular file is available go to my sas tutorial actually my excel file is available in day 6 and 7th folder so let me just go for day 6 and 7 so here there are a lot of files which is available so i want to find out only the excel files what i need to do is either i can directly select the excel file like this and then i can use it for as you are new to this pc so imagine what you can do is so you just click on type then it will ask you in different type of extensions what you want it so go for microsoft excel 97 2003 workbook if you select it then you will get these many excels within this i want to import the data from the my data one so you just open the excel sheet of my data one so there you can see the data so here one is with an ido and second one is with you is the two sheets we have it in this particular excel workbook so in the two sheets i'm interested to import the data from the first sheet you just see i'm interested to import the data from my first sheet so to do that what i'll do is i need to make sure right click on this particular file and go to the properties and go to the security and i'll make sure to copy the path of that file where it is get located so if you click on copy then click ok that means i just done copying a file so i'm just doing it one more time for you you just have a look so i'm writing it i'm just go to my data one right click on it go to the properties and go to the security and copy the path of the file where it is located so copy this particular path and click ok so that the path is just got copied so you have to write the program to import it how you have to start it you know it should be proc means procedure import means you are importing it data file equal to that means where that particular file is located so you are telling to the sas the file is located into this particular place so that is your c user desktops as tutorial day 6 and 7 mydata1.xls is the file which is located and don't write the semicolon immediately after your path so you have to make sure not to give any up semicolons or anything so you just write it like this and the statement should be continued into the next line or else you can do one thing you can write it like this also if it gives a easy to you or else maybe so if it is feels happy when you are writing it you can write it like this also so actually it is all comes under same statement only this single line of statement only proc import means you are importing your file data file equal to you mention the path so once that particular data just got imported into sas environment we have to make sure to give the data set name i'm just writing it my data set name as a build 3 and dbms equal to that means the database management system i have to mention the database management system what you are expecting so here as i said if it is an excel file the database management system you have to write it as a dbms equal to xls because it's an excel file i will not write replace for a while so that's it i'm thinking that i'm just done with my program and just writing a run statement to compile the program so i just used so what we have written here proc means it's a procedure import means you are telling a data to be imported from your external source once the data just got imported into sas environment you have to make sure to create the data set name the data set name i'm just writing it as a by using out statement you are creating it it's a bill 3 so dbms equal to you're writing an option called xls and run so once you run this particular program so don't expect any output to be created because so you run from see if i'm just selecting it from proc onwards up to run statement it's a proc step even though it is a proc step unfortunately it won't have any printing capability so once you run this particular program and execute so what happens you know so what happens you know it is just executing your program that's it so what happen it won't give any output to you if you think that that output to be printed then you have to make sure to write it proc means procedure print means you are printing it data equal to your bill 3 and run it now the data will be get imported and you can see that whatever that excel sheet containing information in our sas it just got important so what we do is we'll try to compare our results with mydata1 and i will compare these results with my data what i have just imported so that no it will be easy so you see put the two files side by side you see this in my first row we have a column names as a f code airport t date child adult e car f car is my column names in my excel you got the same can you see that and apart from that from here that means a i801600 onward so the data just got imported into sas environment how many records we have imported around 120 records it just got imported here can i just see how many records we have it in our excel let me just scroll down down d so now you can see that it's a 121 records so what is the difference why i'm getting 120 here in the program but why you are getting a 121 in your excel the reason behind that is default in your excel the first row will be considered as a variable name but in sas it won't consider that as observations that's the reason why the first row in your excel in your sas you just see it automatically converted as a variable name so when it is converted as a variable name so what i can say so only 120 records only you can expect so there is no wrong in that all the data just imported how many observations you have it in the excel it just got imported into sas environment is anyone have any question on this while importing your data into sas environment karna saif yes questions yeah naidu so in that exam we had two sheets uh naidu and also uu so we did not define or we did not give which excel sheet the data should be imported from how did that happen so actually by default it automatically takes the information from the first sheet meta that's the default you don't need to tell to the sas it will read only the first sheet information only right so if you don't want it okay you decided yes i imported the first sheet information that is no more required so then i will go for second sheet importation then you have to change something in your program to read the second sheet i'll tell you okay i'll tell you a statement called seat name statement so that if you give that it automatically just import the virtual whichever the sheet is required to you is it second third fourth that's up to you okay any questions okay so now what i will do is as you already seen right now once you execute it all the data is just imported into excel file it's everything is appearing everything is fine i'm trying to rerun the same program one more time yes i know that earlier it worked well but i'm just trying to run the same program one more time when i try to execute it then you will get up you will get an error message saying it import cancelled that means import is not done this time output data set work dot bill 3 is already exist specify the replace option what is this mean so what does this mean to you that means first of all import is cancelled you're right so import cancel first of all import not happens why it has not happens it is giving a reason the output data set work dot bill 3 work dot means in the work library you just go there what you have created here in the work library the bill tree is already exist yes sas is right the bill 3 data set is already exist here that's the reason why it is not creating it if it is created then what sas is saying specify the replace option to overwrite it understand so we have to make sure to overwrite okay the question is naidu as of now you said so whenever you creating any data set automatically the old one will be get overwritten with a new one suppose imagine i have written a data set with naido with two variables and two observations containing a data again i'm writing another data set name with the same name naido with 20 variables and 20 observations containing a data you select the program of both and run it and execute it the last submitted 20 variables and 20 observations containing a data with b will be with us the old one of your two variables and two observations containing data will be just overwritten so that's the default if you are using and if you are playing with a data step method but it's a procedure method so we processor method don't have any printing capability so definitely you cannot expect so that to be automatically overwrite so if you think that the data set should be overwritten so you have to make sure to write an option called a replace where you write replace immediately after your excel file you write or replace when you write in a replace and execute the program and run it now so that's it you're replacing it so now you can see that you won't see that message again one more time because it's gone see earlier we have an option called import cancelled and all but i removed it and i write an option called replace and execute it so the program is working fine there is no doubt in that there are other situations when the program will not work you know so let me just open my mydata1 file let it be in a open condition i am trying to execute the same program see even though i have written a replace option there is no doubt in that i am trying to import the data into sas environment and execute the program now you can see in your log saying it error file is in use the file is where it is in this particular file is already in open condition yes s is correct so now the file is in open condition so sas won't be able to read while importing a data from your excel so you have to make sure while writing a program the excel file should be in a closed condition close the condition in the sense it should not be open while importing it right so that's done so you just imported it so now it is just importing of this particular file that's fine imagine who said sas to read first observations as a variable names you see in my excel sheet there is my first row so in this first row it automatically reads first observation as a variable name imagine in my uu sheet if you just see in this excel sheet i don't have any first variable as a column names or anything in this case how it is going to be read it yes if i have a column names in my naidu data and i do sheet then first row will be default consider as a variable name even i2 don't have any issue let it be but in my second sheet i don't have any column names how i can tell to the sas to read this type of data no issue you don't need to change anything program the only one line of code you have to change it writing an option called sheet name equal to let me just bring sheet equal to which sheet information you are interested to import it you just mentioned the sheet name what you are i think you are asking this one right by default it will import the information from the first sheet if you don't want it i said you have to specify the sheet name so this is exactly that one sheet equal to tell that in a quotations you have to mention which sheet information you are interested to import it yes i said i need the information from uu sheet so then you have to write it a city called yoyo and execute the program and run it now so you have to again make sure to close this particular information yes so now what happened run the program so it just got imported there is no doubt in that automatically what happens you know in bill 3 data set you just open it but what we have let me just compare with results again with our excel so that no don't trust on your output whenever you execute any program just to compare these two files side by side so that you will get an understanding of what exactly going wrong as you see i don't have any variable names so automatically sas default it is picking up first observation as a variable name actually that is not correct let me just see ia one six one double zero yes i have a variable name for that so again cdz is a variable name it automatically converted as a row as a variable but you see this is a date actually as per our naming conventions as we know so we cannot write any dates or any special characters in your variable name so if you want to write this particular value as a variable name even sas also it is not possible that automatically sas will decide the column name as a c how it is c so sas default it is taking as a b and c it automatically taking another value here you can see in your data d d is a numerical value as we already know that even numerical value also we can't write it as a variable name so default sas will consider that as a what i can say says that we'll consider as a so d by default instead of just having your value as 8 or something like that again so you see e you'll get it understand so you are going to get so the value as e and f also and g also you are getting it f y and you are getting it these are all so it's not a numerical not a character value so definitely sas will read it in this way now i have a issue actually this is wrong what is wrong who said to read first observation as a variable name i'm not interested to read it first observation as a variable name so then i decided not to use this anymore so what i will do is i'll just go to another program saying it so here don't take first observation as a variable how i'm saying it get names equal to no when you write an option get names equal to no it won't take that particular option as a a variable name so it won't consider your first observation as a variable name anymore once you execute it or run the program that's it i'm expecting and why the particular program is not working it is showing file is in use you have to make sure to close this excel then only you have to import it again one more time yes i did it so now instead of having this particular column names observations as a variable names so as default it automatically gives my column names as a a b c d e f g when you write in a statement called get names equal to no so definitely it won't consider your first observation as a variable name but the problem is how sas will decide so which one to be take it as a variable name so that you will decide it so based on your column names like a b c d e f and all so the column names you are just specifying it here that's it and sometimes what we need it we need a data i don't want this particular excel sheet data from the first row onwards okay imagine in my sheet i don't want it to read the data from the first sheet then what i can do i can just write an option here so let's see in this excel i want to read the data from the third record onwards so third record in the sense you just go there and check your neither data set it third record is in that means i'm expecting the data to be read it from here so that means first to two records i am not interested to read it anyway the first very first observation will be read as a variable name and the second one will be skipped and third one onwards says if you are interested to read it then yes you can tell that by just mentioning an option here saying it data row equal to three and execute the same program you have to make sure to close the program and execute it and run it now that's it you just imported the data so now go there a work library in your bill 3 data set it just got imported as we know that earlier we have 120 records in our data set now let's see how many records we have only 119 only earlier it is a 121 121 y means it's in one is your variable name and second one is first record the two records are gone from there onwards the data just wrought got read into sas environment so so that means data row equal to three means so you want to read the data from the third record onwards so from the excel sheet if you want to read it yes you can do it by using an option here data equal to three right or else so you don't want it again client requirement is got changed i don't want all the information i need a specific sheet from the specific information only required imagine client requirement is you just open the excel i don't want all the data again i need it uh from here a one so from the a onwards up to d10 only this piece of information only just imported so that's enough i don't want to import the total data so then how i can tell to the size just to convey this message so to do that what you have to do is so you have to make sure to write it saying it a statement called range so within a range statement you write it range equal to from which sheet you are importing it the sheet equal to you are writing the seat name as a you because it's an i'm importing from the you and apart from that you have to mention the dollar sign because when you are using a range statement definitely you have to mention the dollar sign see generally we use a dollar sign after your variable name in your input statement but here you're writing you as a a dollar sign you're giving it here it must be you have to give it otherwise it won't work so a1 what is the a1 you just go there check your excel sheet so this is your a column with one a one onwards so up to d ten i need to read it so that's what i'm giving a range range is the statement is i'm just giving it so that no i want to select multiple variables with multiple observations wherever the client requirement is until that you are selecting it by using the range statement execute the same program and run it now before that you need to make sure to close this particular excel and run it that's it the data whatever you said to be imported it just got imported into sas environment but unfortunately here we don't have any column names default it is taking first observation as a variable names if you don't want that to be happen keep your range statement as it is and write extra statement as a get names equal to or write an option called no so that no you won't write that's it now you can see that a b c d you will get it right it reads data from a1a 0 6 1 0 onwards so up to this one you are expecting to read the total line records in your data it is just reading so a one on words up to d what i have written a one two d nine yes nine record it's reading it that's correct so these are all the options we use uh in our excel sheet to import into sas environment so how it is different and how it is advanced than your msr in file statement in the in file statement you have to mention the variables again and again in the input statement like a suppose you are importing around 20 variables you have to make sure to mention all the 20 variables in your input statement or default but in excel sheet you no need to do that you whatever the excel sheet containing a variables it will be get imported by default we don't need to worry about it so that is an advantage another advantage when comparing with a in file you have to make sure in the input statement while specifying the variable name so you have to write it it's a character or numeric right but in excel sheet you no matter so it's a character or numeric or data let it be anything sas can default read it so it will work and so in excel in our info statement you have to use a length statement to increasing the length of the variable to read it while reading it actually suppose we know that default character variable up to eight characters it can read if you want to read more than eight character so you have to make sure to give a uh length statement so that no we can give read that particular data into sas but in your proc import procedure you don't need to do that automatically excel how far the data is there with you so it just got imported it is bit advanced than your in file but the info sometimes better than your excel when you have a data is an inconsistency manner imagine if the data if it is not in a proper order so then where you can use the dlm dsd and trunk over scan over and all these options you can use it to read the data so that no even the messy data also we can able to read but excel also we can able to read the messy data but there are some limitations with it but still proc import procedure we use regularly in our real time to import actual data into sas environment so this is all the options you have learned so now you are aware of it proc import means it's a procedure method importing external data into sas environment path means you are giving that particular excel file where it is located out equal to the new data set name you are giving it as a it's a bill free and dbms equal to you're writing an option called xls and if it is already exist the data set name with the name of bill 3 i'm writing an option called replace so default it will take first observation as a variable names if you don't want that to be happen you write an option called get names equal to no and if you are giving a a piece of information to be read into sas so then you can use a statement called range so that it just get importing it anyone have any questions until here yes please speak out actually just now you have shown with the xls right and you said it advanced when it is excellent yeah x format yeah you're right yeah yeah so for that file also we have to use the same procedure it's the same procedure what you have to do is instead of writing xls you try to write it as a e x c e l you have to write it that's it so here the path will automatically change as a xls yes x x yeah this is the format you have to use in that case okay thank you so if you are clear with import then let me just expo talk about export export is very simple imagine so the data just got imported into sas environment so that's done so you have done some work and you need to export this data to the outside can we able to export this data in the form of excel sheet if required imagine we have a data called class in our data set here in our self library so says help library we have a data called class i'm interested to export this class data set to the outside can we do definitely we can do how can export you just open it this is my excel sheet containing so work data set containing a data i'm interested to export to the outside definitely you can do it what you have to do is you need to make sure to write a procedure as a proc export earlier you've written proc import means you are importing external data into sas environment it is exactly opposite to that you write a proc export and out file equal to in your in file in your proc import procedure you written as a data file equal to but here you need to write out file equal to imagine i'm interested to create a some files on my this particular place let me delete this one and even this one also delete it i'm interested to uh just to create a folder here to save that particular data set containing information into this folder as excel so you just open it and copy the path of this particular folder just open the folder and copy the path that's done so now what you are doing it here proc export out file equal to you are just mentioning a part of that file where you are interested to export it you are just given a path but the path is up to folder only but what i'm interested i want to create a a new file in my that in that particular folder with the name offer it's in an id dot xls format i want xls file i want to create it it just writes flash with an id dot xls that's enough then tell that says to which data to be exported data equal to you have to make sure to write it where that particular class data set is available it is available in sas help library with the name of class data set okay you just write it and dbms equal to excel and replace if it is already exist with the name of naidu dot xls i'm writing replace that's it what i've done proc export out file equal to i'm just giving a folder path then slash followed by your excel file name data equal to which data you are sending to the outside and dbms equal to you are writing it in which format i'm interested to send it in xls format write it xls only xls and replace if naidu dot xls is already exist and try to replace it executing the program and run it now i hope i'm done yes the data successfully got exported can you see that so naidu.excel file is successfully created go there go to your new folder on your desktop just here you open it the naido excel file you just open and see all the information whatever you have it in that particular data set of your self.class around 19 observations containing a data so you can see that all the information is ready for you understand so this is just you exported and one more so i'm interested to export one more data also into this so yes this one i exported that's fine now i'm trying to export one more file which is there as a hot data set imagine here we have one more data called hot this is a big file i can say i'm interested to export this particular heart file also to the outside so what i'll do is i have to mention sas in help instead of help dot class you just write it a heart hca rt so instead of writing the same excel name try to write it as a naidu 1 as a new excel sheet name so that no it won't overwrite the word one i just did it now go there check your new data here as then i do one dot excel there whatever the information it is there in your work library containing sorry that's yourself containing a hot data set it just got exported as a excel file it's an around 5000 records we have five zero two nine records i think we have it in this day in this particular excel right so this is just got exported from this excel now the client requirement is let it be sass help also sorry it says class data set also or data set also i'm expecting to store it in naido only can we do that can we store both the values in naido is it possible so if i'm running it what happens the previous one let's see let's see what happened is it really overriding first of all let me delete the night one so i'm keeping everything into an i do only the two sheets also earlier i already know that one sheet information which is there that is a class information now i'm inserting one more information called hot when i try to execute the program and run it now go to the log it successfully got created so go there and check your new file go to your naido here unfortunately the world is gone can you see can you see any class data set here that is no more with us it automatically overwritten with a new data set of your heart then how we can tell to the sas not to overwrite and try to create as a new file so you have to write it again to the world once right class data set and re-execute the program let it be created as normal like earlier so just go there open it yes class data set is created i'm expecting the new file to be created as a new sheet understand so if i want to create as a new sheet instead of just overwriting the old one make sure to write a statement called sheet equal to write what sheet name you want to write it you write your sheet name i am interested to write it hot and semicolon so now i'm exporting this data from heart so now you can see right it's done go to log also there is no errors now go to your new file open your naido you can see now the old data set of your class data set is still with us plus the new data set of heart also is there with us in the same excel file that means you can use a seat statement so you can insert a new seat information if required uh hi and i do like that how many sheets actually we can so you can write it number of sheets if required okay got it so now the task for you for today is how to import a multiple excel sheets into sas environment imagine so right now what happened when i'm writing a proc import procedure every time only one sheet is getting imported yes or no so now imagine i have a data with me in ido i have a two seats information one is naido second one is hot how to import these two seats information in a single attempt so that means once it's get imported it automatically one data set name has an i do another data set one name as a heart i want to create it in work library while importing it can we do that's your task for today you just go there and check internet also if required so but how to import a multiple actual sheets into sas environment is your task for today hello everyone in the last class we just decide uh and uh to import and as well as export so we have done so for excel files so today we will just continue with the the remaining files like access files and as well as text file csv files and all we will see one by one how to import it and as well as i have given one more task to you all how to import the data from external sources um by using sorry how to import multiple excel sheets so into sas environment is the task which i have given so that also will see in this class so first of all let me just open my sash now uh let me just open my import export class right so as we have seen it's an excel file it's a dot xls rls.xlsx but dbms equal to excel you have to write it or else maybe xls or xlsxy how to write it that we have done so we're coming to the access files what is nothing but access files so access files also is one type of database files so let me just uh open go to desktop sas tutorial seven there are many files here let me just filter for only ms office access that means microsoft access database files you can see this is my access files so you just open any of the access file let me just open a app is a access file so there if you just see you can able to find out one is a flight table second one is new table and new table one it's same like our ms office excel only but the difference is this we call it as a database ms office access database i can say so this database have some tables the table is one is flight table and second one is new table and new table one right so this is just database but in ms office we call it as our ms workbook in that workbook we have a different layer sheets like a sheet one sheet two sheet three and here also we have as a table one table two table three or something like that we call it yes in this database we have some tables if you want to import the data from this particular table containing information let it be any table it may be flight table it may be new table it may be new table one or anything if you want to import into sas environment yes you can do it right click on it go to the properties and go to the security so the problem is this one is it with the acc db so there is no problem uh actually there are two types of files you can see here one is appu dot mdb if you see it is in a dot mdb extension if you are using a sas 9.4 trying to ins uh you know trying to import a dot mdb files into sas environment definitely it won't work so you have to make sure to save this particular file as a acc db so in the ac access database so it should be like this we have in a path acc db so make sure to copy the path of the file where it is located so i'm just copying a path and click ok so now so you see the syntax proc import that's the same syntax like earlier like excel file proc import so here you need to write your table equal to so which table information you want imported as we have seen around three tables in my data one is flight and second one is new table and third one is new table one or something like that we have a data let me just import the data from the flight table so instead of sheet we call it as a table equal to as it's a database we are trying to import the data from the that particular database so database containing information we call it as a table so table equal to flight out equal to new dataset name what you are trying to create it dbms equal to you have to mention that a database name so that is a access so database so generally if you write it uh access if you write it up to here so it won't work up to 9.3 software it used to work but in 9.4 software if you want to import the data so you need to write dbms equal to access so cs also you need to write data and replace option you have to write it if the data set is already existed with the name of some kk over there you want to replace it then you write a replace so that is one statement is done the second statement you are writing it database equal to path of that particular uh mdb files or as maybe acc database file where it is located so it is there in my desktop see user uh this sas tutorial day67 upload.accdb is the extension of that particular file so what we have done first we are just importing a data let me just put everything into one line so that no it will be easy you see proc import table equal to flight is the table i'm trying to import it once the table is imported into sas environment i'm just giving the value as a out equal to kk and dbms equal to access and i'm just writing it here as a replace and database equal to you're just mentioning a path of that particular mdb format where it is located once you execute it and run the program and i just did it so now you see that so the data just got imported you can able to see all the data the total thousand sorry android observations we have it on that particular data it just got imported so whatever the sheet containing information that means the table containing information is just imported into sas environment so this is your ms office access database file to be imported it's the same syntax like ms office excel only but the only difference is there we call it as a data equal to but here we call it as a table equal to and out is the same dbms also same but the within the dbms we write access and replace also same and instead of data file equal to you need to write database equal to so that is the difference between your ms office excel file and as well as access file to be imported rest all same there is no difference again suppose imagine i have some data with me you know i have some data here you can see in my self library so there are many data sets is available so i'm interested to send this particular data to the outside imagine i have a hard data here so the hard data i want to send it outside so if i want to send this particular hot data data set to the outside so then i have to make sure so what i have to do is you write it same procedure like proc export and just write out table equal to you have to give a table name so the table name is up to your wish because this table name will appear in your access database if i'm writing my table name as a gzg or something like that so new table will be get created data equal to which data you want to send it outside so i'm interested to send this particular self containing a hot data to the outside so i have to make sure that i equal to you need to write says help dot heart rt hot data set you are sending outside dbms equal to so you have to mention so the database what you are giving it so it's an access and database equal to part of that particular uh data where you are interested to just to create it so i'm interested on my desktop with the there are some folders let me just delete this and let me create a new folder on my desktop so that no it's a new folder i'm interested to send that particular access file to this outside as in into the new folder so what i'll do is so proc export out table equal to gg data equal to sasha dot class and dbms equal access and database equal to you are mentioning a path of that particular folder and within that which name you want to create it the database name so the database name anything i'll go for it on let me just to go for ghani or something like that here so the new database i'm just creating here and execute the program and run it now that's it so go there and check it it is successfully created on your desktop go to your desktop and go to the new folder and open the gunny database and there you can see that gg is the table which you have created so it is just exported so you can see that all the hot data set containing information it just got exported to the outside as a access format if required so that means so we can import the data into sas environment by using access file at the same time we can export the data sets from sas data set format to access format that means ms office access format you can export also so import and export is possible by using this particular access files is anyone have any doubt in this it's the same procedure like our importing and exporting of your excel file we are repeating the same with access clear yes no nigel i have a question regarding the um the dbms yes is that is that tied into the operating system like in other words would if you if your company use unix versus windows would that does that matter uh yes definitely that is matter so you know where it is going to happen you know so unique version the paths are different so in windows only we have a paths like this c user desktop and all but reminding all the procedures is same but unix the paths are different let me just show you how the unix paths will be looks like [Music] see so this is the difference between windows operating system of your path and unix operating system of your path can you see windows we call it as a c workshop win sas program one emp lost data something like that this is the how the path start looks like but when i come into the unix the path is like this can you see user user id i will let it be the folder parts of the folder names anything but instead of having a c drive and all you will have a path like this this is in unix operating system we have to create a path like this to export and as well as to import it okay so there's forward slashes versus backslash back classes yes you're right and not only that so you the drives also there is no drive names because there there will be no drives in your unix it is just only folders okay and what about that dbms does that how does that does that change is that different too a dbms will be the same there is no change in dbms because this dvms is related to your sas it is not related to unix and it's not related to your windows understand so dbms is the access is the common even unix also so uh here but the thing is we need to check is this particular access files will be installed in your unix version because it's a microsoft or uh what is that right if office right i don't think so we can install access in the unix version because i never used it in real time but yes so i i am a bit confused here so whether we can use this particular access file because it won't install right in unix version can we able to install my my only my experience only is is a little bit on the unix side where we actually used on xls as that dbms option there ah so if that if that is working so then there is no doubt in that access file also will work okay yeah actually i'm sorry i'm sorry i should have said xl xlsx yeah so yeah that will work but the problem is what happens you know if it is an xlsx format uh so there is no doubt i think it's working even access also will work even excel is working so definitely access also working so there is no doubt on that okay thank you thank you yeah so this is all about for importing of your access files and all so now we will see about text file so we can able to import text files also into sas environment so what is the text file names imagine my text file is there with me as a radit raw data so that is your text format let me just see what information you have it in the text file in my day 6 and 7 again there are a lot of files let me just filter out only for text documents yes in the text document you just see error you can import anything and this is my text file so i'm interested to import the data from my text file can we do can we able to import it yes no yes we can do that so to do that first of all what we do it's same like our ms office excel there is no syntax difference also go to properties and go to the security and let me copy the path of that particular text file where it is located i'm just doing it now what i'm just doing proc import i'm just writing it the procedure method data file equal to where that particular text file is located so how to write it the text file where it is located so i'm just writing it here the text file is located here proc import data file equal to path of that particular format out equal to labs and dbms equal to dlm you how to write it so the only difference from your excel file to text file is everything is same even the syntax also same but the only thing is raw data dot text and here dbms equal to dlm is different so dlm is nothing but is the data is just a text format with a space operator delimiters if you want to import it right dbms equal to dlm and is there any data set name is already exist with the name of lab so you want to overwrite it so write an option called replace and use a get name statement equal to no because as we know that first observation will be as your variable names i'm expecting by default but unfortunately there is no variable names here right so automatically first row will automatically consider as a variable name which i'm not interested to hop in that so what i will do is here in this case i'm writing it and get names equal to no so that no it won't take first observation as a variable name or else we will do one thing let me remove this and run the program and execute it let's see what happens can you see so the 12 and 34 and aa is my observations but automatically it is just converted as a variable names underscore underscore 34 and aaa the first recording just got converted as a variable name as we know that default sas will take the first observation as a variable name so because of that sense it is just happening like this if you think that it is not going to happen like that so then you have to make sure to use uh what you have to use is get names equal to no when you write it so execute the program and run it now so now you can see that where one var2 and var three so you will get it so automatically the names you will get it from the sas so the variable variable one variable to variable three and all you will get it by default right you have to use a get name sql to know there is no syntax difference if you know how to import your excel file even text files also same the only thing is two two places you have to change the program one is with your dot text is the extension another one is uh dbms equal to dlm you have to change because it's in a uh just a text file extensions so we have to do so we're coming to here export how we are going to export the data so how we are going to export the data what we can able to do same thing if you have a data with me just imagine in this data set here i have a class data set i am interested to export this class data set to the outside so what i'll do proc export out file equal to again you mentioned the path so where i'm interested i'm interested to save something in my new folder let me copy the path of that particular new folder and i'm writing it the program saying it proc export out file equal to you are writing a path of that particular folder where it is located and after that your text file name is your wish what you want to write it i am interested to write it as a class is my text file and data equal to which data you want to send it outside in sas help library there are many data sets so you have i'll go for a data set called class here so let me just go for a class data set so data equal to sas help dot class and dbms equal to dlm and replace option you are writing it execute the program and run it now so that's it i just done with my data exploration to the outside in the form of text file let me just go there and check my new folder there i'm just looking for a text file called class you just open it yes the text file around 19 observations containing that particular text file is exported and it just got saved to my desktop right so that means we can import also at the same the text files we can export also so the same processor by using this particular proc import and export and again so how to import the data from the csv file what is meant by csv so comma separated files see now we have done how to import the data with the space separated files so that's okay sometimes you will get the data in the form of comma separated files that is called csv files so why we are calling csv means the extension of that particular file name with dot csv let me just uh show you what exactly the csv file means meant still [Music] go to the basic skin 7 so there are a lot of files here let me just to filter for only comma separated files yes these are all the comma separated files actually you see these files it looks like our ms office excel workbooks okay so but actually it is not you do one thing you right click and open with text format that is your notepad and now you can see that all the data is separating with comma can i see so this is my two variables each variable is just operating with comma so can you see that so this is my first variable information this is my second variable so the first variable and second variable information is just separating with comma so this type of files we call it as a comma separated files and while saving this particular file we can save it in two formats you can save it as a dot txt format you can save it or else dot csv format also we can save it so let me do one thing let me just take some big data so that now it will be yeah so this is the data with me what i'm just interested you know i'll just open this data open with a text format yes all the data you see that so it's just separating with comma so everywhere so the data is just separating with comma so what i'll do is i have to make sure to import this data into sas environment i'll go to file click on save as in this time i'll try to save it in the form of a text file extension let's see i'm just saving on my desktop as a text file i'm trying to import it from the text so quite sincerely open go to file click on save as okay doing the open with notepad go to file click save as my file dot txt i'll save it onto my desktop let me delete this one okay so the file is uh instead of csv even though it is a comma separated values but the file it just got saved into a text format so what i will do is i am trying to import this data into sas environment go to security and let me copy the path of that file where it is located yes i did it so now what i have to do is proc import and you need to write data file equal to path of that particular text file where it is located but out equal to the new data set name whatever you interested but dbms equal to here it should be csv as it is a text you should not write as a dlm because even though it is a text file but inside of your data is just the comma separated values so you have to make make sure to write dbms equal to csv comma separated value if the name is already exist with the info demo you want to overwrite it and write a replace option like at least same there is no difference once you execute it and run the program i'm interested to import the data yes it just got imported can you just check it now go there and new data set what you have imported into your work library um info demo can you see that the data just got imported so into sas environment even that particular file how just the comma separated file also is imported this comma separated file as i said we can write it in two ways either you can write it myfile.txt also or else you can write it myfile.csv also but both files also the dbms will be the same it's a dot c csv only there is no difference right at the same time if you want to export the data to the outside can we able to export it again same so i'm interested to export in my new folder too with a different name so what i will i'll do is let me just go with the proc export out file equal to part of that particular file where it is located and so i'm interested to save my file as a dot csv which data set you are sending outside that is data equal to self.art and dbms equal to csv and replace if it is already exist then it will automatically replace run it i think i'm done successfully got executed go to my new folder so the new file it just got created that is called comma separated file you just open it the dd you see the hot data set it just exported here in the form of a comma separated file we can do that is it making sense everyone able to follow me anyone have any questions on importing and exporting of excel files text to file csv files and as well as access files any questions to anyone say yes no able to follow sorry oh you've been able to follow me thank you and uh so let me just import the data from the tab file so what is the tab file so if sometimes the data is just separating with the tab spaces so let's see what exactly the tab space is and why i'm asking about that go to the sas tutorial day 6 and 7 there are many files so let me just a filter for text file only so this is called tab file you just open the data is like this what is the difference between this data and as well as this data what is the difference between these two datas can you see it is separated with the tabs yes the first data set you just see it is just separating with the space but this one is just separating with the tab that means more spaces you can see if you want this type of data dbms equal to dlm whatever you are using to import your text file it will not be sufficient let's see that also so that now we get to know that what exactly to be used let me just go to the properties and the security and let me copy the path of this particular file where it is located and now i'm writing it proc import data file equal to path of that particular file where it is located and then out equal to info demo one and dbm is equal to if i'm writing dlm if you think that it's just a text file i written a bms equal to dlm and replace and get names equal to no i don't want the first observation as a variable names then you return get names equal to no and execute the program this is the output what you got it can you see 1234 everything is comes under one column only which is not correct always one column 34 is one column a is one column that's what we are expecting but what is the mistake here so you thought dbm is equal to dlm but actually dbm is equal to it is a tab separated delimiter so that dot text extension will be the same there is no change in the text what you do dbms equal to tab you how to write it and execute the program and run it now so the data is just imported but this time the data just operating with tab spaces by coming to here i have a data with me the same data you want to send it outside suppose i have a data center is my data set name input pid is a name and quartz is a statement i'm trying to create a new data set name called center so i'm just exporting the data proc export out file equal to you're just mentioning it part of that file where it is located and data equal to sas help dot class and dbms equal to tab and replace once you execute it and run it that's done data got exported to the outside it's a new folder too but i don't have any new folder too let me just export as a see user desktop new folder and center.txt i'm interested to send it outside i think it will work the data center is just separating with the tab space can you just see that means the tab files we can able to import it at the same time the tab files we can export it by using this particular prog import and export processor so this is all about for different file how to import and as well as how to export into sas environment [Music]