Hi,
Kindly provide me with some definition and one example for the following:
1. %str()
2. %nrstr()
3. %quote()
4. %nrquote()
5. %bquote()
6. %nrbquote()
Thanks for any response in advance!
Wouter Hupkes
Business / Risk Analyst
wphupkes@gmail.com
I hope someone can help me with the following:
I like to eliminate the obs when they are greater than age>=ag1 by id. See below for the input set.
id age ag1
1 1 .
1 2 2
1 3 .
2 1 1
2 2 .
2 3 .
3 1 .
3 2 .
3 3 3
3 4 .
I've used the following code already:
data test1;
set test;
by id;
if...
Hi,
I was wondering if anyone could help me out with the following question. I've written a program in Base 9, with multiple data steps (and proc prints / reports). The outcome is based on the input variables, as stated at the beginning of the program (the &LET statements). Maybe useful to...
Hi all,
From Base 9.X, I didn't had any problem sending an e-mail (with attached PDF for example, created by ODS PDF). Now I'm using the program session from SAS Enterprise Guide, and I'll get the following error statement by executing the program as presented below:
NOTE: The file MAILBOX...
GOT IT!
I had to place a dot after the &i (and use the double quotation marks):
PROC IMPORT DATAFILE= ".......\Financieel_AB_401_Day_0&i._09_2009.csv'
Thanks for your input!
Hi,
I hope anyone could help me out with the following. I want to read multiple files (from 1 till 30), placed in 1 dir, with the use of macro's (best way to do this I think). But... my version of the program only generates errors (by the way; I haven't looked yet for a solution to go over the...
Hi,
I've created a (SAS) SQL query, but this generate a warning ("Function LEFT requires at most 1 argument(s). The extra one(s) will be ignored."). In Management Studio the query (this part) works great, but not in SAS. Can anyone see the problem?
The 'faulty' part:
WHEN...
Hi all!
Should be a simple task, but I don't get the code right...
I want to know (and FLAG) if a record contains a 1 time number or if there are other records with the same number. So I've got a dataset like:
1 text
2 text
2 text
3 text
4 text
4 text
4 text
I want to create a 'FLAG', so I...
Got it!
DATA work.test2 ;
set test;
RETAIN regExp ;
IF _N_=1 THEN regExp = PRXPARSE("/(I|i)ncident\s(\d+).?/") ;
IF PRXMATCH(regExp, text) THEN number = PRXPOSN(regExp, 2,text) ;
run;
All,
I've got a datastep in which I extract a number from a string. But... The strings are changing from time to time, but only the first part before the word "Incident" (sometime there appear some numbers, but I don't need those). So what I can do, is make 2 datasteps with the statements...
THanks!
The only thing is, when there's no "debtor" stated in the records, SAS responds with the error(s): "NOTE: Invalid second argument to function SUBSTR at line 235 column 14.". While I get a list of multiple errors (ending by " Limit set by ERRORS= option reached. Further errors of this...
Hello,
I've got a dataset in which I want to remain everything after a particular word, like "debtor". Like:
ID | Variable_1
1 xxx debtor profile 7
2 x debtor profile 3 to 1
3 xx debtor profiles 133 to 155
4 xxxx debtor profile 3
So the final result would be:
ID | Variable_1
1...
Well, I've got this particular problem coverred with a sort of reversed 'LAG' construction (the problem was, I've got to had a field of the second row before the first was released...):
Data test2;
_n_ ++ 1;if _n_ <=n then do;
set test1 point = _n_;
date_end=incident_date;
id2=id;
end;
else...
All,
I've got a table with multiple variables, an incident date and id's which can occur more than once. The incident date changes every time an incident occur. Like:
ID | Incident txt || Incident Date
1 A 01-01-2008
1 A 05-03-2008
1 B...
Thanks! I tried for long time to make it work within a datastep like below, but yes, SQL will make life easier for this...
data a;
do while not ( end_of_b );
set b end = end_of_b;
end_of_c = 0;
do while not ( end_of_c );
set c end = end_of_c;
output;
end...
Hi all,
I've got the following problem:
My customers can be provided with serveral profiles. These profiles, ofcourse, can change in time per customer. In my database this is stored as "Customer has changed from 'Profile 21' to 'Profile 2'". These changes are recorded with a date on the same...
Yes, well something like this:
Step 1 (no idea how to do without a huge table!): Determine the arrear for every customer_id on every date, where the arrear on a specific date is the last known arrear (on incident date). So if the arrear on the 1st of february was 1 month, it still should be 1...
Hey Chris,
No, right now I've got 1 table with reporting dates (start and end dates can be set manually by me), the incident dates (the date a change in arrear occur) and the actual arrear. I want to report on day-bases (so I can get a clear graphical overview for every month), like:
Period...
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.