03-06-2020
saskapa
Quartz | Level 8
Member since
01-16-2014
- 58 Posts
- 16 Likes Given
- 1 Solutions
- 1 Likes Received
-
Latest posts by saskapa
Subject Views Posted 645 03-06-2020 05:56 AM 844 02-18-2019 07:21 AM 2497 08-15-2018 07:20 AM 2439 08-15-2018 06:48 AM 1316 09-01-2016 05:23 AM 12632 08-03-2016 07:28 AM 12650 08-03-2016 05:27 AM 2046 03-30-2016 09:54 AM 2057 03-30-2016 09:24 AM 2080 03-30-2016 08:33 AM -
Activity Feed for saskapa
- Posted special printable character $ show in my datasets instead of the originial special character on SAS Programming. 03-06-2020 05:56 AM
- Posted Discrete legend size control on Graphics Programming. 02-18-2019 07:21 AM
- Posted Re: Understanding %sysfunc in open code with an example on SAS Programming. 08-15-2018 07:20 AM
- Posted Understanding %sysfunc in open code with an example on SAS Programming. 08-15-2018 06:48 AM
- Posted Error counts statistics in the log is not consistent with log file error message ? on SAS Health and Life Sciences. 09-01-2016 05:23 AM
- Liked Re: How to empty dataset BUT keeping still keeping descriptor portion for dataset label for LinusH. 08-03-2016 08:53 AM
- Liked Re: How to empty dataset BUT keeping still keeping descriptor portion for dataset label for Kurt_Bremser. 08-03-2016 08:53 AM
- Liked Re: How to empty dataset BUT keeping still keeping descriptor portion for dataset label for Ksharp. 08-03-2016 07:30 AM
- Posted Re: How to empty dataset BUT keeping still keeping descriptor portion for dataset label on SAS Programming. 08-03-2016 07:28 AM
- Posted How to empty dataset BUT keeping still keeping descriptor portion for dataset label on SAS Programming. 08-03-2016 05:27 AM
- Posted Re: data step logic iteration with cards on SAS Programming. 03-30-2016 09:54 AM
- Liked Re: data step logic iteration with cards for Tom. 03-30-2016 09:53 AM
- Posted Re: data step logic iteration with cards on SAS Programming. 03-30-2016 09:24 AM
- Posted data step logic iteration with cards on SAS Programming. 03-30-2016 08:33 AM
- Posted Re: Do Until with a SET statement logic on SAS Programming. 03-29-2016 02:11 PM
- Liked Re: Do Until with a SET statement logic for data_null__. 03-29-2016 02:04 PM
- Liked Re: Do Until with a SET statement logic for Astounding. 03-29-2016 01:57 PM
- Posted Do Until with a SET statement logic on SAS Programming. 03-29-2016 08:43 AM
- Posted Re: readin raw data repeated block with an id on SAS Programming. 03-24-2016 02:34 PM
- Liked Re: readin raw data repeated block with an id for ballardw. 03-24-2016 02:28 PM
-
Posts I Liked
Subject Likes Author Latest Post 5 3 1 2 1 -
My Liked Posts
Subject Likes Posted 1 03-07-2016 02:27 PM
03-06-2020
05:56 AM
Hi,
I a m facing a strange issue with some of my data sets, that I am QCing.
Both me and an external users are working on those input data sets. Surprisingly, some special character ( that are printable), that is $...are displayed in my sas system but it is not show by the external user. For example, values like 1+,3+,>100 are displayed as $ in my data sets, while in the external user, those $ signs are not shown. Example, like for instance >100 appears as $$100.
I have added a screenshot that show the difference in character display between me and external user of the same data set.
Following things to consider/observed:
1.the data sets were created in Linux environment
2. My environment is X64_R
3. External user's host is SunOS
4. In the screenshot, you can see that the external's translated $ have an unusual bigger font size, and even a different font.
5. I have contacted the external user, and they are not aware of any issue; they don't see the $ sings
6. both are on UTF-8 ( don't think its relevant here)
My question is hence :
What can I do, in order to unmask/recover the true character hidden by $$ ? If ever it is possible to recover...
Thanks
Kapa
... View more
02-18-2019
07:21 AM
Hi,
I have created a plot of a reverse cumulative distribution. Its contains two series. I have added also a legend through DISCRETE LEGEND in my proc template.
some features:
I wanted it to be aligned at bottom left with border.
the location of the legend is inside.
I used displyaclipped=true.
I am also playing with the size option of the value displayed in the label through valueattrs.
The legend square box is displayed as expected, at bottom left, but I still find it to large; it impinge on my series chart. I could reduce the size of the legends label with valueattrs, and hence avoid any impinge on the series, but a reduced font size doesn't make the label easy to read.
I noticed, though, that inside the legend, the two lines referring to each of my series are too wide ( almost half of the width of my legend box)...If I could reduce the width ( length) of those lines , I would then reduce the size of my legend box....Is there a way to controls how the lines symbols in the legend are displayed in terms of width/length ?
saskapa
... View more
08-15-2018
07:20 AM
Hi RW9,
Yes I try find the path part of the name. I can deduce from your answer that I would then need for each function a %sysfunc...
%let test=a/b/c.sas;
%let ysys=%sysfunc(substr(&test.,1,%sysfunc(length(%sysfunc(scan(&test.,-1,/))))));
%put &ysys;
It is then providing me with a correct result.
Agreed, that there are easier and more elegant solution, but wanted to understand the use of %sysfunc.
Thanks,
saskap
... View more
08-15-2018
06:48 AM
Hi,
I have wrote a code to illustrate the use of %sysfunc in a open code. The first code is not using %sysfunc, instead I use macro functions :
%let test=a/b/c.sas;
%let nsys=%substr ( &test,1,%length (%scan ( &test,-1,/) ) );
%put &nsys;
Now I would like to use the same logic but this time I will use %sysfunc with sas function ( not macro function)
%let test=a/b/c.sas;
%let ysys=%sysfunc ( substr ( &test,1,length (scan ( &test,-1,/) ) ) );
%put &ysys;
But I get an error : ERROR: Argument 3 to function SUBSTR referenced by the %SYSFUNC or %QSYSFUNC macro function is not a number. ERROR: Invalid arguments detected in %SYSCALL, %SYSFUNC, or %QSYSFUNC argument list. Execution of %SYSCALL statement or %SYSFUNC or %QSYSFUNC function reference is terminated.
It looks like the type of value returned by length() is not numeric. What is the difference between the codes that make my %sysfunc version not working properly ?
Another question/advice, is it possible to use %sysfunc with a macro function ? example %sysfunc(%scan(&alpha,1)) or should we only use %sysfunc with non macro sas function like %sysfunc(scan(&alpha,1))
Thanks in advance
saskap
... View more
09-01-2016
05:23 AM
Hi All,
I am experiencing a strange thing in SDD. after I have runned a job, I checked the log file for errors. Down in the log file you have the count of errors and warnings that SDD display automatically. Surprinsingly the error counts statistic is not consitent at all with the number of error in the log file. Basically, log statistic says 9 errors while in the log there are no errors reported. I have searched in different ways ERROR: and error:. Any clue ?
For your information, the manifest file has no error message and warnings count were consistent warning message in the log.
Cheers,
saskap
... View more
08-03-2016
07:28 AM
Thanks All
The reason why I ask that is that I had some discrepancies issue at the dataset label level when running in two different environment system. So I wanted send this dataset with its label on it to a third party in order to check the issue, but because of confidentiality, I need make the dataset empty.
Cheers,
saskap
... View more
08-03-2016
05:27 AM
Hi All,
I have a sas dataset that has a label. this label can bee seen when a proc contents is executed.
The data is not empty and I would like to make it empty. I can do it with this code for instance :
data test; set origin;
if _n_=0;
run;
or I can do it a proc sql by using a creat table.. like
The issue is that whtaever the method I use it remove the label of the sas datasets. The proof is when I run a proc contents after on it it disappear.
Can someone, please provide me with method to empty a sas dataset while keeping the description of the sas dataset intact ?
Kind Regards,
saskap
... View more
03-30-2016
09:24 AM
Thanks Jan...Yes off course the reinitialisation of the PDV...! However, why two iteration ? My only explanation would be that the first iteration creates data descripor (compilation section and _n_=1) and that the second iteration only it starts the execution...What do you think ?
... View more
03-30-2016
08:33 AM
Hi !
I would like to understand the logic behind this simple data step.
data test ;
put _all_ ;
input x ;
y = 2 * x ;
cards ;
1
;
In the log it is displayed :
x=. y=. _n_=1
x=. y=. _n_=2
I probably "missing" few details :
1. Why are there 2 iteration ?
2. Is the first iteration done for reading the data descriptor ?
3. Why then at the second iteration (when reading INPUT i guess ) X and Y are still missing ?
Thanks in advance
saskap
... View more
03-29-2016
02:11 PM
Thanks Astounding. I understand better know..Besides, it is looks obvious now why my second code leads to a contiuous loopwhile in my first code not.
saskapa
... View more
03-29-2016
08:43 AM
Hi All,
I don't understand the logic of using the a do until loop in this context.
here is a data:
data ab;
input a b ;
cards;
1 1
1 1
1 2
2 1
2 1
2 2
2 2
;
The following code works fine, it uses a do Until loop before the SET statment :
data out ;
do until (last.a) ;
do until (last.b) ;
set ab ;
by a b ;
end ;
end ;
run ;
it output last.a and last.b.
a b
- -
1 2
2 2
Can someone explain me the difference with this code ? In this code the loop is after the SET statment.
data out ;
set ab ;
by a b ;
do until (last.a) ;
do until (last.b) ; put a= b=;
end ;
end ;
run ;
The loop keeps iterating and stays at value value a=1 and b=1. Why does the loop stuck on those valueand does not iterate to the next records as in the first case above ? And why does the loop in the first case not stuck ?
Thanks in advance
saskapa
... View more
03-22-2016
07:52 AM
Hi,
I would like to import raw data that has multiple observation in a single record. each records start with a identifyer variable. the following example show the data with the sas code i am using. It works fine :
raw data :
1824 1,323.34 2,472.85
1943 1,908.34
2046 1,423.52 1,673.46 3,276.65
2063 2,345.34 2,452.45 3,523.52 2,983.01
data excedata;
infile mydat(excedata.txt) missover;
input id sales : comma. @ ;
do while (sales ne .);
output;
input sales : comma. @;
end;
run;
Howver when I want to use the same coding strucutre for this data I got invalid message in my log
182-04-7814 09FEB99 530 04MAY99 610
302-57-5023 09FEB99 480 04MAY99 530
123-89-8470 09FEB99 560 04MAY99 570 13JUL99 610
152-64-0014 09FEB99 780
813-63-7456 09FEB99 790
data satdat2; infile mydat(satdata2.txt) missover ; input ssn $11. @13 date date7. @21 code 3. @ ; do while (code ne .); output; input date date7. code 3. @ ; end; run;
it says invalide data for code. Any clue ?
Cheers
Skp
... View more
03-07-2016
02:27 PM
1 Like
Thanks @FreelanceReinh!
It does exactly what I want.
Note that the following method seems to work as well :
proc sql;
create table case2 as
select a.id
from a as a inner join b as b
on a.id=b.id
where var1-var2 gt 10
group by a.id
having( count(*) gt 3 );
quit;
I use a where clause, which select only the match that meets the conditin var1-var2 >10.
Cheers
saskap
... View more