Greetings Everyone!
I have the following problem:
- I have created an job in SAS DI which receives two parameters of type Date
- The job uses many times components such Extract to filter SAS Datasets. In order to filter the SAS Dataset the following construct in the where clause is used "<start_date>"d
- The field used in the filter is of type Numeric with format Date9.
- When I try to add the following job in a Loop that contains a control table with numeric dates of type DATE9. it simply presents me the following error:
ERROR: Invalid date/time/datetime constant "21914"d.
It seems that the parameter is read, but in the extract component is read as numeric.
To tackle the previous workaround I have tried the following solutions:
- Add the below line in the precode section of the job with the parameters. The following did not work (see the code below - Example 1)
- Use the sysfunc as illustrated in the example 2
/*Example 1*/
data _null_;
call symputx('business_load_from', put(business_load_from, date9.));
call symputx('business_load_to', put(business_load_to, date9.));
run;
Example 2
%let date = %sysfunc(&business_load_from, date9.);
%put &date.;
Does anyone has faced the aforementioned problem?
Any recommendations are welcome.
Best Regards,
Vasileios