BookmarkSubscribeRSS Feed
xyxu
Quartz | Level 8

Hi,

 

It is quite weired but I indeed encountered this.

I tried to merge two datasets and I was pretty sure they are many same values for  all "by" variables. However, I got 0 oberservations when I specify "if a and b". Why does it happen?

____________________________________________________________________________________________________________

 

 

Hi all,

 

Thanks for replying. Now I am pretty sure the problem is from importing CSV data. Could anyone make a code to properly import the data into SAS? You might download "2012 Q1" from the following link:

 

https://www.sec.gov/opa/data/market-structure/market-structure-data-security-and-exchange.html

 

 

To be specific, variables "date" should be a yymmdd8. variable, "Security" and "ticker" should be characters, and the rest should be all numerics. I tried different ways, but all give me either missing values, or log ouput like the following when later:

 

ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
ERROR: There was a problem with the format so BEST. was used.
 

4 REPLIES 4
Patrick
Opal | Level 21

@xyxu

Generic answer: Your condition in the subsetting IF statement is highly likely never TRUE.

 

Please post at a minimum your code so we have something to work with.

Reeza
Super User

@xyxu wrote:

I was pretty sure they are many same values for  all "by" variables. 


They look the same but aren't for some reason, variable length or case (upper/lower) are examples. 

ChrisNZ
Tourmaline | Level 20

Just checking: you use a MERGE statement and not a SET statement, right?

Kurt_Bremser
Super User

Post:

- the code

- the log

- example data that illustrates your issue; do so in data steps generated with the macro from https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat..., so we can easily recreate your datasets with all attributes as they are.

 

Without that supplemental information, every suggestion will just be guesswork and mostly useless for you.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 1069 views
  • 0 likes
  • 5 in conversation