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

Hello team,

What does format find $15. mean in SAS?

Please advise me.

Regards,

blue blue

Blue Blue
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User
format find $15.;

This is a FORMAT Statement, and it assigns the $15. format to the variable find.

If this variable is not present in any of the input datasets, it will be defined as character with a length of 15.

If the goal is to actually define the variable as mentioned above, a LENGTH statement would be more appropriate.

View solution in original post

6 REPLIES 6
Reeza
Super User
Did you try looking it up in the documentation? What did it say?
GN0001
Barite | Level 11

Hello team,

I searched for it and I couldn't find it.

 

Regards,

blueblue

Blue Blue
Kurt_Bremser
Super User

If a word appears at the beginning of a data step statement without a following equal sign, then it has to be a Data Step Statement.

Bookmark the link, and use it as a starting point for similar inquiries.

GN0001
Barite | Level 11

 

data out.mydata;
merge thisdata(in=a) thatdata(in=b);
by hkey;
format find $15.;
if a and b then Find = 'Both';
if a and not b then Find = 'not_in_thisdata'
if a then output;
run;
Blue Blue
Kurt_Bremser
Super User
format find $15.;

This is a FORMAT Statement, and it assigns the $15. format to the variable find.

If this variable is not present in any of the input datasets, it will be defined as character with a length of 15.

If the goal is to actually define the variable as mentioned above, a LENGTH statement would be more appropriate.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 6 replies
  • 2018 views
  • 5 likes
  • 3 in conversation