BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

It's so WEIRD !

 

I start my SAS session with the lines below every time I visit this particular project. 

 

data a; set z.have;
if seer_site_group in ('21100') and sequence_number in ('00','01') then output;
if county in ('005','047','061','081','085') then delete;
run;

 

If any idea, please let me know. It used to work before. Coz I run this particular lines hundreds of times before which starts with  48353 to output 29852 observations. 

 

Below is the error in the log:

 

NOTE: Data file Z.REG_PANCREAS.DATA is in a format that is native to another host, or the file
encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.
119 if seer_site_group in ('21100') and sequence_number in ('00','01') then output;
120 if county in ('005','047','061','081','085') then delete;
121 run;

NOTE: There were 48353 observations read from the data set Z.REG_PANCREAS.
NOTE: The data set WORK.A has 48353 observations and 84 variables.
NOTE: DATA statement used (Total process time):
real time 0.20 seconds
cpu time 0.17 seconds

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

Can you try this change-

 

data a; set z.have;
if seer_site_group in ('21100') and sequence_number in ('00','01') then output;
where county not in ('005','047','061','081','085') ;
run;

View solution in original post

12 REPLIES 12
ballardw
Super User

That is not an error. It is just letting you know that some content may have an issue or perform degradation due to extra processing needed.

 

If you are sharing data with someone else, or receiving SAS data sets in sas7bdat form and never had that message before it means that someone else is making the data sets in a somewhat different environment then your current SAS install. Or possibly someone else appended data to a set.

 

Encoding refers to how various character sets are stored/displayed. You might want to hit the online help and search encoding for more details.

Cruise
Ammonite | Level 13

I rebooted my computer, shuffled the codes around a lot. No success. same data is output with no reductions in N. 

Reeza
Super User

It means those conditions are not met for some reason. 

 

Run a PROC FREQ on the those variables and check your values.

Secondly, run a PROC FREQ and check on those values, wiht them formatted as hex codes. If you see 20 or 0A at the end or front you have embedded tabs or EOL characters which is why a straight text match will not work.

 

 

Cruise
Ammonite | Level 13

@ballardw, Neither sharing this data nor receiving in sas7bdat. I'm the only author to this data. Last time I ran these lines before noon. My hard drive was in my bag 🙂

novinosrin
Tourmaline | Level 20

Can you try this change-

 

data a; set z.have;
if seer_site_group in ('21100') and sequence_number in ('00','01') then output;
where county not in ('005','047','061','081','085') ;
run;

Cruise
Ammonite | Level 13

@novinosrin

NOTE: There were 29688 observations read from the data set Z.REG_PANCREAS.
WHERE county not in ('005', '047', '061', '081', '085');
NOTE: The data set WORK.A has 29688 observations and 84 variables.
NOTE: DATA statement used (Total process time):
real time 0.27 seconds
cpu time 0.23 seconds

 

Why? What happened?

novinosrin
Tourmaline | Level 20

Just right way to program the statements . So if that worked out, i am happy. I got to catch the train soon. I hope you have fun:)

Cruise
Ammonite | Level 13

Now this worked out. I changed the order of lines. 

 

data z.correct; /*N=29,688*/ set z.have /N=48,353/
if county in ('005','047','061','081','085') then delete;
if seer_site_group in ('21100') and sequence_number in ('00','01') then output;
run;

novinosrin
Tourmaline | Level 20

Great!

Tom
Super User Tom
Super User

There is a big difference between:

if x then output;
if y then delete;

and

if y then delete;
if x then output;

 

It does no good to "delete" on observation after you have already written it to disk.

In reality all the DELETE statement does is a RETURN. That is it just stops this iteration and immediately starts the next iteration.

 

It might make more sense to code it this way

if x  and (not y) then output;

Or 

 

if (not x) or y then delete;
Cruise
Ammonite | Level 13
Thanks a lot!
Cruise
Ammonite | Level 13

I still don't understand why i had no problem before but now. Anyways, glad it worked out anyhow. Thanks everybody. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 12 replies
  • 1851 views
  • 3 likes
  • 5 in conversation