Reeza - Thank you for the response. This is my first time posting in the SAS community and am not sure what is too much and not enough. Below the Log I also posted the full query
proc sql;
36 create table Inactive_DFS as
37 Select
38 'Licensee Name'n,
39 'License Number'n,
40 input('Appointment Effective Date'n, anydtdte10.) AS 'Appointment Effective Date'n FORMAT=DATE9.,
41 input('Appointment Expiration Date'n, anydtdte10.) AS 'Appointment Expiration Date'n FORMAT=DATE9.,
42 input('Appointment Status Date'n, anydtdte10.) AS 'Appointment Status Date'n FORMAT=DATE9.,
43 'Appointing Entity Number'n,
44 'Appointment TYCL number'n,
45 NPN Number,
______
22
46 intck('month', input('Appointment Effective Date'n, anydtdte10.), input('Appointment Expiration Date'n, anydtdte10.))
_ _ _
79 79 79
200 200
46 ! as month_dif,
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, '.', /, <, <=, <>, =, >, >=, ?, AND, AS,
CONTAINS, EQ, EQT, FROM, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=.
ERROR 79-322: Expecting a ).
ERROR 200-322: The symbol is not recognized and will be ignored.
47
48 case
49 when calculated month_dif lt 36 then "Presumed Correct"
____
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', '.', ANSIMISS, AS, CROSS, EXCEPT, FULL, GROUP,
HAVING, INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE.
ERROR 76-322: Syntax error, statement will be ignored.
50 when calculated month_dif ge 37 then "Create New Start Date"
51 end as 'new_start_dt_id_1'n,
52 case
53 when calculated month_dif ge 37 then intnx('month', 'Appointment Expiration Date'n, -24, 's')
54 end as 'new_start_dt'n format=date9.,
55 case
56 when calculated 'new_start_dt'n ge today() then "Unknown"
57 else "" end as 'future_dt_id'n
58
59 From INACTIVE_06020_05687_87022_33461
60 where NPN Number in (&NATL_PDCR_NB.)
61 ;
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
62 Quit;
NOTE: The SAS System stopped processing this step b
proc sql;
create table Inactive_DFS as
Select
'Licensee Name'n,
'License Number'n,
input('Appointment Effective Date'n, anydtdte10.) AS 'Appointment Effective Date'n FORMAT=DATE9.,
input('Appointment Expiration Date'n, anydtdte10.) AS 'Appointment Expiration Date'n FORMAT=DATE9.,
input('Appointment Status Date'n, anydtdte10.) AS 'Appointment Status Date'n FORMAT=DATE9.,
'Appointing Entity Number'n,
'Appointment TYCL number'n,
NPN Number,
intck('month', input('Appointment Effective Date'n, anydtdte10.), input('Appointment Expiration Date'n, anydtdte10.)) as month_dif,
case
when calculated month_dif lt 36 then "Presumed Correct"
when calculated month_dif ge 37 then "Create New Start Date"
end as 'new_start_dt_id_1'n,
case
when calculated month_dif ge 37 then intnx('month', 'Appointment Expiration Date'n, -24, 's')
end as 'new_start_dt'n format=date9.,
case
when calculated 'new_start_dt'n ge today() then "Unknown"
else "" end as 'future_dt_id'n
From INACTIVE_06020_05687_87022_33461
where NPN Number in (&NATL_PDCR_NB.)
;
Quit;