06-24-2020
allaboutsas
Calcite | Level 5
Member since
12-17-2014
- 40 Posts
- 2 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by allaboutsas
Subject Views Posted 4418 05-06-2015 12:08 PM 4418 05-06-2015 10:48 AM 4574 05-05-2015 05:29 PM 1383 04-09-2015 10:42 AM 1456 04-08-2015 02:03 PM 1456 04-08-2015 11:22 AM 1383 04-08-2015 11:04 AM 1383 04-08-2015 10:34 AM 1456 04-07-2015 05:05 PM 1533 04-07-2015 05:02 PM -
Activity Feed for allaboutsas
- Posted Re: How to use SVN on SAS EG programs on SAS Enterprise Guide. 05-06-2015 12:08 PM
- Posted Re: How to use SVN on SAS EG programs on SAS Enterprise Guide. 05-06-2015 10:48 AM
- Posted How to use SVN on SAS EG programs on SAS Enterprise Guide. 05-05-2015 05:29 PM
- Liked Re: Negative Lookahead? for Ksharp. 04-10-2015 11:02 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-09-2015 10:42 AM
- Posted Re: Perl in macro question on SAS Programming. 04-08-2015 02:03 PM
- Posted Re: Perl in macro question on SAS Programming. 04-08-2015 11:22 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-08-2015 11:04 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-08-2015 10:34 AM
- Posted Re: Perl in macro question on SAS Programming. 04-07-2015 05:05 PM
- Posted Perl in macro question on SAS Programming. 04-07-2015 05:02 PM
- Posted Re: Negative Lookahead? on SAS Programming. 04-07-2015 11:08 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-07-2015 10:59 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-02-2015 11:13 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-01-2015 11:51 AM
- Posted Re: Negative Lookahead? on SAS Programming. 04-01-2015 11:50 AM
- Posted Re: Negative Lookahead? on SAS Programming. 03-26-2015 05:49 PM
- Posted Re: Negative Lookahead? on SAS Programming. 03-25-2015 11:38 AM
- Posted Re: Negative Lookahead? on SAS Programming. 03-25-2015 11:37 AM
- Posted Re: Negative Lookahead? on SAS Programming. 03-24-2015 06:03 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 4
05-06-2015
12:08 PM
OK, thanks. I’ll look into the option of saving our programs in local file system rather than SAS server.
... View more
05-06-2015
10:48 AM
We have EG 5.1, and our company already have TortoiseSVN. The problem is our programs are all sitting in the server, and users use EG to create/edit them. We don’t have windows EG. So looks like we have to copy our programs from server to local drive in windows, in order to use TortoiseSVN. Was hoping can have SVN installed in EG, which TFS can? Right?
... View more
05-05-2015
05:29 PM
We are trying to use TortoiseSVN version control on our SAS programs, the problem is our programs are usually saved on Linux server directly from SAS Enterprise Guide, and looks like SAS EG doesn’t support SVN. So we are thinking to copy programs from the server to windows environment, then add to repository using SVN, but doing this we’ll always need to copy the programs from the server, is there any better way to use SVN on SAS EG programs?
... View more
04-09-2015
10:42 AM
It has "ab ht" around the numbers, so should return nothing. var="1.3g Elevated pulse ab ht and 0.6d labored breathing."; output;
... View more
04-08-2015
11:22 AM
Thank you. The thing is there are more conditions need to be considered, like the number has to have WITH OR W/ in front of it and mnop behind it, etc, I can’t list all of them. Can you explain what does ?? do in the first input statement? Thanks!
... View more
04-08-2015
10:34 AM
Thanks. Just want to understand your code completely. I simply changed [abe-z] to [a-z], how come it doesn't work for the 4th record anymore? Thanks! data want; set check; length v $ 20; retain pid; var=prxchange('s/\bab\s+ht\b|\bods\b/|/i',-1,var); if _n_ eq 1 then pid=prxparse('/[^|]\s+\S*\s+\S*\s+[a-z]+\d*\.\d+\s+|\s+\d*\.\d+[a-z]+\s+\S*\s+\S*\s+[^|]/i'); call prxsubstr(pid, var, position, length); if position ne 0 then v = prxchange('s/^\.+(?=\d+\.\d+)|\.+$//' ,-1, compress(substr(var, position, length),'.','kd') ); drop pid position length; run;
... View more
04-07-2015
05:05 PM
Here is the program to create the macro variable and the format: data seed; length start $100 num $10000; retain fmtname 'wordnum' type 'c' num ''; do label=1 to 100; start=upcase(put(label,words100.)); output; num = catx('|', num, upcase(put(label,words100.))); end; call symputx('numlist', num); run; proc format library=work cntlin=seed; run;
... View more
04-07-2015
05:02 PM
I created a macro variable numlist as the following: ONE|TWO|THREE|FOUR|FIVE|SIX|SEVEN|EIGHT|NINE|TEN|ELEVEN|TWELVE|THIRTEEN|FOURTEEN|FIFTEEN|SIXTEEN|SEVENTEEN|EIGHTEEN|NINETEEN|TWENTY|TWENTY-ONE|TWENTY-TWO|TWENTY-THREE|and so on. And format of $wordnum converts one to 1, two to 2, and so on. Now I need to use regular expression to capture the word numbers like this: data have; var="abcd efgh ijkl WITH THREE mnop qrst"; output; var="abcd efgh ijkl W/ TWENTY-FIVE qrst"; output; run; %macro try; data want; set have; %local re1; %let re1=%sysfunc(prxparse(/(\s|\(|\)|-|#|[HW]\/ ?)(\d{1,3}|&numlist)\W*(mnop|qrst)/)); %if &re1 > 0 %then %do; %let pt_comments=%sysfunc(prxposn(&re1,2,var)); var2 = put("&pt_comments",$wordnum.); %end; run; %mend; %try; proc print data=want; run; I’m expecting result of the following: var2 as 3 and 25, what did I do wrong in my program to create want? Thanks! obs var var2 1 abcd efgh ijkl WITH THREE mnop qrst 3 2 abcd efgh ijkl W/ TWENTY-FIVE qrst 25
... View more
04-07-2015
11:08 AM
This is the code I tried, it gets wrong result: data want; set check; length v $ 20; retain pid; var=prxchange('s/\bab\s+ht\b|\bods\b/|/i',-1,var); if _n_ eq 1 then pid=prxparse('/[^|]\s+(\S+)?\s+(\S+)?\s+(\d+)?\.\d+\s+|\s+(\d+)?\.\d+\s+(\S+)?\s+(\S+)?\s+[^|]/i'); call prxsubstr(pid, var, position, length); if position ne 0 then v = prxchange('s/^\.+(?=\d+\.\d+)|\.+$//' ,-1, compress(substr(var, position, length),'.','kd') ); drop pid position length; run; proc print data=want; run;
... View more
04-07-2015
10:59 AM
Hi xia keshan, Sorry, am I misunderstanding [dh-z], is it for (not started with ‘abc’, ‘efg’) from the previous example? But it’s not the request for this task, [abe-z] as well, so I want to remove them from the code you provided, but can’t make it work. The only 2 requests for this task are: The number wanted has to be a decimal: (\d*\.\d+) Words don’t want to be within 3-words in front or 3-words behind are: ‘ab ht’, ‘ods’. Thanks.
... View more
04-02-2015
11:13 AM
The requirement was this: The number wanted has to be a decimal: (\d*\.\d+) Words don’t want to be within 3-words in front, or 3-words behind are: ‘ab ht’, ‘ods’. There is no [dh-z] or [abe-z], I think your previous code is right as long as these are removed, but I can't get it work.
... View more
04-01-2015
11:50 AM
Xia Keshan, Thank you so much! That’s awesome! One question, I believe you carried over [dh-z]+ and [abe-z]+ from my first question, right? So I tried to remove them as the code below, I don’t understand why it’s not working, what did I do wrong? data want; set check; length v $ 20; retain pid; var=prxchange('s/\bab\s+ht\b|\bods\b/|/i',-1,var); if _n_ eq 1 then pid=prxparse('/[^|]\s+(\S+)?\s+(\S+)?\s+(\d+)?\.?\d+\s+|\s+(\d+)?\.?\d+\s+(\S+)?\s+(\S+)?\s+[^|]/i'); call prxsubstr(pid, var, position, length); if position ne 0 then v = prxchange('s/^\.+(?=\d+\.\d+)|\.+$//' ,-1, compress(substr(var, position, length),'.','kd') ); drop pid position length; run;
... View more