
yesterday
ChrisNZ
Tourmaline | Level 20
Member since
06-23-2011
- 6,979 Posts
- 1,869 Likes Given
- 649 Solutions
- 2,748 Likes Received
-
Latest posts by ChrisNZ
Subject Views Posted 111 yesterday 592 2 weeks ago 158 2 weeks ago 324 2 weeks ago 244 2 weeks ago 324 2 weeks ago 357 2 weeks ago 557 2 weeks ago 566 2 weeks ago 992 3 weeks ago -
Activity Feed for ChrisNZ
- Liked Re: Is there a SASFUNC function similar to SASNAME/NVALID? If not, how could it be implemented in FC for FreelanceReinh. yesterday
- Posted Re: How to upload a file - Create table - API https://*****.com.au on Developers. yesterday
- Got a Like for Re: Changing textsize for specific values in proc sgplot SG Annotation Function. a week ago
- Got a Like for Re: Financial Management Studio doesn't show any data anymore and error message is thrown out. a week ago
- Got a Like for Re: Changing textsize for specific values in proc sgplot SG Annotation Function. a week ago
- Got a Like for Re: Image in title statement not inserting in PDF after password protection (ODS PDF). 2 weeks ago
- Posted Re: check non ascii characters on SAS Programming. 2 weeks ago
- Liked Re: check non ascii characters for Ksharp. 2 weeks ago
- Posted Re: Changing textsize for specific values in proc sgplot SG Annotation Function on SAS Programming. 2 weeks ago
- Posted Re: Image in title statement not inserting in PDF after password protection (ODS PDF) on SAS Programming. 2 weeks ago
- Posted Re: VS Code for SAS 9.4 Extension on SAS Studio. 2 weeks ago
- Posted Re: Financial Management Studio doesn't show any data anymore and error message is thrown out on Developers. 2 weeks ago
- Posted Re: Financial Management Studio doesn't show any data anymore and error message is thrown out on Developers. 2 weeks ago
- Got a Like for Re: Finding observation difference in two separate datasets. 2 weeks ago
- Posted Re: Finding observation difference in two separate datasets on SAS Programming. 2 weeks ago
- Posted Re: Finding observation difference in two separate datasets on SAS Programming. 2 weeks ago
- Posted Re: PROC FCMP w.d. format issue on SAS Procedures. 3 weeks ago
- Got a Like for Re: Writing data to from SAS to BigQuery very slow. 3 weeks ago
- Got a Like for Re: Writing data to from SAS to BigQuery very slow. 3 weeks ago
- Posted Re: Writing data to from SAS to BigQuery very slow on SAS Procedures. 3 weeks ago
-
-
My Liked Posts
Subject Likes Posted 1 2 weeks ago 3 2 weeks ago 1 2 weeks ago 2 2 weeks ago 3 3 weeks ago -
My Library Contributions
Subject Likes Author Latest Post 2 1 3 14 3
yesterday
Before trying to upload you should check that you can connect to https://*****.com.au from Python.
Can you?
... View more
2 weeks ago
What @Ksharp describes is the easiest way.
No need to use a convoluted logic that's hard to maintain.
One line of code does the job.
Use prxchange() instead of prxmatch() if you want to retain a list of the non-ASCII characters.
... View more
2 weeks ago
3 Likes
The attribute textsize is available for data set sganno= but not for data set dattrmap= .
See
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p1d3djir0t86nxn1l10ig8b2jbnl.htm
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/grstatproc/n18szqcwir8q2nn10od9hhdh2ksj.htm
So you need to overwrite the axis labels using the SG Annotation Function if you really want a different font size. That's done with something like
data ANNO;
DRAWSPACE='datavalue'; X1=0.25; Y1=3; FUNCTION='text'; TEXTSIZE=9; LABEL='Study 3'; output;
run;
Set the axis labels to colour white.
... View more
2 weeks ago
1 Like
Your SAS system administrator should be able to contact them. Otherwise, email s u p p o r t a t s a s d o t c o m.
... View more
2 weeks ago
If you want to use the observation order and don't care about duplicates, here is another way to flag non-common observations:
proc sort data=A out=ASORTED;
by _ALL_;
run;
proc sort data=B out=BSORTED;
by _ALL_;
run;
data WANT;
merge ASORTED(in=A)
BSORTED(in=B);
by _ALL_;
if A & ^B then src='In A only';
else if ^A & B then src='In B only';
else delete;
run;
... View more
2 weeks ago
2 Likes
I know the total excluded is 5,000 from simple math but I'm a bit stuck on how we can do this in a SAS code.
You don't know that. Maybe there are duplicates, or unique observations in both data sets.
Never make assumptions about your data quality, and always check for all possible defects.
Assuming you won't rely on the observation order, here is one way:
data A;
X=1; output;
X=1; output;
X=2; output;
X=2; output;
run;
data B;
X=2; output;
X=3; output;
run;
proc sql;
create table WANT as
select 'In A only' as SRC, *
from (select * from A
except all
select * from B )
union all
select 'In B only' as SRC, *
from (select * from B
except all
select * from A );
quit;
This results in:
SRC
X
In A only
1
In A only
1
In A only
2 *
In B only
3
* The all keyword in except does not suppress duplicate rows, hence why the second X=2 observation is flagged by the code above.
Same thing for keeping both X=1 observations, thanks to union all .
See https://documentation.sas.com/doc/en/sqlproc/3.2/n0vo2lglyrnexwn14emi8m0jqvrj.htm
Depending on what you want, you could also use a variation of
proc sql;
create table WANT as
select *
from A
union all
select *
from B
except
(select * from A
intersect
select * from B );
quit;
... View more
3 weeks ago
This is never true?
IF lx>len THEN PUT "WARN&ING: LENGTH value too small to correctly print value"; /* Get length of integer part of value to check against planned len, issue warn if too great */
sig=3 lx=8 len=9
a=123456789012.34
b=1.23E11
... View more
01-31-2025
09:03 PM
3 Likes
Have you seen this page?
https://communities.sas.com/t5/ODS-and-Base-Reporting/Get-SUBJECT-id-to-show-on-each-page-of-a-listing-when-a-subjects/td-p/921637
You need to use the TAGSETS.RTF destination rather than RTF, and the SPANROWS option in PROC REPORT.
These almost-but-not-quite-redundant ODS destinations are anything but clear tbh.
... View more
01-30-2025
05:23 PM
1 Like
The input function only reads what it needs.
data EXAMPLE;
STR = '31.12.1970 00:00:00';
DATE = input(STRING, ddmmyy10.);
putlog DATE= date9.;
run;
DATE=31DEC1970
... View more
01-29-2025
07:14 AM
4 Likes
The value of a variable is only reset to missing in the data step's PDV at the start of a data step if
- it is not a data set variable, and
- it is not a retained variable (RETAIN statement or increment syntax).
The value of a data set variable is refreshed in the PDV when a value is read from the data set.
When none of these condition are true (data set variable, but no value read for the data set), the value in the PDV remains unchanged.
People who don't know that have not been trained properly. Not blaming them, it's very common unfortunately.
The PDV logic also explains why a Cartesian product does not take place when merging data sets in a data step.
I'll take the opportunity to complain again that the message
NOTE: MERGE statement has more than one data set with repeats of BY values.
should never have been a note, and should now be customisable to a WARNING or an ERROR, with an option similar to these:
DKRICOND=ERROR Specifies the error level to report when a variable is missing from an input data set during the processing of a
DROP=, KEEP=, or RENAME= data set option.
DKROCOND=WARN Specifies the error level to report when a variable is missing from an output data set during the processing of
a DROP=, KEEP=, or RENAME= data set option.
... View more
01-29-2025
06:30 AM
4 Likes
Use a slash to change a password.
data T1(pw=R);
A=1;
run;
proc datasets nolist ;
modify T1(write=R/W alter=R/A read=R/RR);
run;
quit;
proc print data=T1(read=RR);
run;
... View more