_N_ gives the record number. You can access any record in
the dataset using _N_ if you know the record number. It is
set as 1 for the first record and incremented for every
subsequent record. It is an automatic variable and is not
visible when you open a dataset. This can also be used to
subset a data. For ex, if you want to access the first 100
records then you can say "if _N_ <= 100".
This is an automatic variable of PDV that returns the no of
observations that it has iterated.There are such variables
All these variables will not be displayed in the target output.
if _n_>=2 and <=6 then output;
Compiling time of the program in PDV automatically some
variables will generate, like _N_ and _Error_, _numeric_
_N_ will give the observation in the program. by default
_N_ value is 0, after compiling it will chage according to
the observations in the program.
There is a field containing a date. It needs to be
displayed in the format
"ddmonyy" if it's before 1975,
"dd mon ccyy" if it's after 1985, and
as 'Disco Years' if it's between 1975 and 1985.
How would you accomplish this in data step code? Using
only PROC FORMAT
Hi, I have one dataset, could you please ans for this.
id amount paid_amount
1 700 400
2 900 250
3 300 300
a 400 250
b 500 320
c 800 650
x 200 190
y 900 250
z 300 180
i want create new dataset having id and paid_amount who are
paid high amount comparing amount.
ex: 1d paid_amount