dataset constraints

Accepted Solution Solved
Reply
Contributor kds
Contributor
Posts: 31
Accepted Solution

dataset constraints

 

Hi,

while defining constraints on dataset columns, like

proc datasets;

     modify datasetname;

     ic create i_reqd = check(where=(reqd in ('YES','NO'))) message = "Valid values for variable REQD are either 'YES' or 'NO'.";

quit;

The above defined constraint allows only YES & NO (uppercase values). how can I make it case insensitive.??.. that is user shd be able to enter (yes , no, YES, NO,Yes,No yEs,nO)


Accepted Solutions
Solution
‎11-09-2012 01:20 PM
PROC Star
Posts: 7,363

Re: dataset constraints

Can't you just include the upcase function?  e.g.,

    ic create i_reqd = check(where=(upcase(reqd) in ('YES','NO'))) message = "Valid values for variable REQD are either 'YES' or 'NO'.";

View solution in original post


All Replies
Solution
‎11-09-2012 01:20 PM
PROC Star
Posts: 7,363

Re: dataset constraints

Can't you just include the upcase function?  e.g.,

    ic create i_reqd = check(where=(upcase(reqd) in ('YES','NO'))) message = "Valid values for variable REQD are either 'YES' or 'NO'.";

Contributor kds
Contributor
Posts: 31

Re: dataset constraints

Yes , upcase is working...  Thanks Arthur  , you are Great!!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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