Hi,
Considering the files you are talking about are flat files; I can give you a hint.
Follow the steps below,
1. Create a SAS dataset say beforeRun; by reading the complete single line into one variable (say txt_1) and create anohter varaible called obs_no which will have value of observation...
This is simple Use INTNX() function.
The syntax would look like this:
strt_date = INTNX('month',logged_date,0,'B');
You can visit https://sites.google.com/site/sasbuddy/sas-date-function-intnx-with-example
for further reference
Regards,
sasbuddy
http://sites.google.com/site/sasbuddy/
Hi
As per my knowledge one can use Camel case naming convention in SAS.
however while recognizing SAS doesn't care about the case of the variable names.
You can follow the link
http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a001392879.htm
sasbuddy...
Hi,
Its possible to do like that;
What I understood from your information is that; there are series of steps which you want to carry out for diiferent values as output (say 10000 different values).
You can do it as following;
Step 1: Put all the code (series of steps in one macro lets say...
Dear dearsamuna,
Please look at the code I have provided at your other query regarding the same question.
I am sure it will work; and all the best.
sasbuddy
http://sites.google.com/site/sasbuddy/
Hi,
This can be done using the macro code.
The sample code would be like below;
data temp;
infile datalines;
input SampleId $11. sal dob mmddyy10. phone $9. ;
datalines;
10-1xxx-001 37645 04/23/1978 728364539
10-2xxx-002 38746 05/23/1967 938746355
10-4yyy-511 49875 01/11/1987 938874653...
Hi,
It seems there no direct solution to this problem as your priname variable is of variable length.
I suggest you to go back to the source program which generates your data file.
If it is getting generated out of some DBMS, its easy to insert a proper delimiting character between two...
Hi,
I am not clear on the last part you have mentioned " The other reason it is wrong is because if procedure 2 and 3 are in the same episode then the "is blank" needs to address that epi3 should be "2" and not "1". "
But for converting adding time into date; I can say the following.
You have...
I am not exactly clear with the requiremnt;
But hopefully it would work fine using call symput instead of using %let in macro code.
I would suggest use a data _NULL_ statement inside that use call symput plain scan function.
sasbuddy
http://sites.google.com/site/sasbuddy/
Hi
It seems you are in some sort of confusion.
Updateing a master dataset using a another dataset and Joining two datasets are completely distinct operations.
In addition to that the code you have used do cater to any of those requirements.
1. for updating a master dataset using anohter...
Are you sure you have the dataset called "AdmitDate" at your work library and Do you want to read the data from that Dataset?
If yes then please change the order of input and set statement.
sasbuddy
http://sites.google.com/site/sasbuddy/
Hi,
It seems there is problem with the syntax;
you should you corelated subquery for this, as shown below.
CODE :
PROC SQL;
UPDATE
WORK.YODDAYODDA slmbrs
SET
slmbrs.pcpid = (select mbrs.pcpno where slmbrs.HFMemberID = mbrs.membno),
slmbrs.pcpparent = (select prov.parent where mbrs.pcpno =...
Refer the following program, for desired output.
data t;
input X Y $;
cards;
1 A
1 A
1 A
1 D
1 J
2 B
2 B
2 D
2 C
2 C
3 A
3 D
4 A
4 B
4 D
4 C
4 D
4 R
4 R
;
run;
proc sort data =t;
by X;
run;
data t (drop=flag);
set t;
retain flag 0;
by x;
if first.x...
Hi Katrin
IF you observe the PROC CONTENTS output; you can see that AdmitDate variable has got format datetime22.3 while HospDischDate havent got any format.
But I dont see any reason which would create problem in any kind of calculations.
Suppose you want to get difference between Hospital...
There could be multiple ways to do it.
Considering the input variable is in character format then you can use following expressions
tm = timepart(dhms(00,substr(time,1,2),substr(time,3,2),00));
put tm =time8.;
sasbuddy
http://sites.google.com/site/sasbuddy/
Hi
As per as my knowledge is concerned; I can give you my opinions as folllows,
About handling large volume of data - this capability depends on the background infrastructure i.e. work space server where SAS EG runs the code. It depends on the capacity of CPU and memory provided on that...
Hi,
if your input data is like '310117' and if you read it using yymmdd6. format with YEARCUTOFF = 1920. then It will give the date as 1931-01-17 and if you have '130117' as source data then the output with above code is 2013-01-17.
The way YEARCUTOFF option works is like; it takes next 100...
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.