BookmarkSubscribeRSS Feed
Jumboshrimps
Quartz | Level 8

Added a new field to an existing FSEDIT frame.

The only responses are "Y/N".  The variable capturing this response is a 1 char.

How do I restrict responses to  just "Y/N"?

Is it done via code in the SCL, or by limiting the responses in the variable itself, like in other databases?

 

THX.

2 REPLIES 2
Tom
Super User Tom
Super User

It is your choice.  SAS does allow "integrity constraints" to be defined on a dataset (although it did not when PROC FSEDIT was first introduced.)

 

In my opinion if you are going to the trouble of making an FSEDIT screen then put the logic there.  Trying to use constraints on the actual variables is just going to make working with the data much harder for not much gain.

Jumboshrimps
Quartz | Level 8

THX.

 

I see your point.

There is a format library with a $YES/NO format.  I'll try that for now, and see if any complains.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 439 views
  • 0 likes
  • 2 in conversation