I think that you need to 'see' the actual value stored to get a sense on how to filter. SAS has two datatypes char and num. In your question you specify that the variable is type NUM. This indicates that the number stored is in numeric format. For you to 'see' this as a date value on display...
_in(*) is the name of the Array with the '*' as the number of vars in the Array. Using the asterisk allows the user to add vars to the Array dynamically. This way the programmer doesnt have to limit the Array width to a specific number of vars.
Ex.
Array _in(4) x1 x2 x3 x4;
In the above Array...
I think that he/she mentioned this location so that SAS can launch via DDE (x command) the zip software. SAS opens the BAT file, a window execute program, that opens the ZIP maker.
...the first of the month in question.
So in your case May 1, 2013
Here is an example that presumes that your variable with the '20135' value is named mydate.
proc sql;
create table test as
select *, input(mydate, yymmn6.) as mynewdate
from mydataset
;
quit;
I hope that this helps you...
I think that you're mixing up MACRO and BASE. Remember, MACRO gets resolved before runtime. I don't think that your status variable would work.
Do you always want to combine the 3 datasets? If yes why not just have the macro do a simple SET logic.
%macro MyList(DataS1,DataS2,DataS3);
data...
The intck function shouldn't be used to calculate age. My bad! The function returns the difference in years and not 365 day years. (Try Dec 20 XXXX and Jan 10 XXX+1)
To get age use the first line in your post.
Age = (DATE() - Birthdate) / 365.25;
You can format the AGE var using the 8...
No FILENAME and %INCLUDE are two different concepts.
One is a MACRO substitution and the other is a BASE SAS statement.
You use the %include (or %inc) statements for instances where you would like to include the code segment (at the include location) in your program. Think of it as a text...
...to reset the log to its default location or else the log will contain all log data of your SAS session and not just the particular program you want to see.
Ex
proc printto log='c:\test.log';
run;
***Your SAS code here ***;
***reset ***;
proc printto;
run;
I hope that this helps you,
Klaz
You could use the PROC contents and save the out file. Then write a macro or even some base SAS code that would loop through the variables and generate the rename code. Then execute the code in a call execute.
If you need more info let me know. If I have time later I can try and code it for...
It seems from your description that the parm card value you pass to the macro variable named QTR is resolving too late. You need to have the QTR value set before the macro call executes.
Perhaps if you copy the code and place it on here we can let you know how to modify the program.
Klaz
CW,
The first line acts as a filter and will only read the observations in the given range (+ 2 records ).
The if workstn statement seems to be a not-equal operator (I haven't seen this as I use the caret (shift 6) ^= as the NE operator)
Does this help?
Klaz
why not use SAS's input function with the above mentioned formats? This way any date that doesnt meet the convention will end as a missing value.
Then you 'know' all your bad date values.
ex
sasdatevalue = input(your_date_value,mmddyy10.);
Klaz
Why not use the Macro recording feature in the SAS editor?
Select Tools-->record new macro
Then click the line you want and copy (ctrl+c) then go to the next line and paste (ctrl+p)
Then
Select Tools --> stop recording
Name your macro and assign the key that want (F12)
Viola! you have your...
...the offending character string. In my example above I named that variable 'yourvar'. You need to place the compress() function in your datastep code.
ex
data yourdatasetname;
set yourdssourcename;
*** WILL REMOVE COMMAS FROM VARIABLE VALUE ***;
yourvar = compress(yourvar,',');
run...
You can remove the commas by using the compress() function or you can 'wrap' your values with quotes.
ex 1
yourvar = compress(yourvar,',');
ex 2
yourvar = '"'||trim(yourvar)||'"';
I hope that this helps you.
klaz
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.