SAS isn't so good at resolving external errors. Could be lack of disk space, could be network connectivity glitches.
I've found in the past that if this keeps happening, it's worth working on your local disk, then copying the data across using file system tools (ie doing it through your OS or a...
Worth checking out Proc Compare. I've used it a couple of times to check and it's a little unwieldy, but can simply compare ever value in ever record between the 2 datasets.
Chris.
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
What are you actually trying to do?
Your If... then.. construction seems wrong, looks more like a CASE statement construction from SQL.
Chris.
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
I haven't done this in a long time, however, it's worth looking at Picture Formats in the documentation. IT contains full instructions on how to create your own format. You should be able to construct a format for your date which does what you need.
If you have trouble, post back and I'll see...
Have you looked at the source file using a text editor that can show hex?
I've had problems like this in the past where an "empty" record actually has an end of file character (Hex value 1A).
In fact, I think mine was embedded in a text field. (end of file is also CTRL+Z so I suspect that it was...
How would this look:-
PROC TABULATE DATA=AODADNLD FORMAT=COMMA10.
TITLE 'TESTING CLIENT CHARACTERISTICS';
CLASS RPUNITCD CLTCHAR;
TABLE RPUNITCD*CLTCHAR, N;
RUN;
What is "Midnme"? IT's not mentioned in your code...
Chris
Business Analyst, Code Monkey...
Try XML, that might work, Excel can read XML.
What is SAS actually running on? Are you remote submitting code to a Unix system via EG? You should just be able to right click on the data, select "Send To" and then "Microsoft Excel". If you can't do that, then it's likely your SAS Server...
I intitially wrote that you'd need to do it in 2 steps however you can do it in 1.
create a new query on the start dataset, select the columns you want summed and in the summary column change "None" to "SUM".
Then click on the computed columns button > New > Build Expression...
When it asks...
Sorry, I've not done any work with SAS/AF. You might want to try the L-SAS forum, there's at least 1 guy there who knows SAS/AF. I remember him well as he was a complete a55hat. He does however seem to have an in depth knowledge of SAS/AF.
Good luck.
Chris
Business Analyst, Code Monkey...
Alternatively to keep this in native SAS:-
proc summary data=dset nway;
class ID;
var x;
output out=new_dset(drop=_type_) sum=;
run;
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
Not that I'm aware of. The only thing I could think of is to right the value to a macro variable, then use that in the title.
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
Hi Asender,
The problem here is the SCOPE of the macro variable. Macro variables by default are local in scope, they will exist within the current macro, but not outside it.
Insert this line:-
%GLOBAL EMAIL;
At the start of your program and it'll work just fine after that.
I'd recommend...
Just realised there is a line of code missing fromt he end of my code snippet there.
You'll also want
else remainder = some_string;
otherwise it'll be empty if there's no parentheses in your original text string. :)
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
try this.
proc sort data=a;
by id fac start_dt start_tm stop_tm;
run;
data b(drop=start_tm start_dt);
set a;
by id fac;
retain start_date start_time;
if first.fac then
do;
start_date = start_dt;
start_time = start_tm;
end;
if last.fac then
do;
stop_date =...
Ooooh, I did something like this a while ago to remove strings inside parentheses from the middle of a bigger string. You obviously don't need this as Dave's method worked for you, but for completeness (and I like showing off my code) here's my method.
if indexc(some_string,'(') > 0 and...
That first bit doesn't look like regular SAS code to me, what is that?
Have you tried putting the FTP part after the e-mail part?
Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
Hi Lulumohca,
this was a fun little brain teaser.
I've got it I think pretty much all the way there, but I'm not sure of exactly what date you want returned.
Tyr running the code below and have a play with the results to tweak it to fit your requirements.
I've made an assumption concerning...
Hi Apoc,
This is a problem you'll no doubt stumble over many times, it's a problem that's plagued me for years. As far as I can tell, there's no way to overcome this in SAS.
My method for dealing with this is to use a smart text editor (such as VEdit) to strip these characters out.
Generally...
Fair enough.
You know, if you had another variable on the dataset which linked the groups (ie was common for the first 3 values, then for the second 3 etc), the answer to this would be trivial.
I'll admit I'm having trouble following what your code is doing, I'm not big on arrays and creative...
There's an example of how to do this on the documentation for PWENCODE.
Looks like you have to write it out to a file, then read that file in and put the read in data into a macro variable.
filename pwfile 'external-filename';
options symbolgen;
data _null_;
infile pwfile obs=1 length=l...
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.