I'm trying to create a Time dimension trough a Proc Olap but I have been having a fustrating experience.
The date is stored in my detailed table under the column "Reported_Month". The dates are stored as "01Jul2009", 01Aug2009", etc... I've attached my code and the log with errors.
Where is my code:
dimension Time
hierarchies=(Time)
type=time
;
hierarchy Time
levels=(Year Quarter Month Day)
;
level Year
type=year
column=reported_month
format=year.
;
level Quarter
type=quarters
column=reported_month
format=qtr.
;
level Month
type=months
column=reported_month
format=monname.
;
level Day
type=days
column=reported_month
format=weekdate.
;
Here is the LOG with errors!:
49 dimension Time
50 hierarchies=(Time)
51 type=time
52 ;
53 hierarchy Time
54 levels=(Year Quarter Month Day)
55 ;
56 level Year
57 type=year
58 column=reported_month
______
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, CAPTION, DESC, EMPTY, IGNORE_EMPTY, SORT_ORDER, TYPE.
ERROR 76-322: Syntax error, statement will be ignored.
59 format=year.
60 ;
61 level Quarter
62 type=quarters
63 column=reported_month
______
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, CAPTION, DESC, EMPTY, IGNORE_EMPTY, SORT_ORDER, TYPE.
ERROR 76-322: Syntax error, statement will be ignored.
64 format=qtr.
65 ;
66 level Month
67 type=months
68 column=reported_month
______
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, CAPTION, DESC, EMPTY, IGNORE_EMPTY, SORT_ORDER, TYPE.
ERROR 76-322: Syntax error, statement will be ignored.
69 format=monname.
70 ;
71 level Day
72 type=days
73 column=reported_month
______
22
3 The SAS System 09:38 Wednesday, October 7, 2009
76
ERROR 22-322: Syntax error, expecting one of the following: ;, CAPTION, DESC, EMPTY, IGNORE_EMPTY, SORT_ORDER, TYPE.
ERROR 76-322: Syntax error, statement will be ignored.
74 format=weekdate.
75 ;
76