05-31-2013 04:30 PM
I need to do a date validation to check if the date value entered into a data set is greater than or equal to sysdate.
User would be opening the data set to enter the value. If he is enters a date value less than sysdate, error should pop up.
I am planning to use IC create statements.
Is there any alternate way?
Thanks in advance,
06-02-2013 01:00 AM
In a program segment:
Data _NULL_ ;
Set Dateinput ;
If User_Date < "&Sysdate"D then _ERROR_ ;
This should create an error which you can trap within your process.
06-03-2013 04:30 PM
I am trying to create a template which is to be used by a set of users. They would be entering the date by opening the data set. I am trying to pop up an error message in case the date value entered is less than sysdate. I believe the above code holds good when the input is read from a particular data set. Do you see any alternate ways of enforcing this constraint.
Thanks in advance,
06-03-2013 04:43 PM
I may be highly mistaken, but I don't think SAS EG is designed to input data in such a way.
SAS/AF is the way to create input information.
You can validate information after it's been entered, or if was selection in a drop down for a query, but to validate data as its entered sounds a little beyond its control.
06-03-2013 05:34 PM
How do you enable a user to be able to open the data set and edit in EG though? This is the part I don't understand. Do you have a customized task? Does the dataset get updated or is it overwritten?
06-03-2013 05:54 PM
Interesting, definitely not a use I've heard of before. I'd be curious to hear how it works out down the road.
I guess my suggested work around would have been a input mechanism through Microsoft ACCESS, where a copy of the tables are accessed via ACCESS and then used to update the source tables. Rules can be implemented in Access rather than SAS. You can do a similar process through EG.