data n;
set sashelp.class (drop=height weight);
putlog height weight ;
run;
In the above code drop variables creates automatic variables in _error_ and _n_ in PDV
even if not uninitialized is it occupied disk space i am using putlog along with height and weight variables
log window show as below.
I do not understand what you are asking.
You read in SASHELP.CLASS but exclude the HEIGHT and WEIGHT variables.
You then create NEW variables named HEIGHT and WEIGHT by using them in the PUTLOG statement.
Since you never assigned any value to them you will get 19 lines written to the SAS log with two periods (or whatever character you have told SAS to use to represent missing values by change the MISSING system option).
what PDV does for drop variables any disk space to read in input buffer
@BrahmanandaRao wrote:
what PDV does for drop variables any disk space to read in input buffer
Do you mean "program data vector"? I don't use that terminology as it does not really help me think about how SAS works. Just keep track in your mind about which variables you are using.
Since you dropped the HEIGHT and WEIGHT from SASHELP.CLASS before you read them in you can forget about them completely. They don't exist in this data step.
So after the SET statement you have created NAME, SEX and AGE variables.
Then after the PUTLOG statement you have created HEIGHT and WEIGHT.
So your data step has 5 variables, two of which will be missing on every observation since no values are ever assigned to them.
I'm not sure what you're asking either. But the automatic variables _error_ and _n_ are always in the PDV. They are created by the DATA step itself.
1 data _null_ ; 2 put _all_ ; 3 run ; _ERROR_=0 _N_=1
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.