@RW9 filename was wrong ut there is another issue.....
66 filename myexcel temp;
67 data _null_;
68 file myexcel;
69 set WORK.MYEXCEL end=last;
70 by dataset_name;
71 length statement_str $1000.;
72 if first.dataset_name then do;
73 put 'data ' dataset_name;
74 end;
75 statement_str = 'ATTRIB '|| var_name||' label = "'|| trim(var_label) ||'"';
76 if trim(var_format) ne " " then do;
77 put ' ' statement_str ' format = ' var_format ';';
78 end;
79 else do;
80 put ' ' statement_str ';';
81 end;
82 if last.dataset_name then do;
83 put 'run;';
84 end;
85 run;
NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
76:9
NOTE: Variable var_format is uninitialized.
NOTE: The file MYEXCEL is:
Filename=/tmp/SAS_work95AA00000F92_localhost.localdomain/#LN00313,
Owner Name=sasdemo,Group Name=sas,
Access Permission=-rw-rw-r--,
Last Modified=18Dec2015:17:13:37
NOTE: 31 records were written to the file MYEXCEL.
The minimum record length was 4.
The maximum record length was 78.
NOTE: There were 29 observations read from the data set WORK.MYEXCEL.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.08 seconds
86 %include myexcel;
88 + ATTRIB STUDYID label = "Study Identifier" format = . ;
_ _
22 22
200 76
89 + ATTRIB DOMAIN label = "Domain Abbreviation" format = . ;
_
85
76
90 + ATTRIB USUBJID label = "Unique Subject Identifier" format = . ;
_
85
76
91 + ATTRIB SUBJID label = "Subject Identifier for the Study" format = . ;
_
85
76
92 + ATTRIB SITEID label = "Study Site Identifier" format = . ;
_
85
76
93 + ATTRIB RFSTDTC label = "Subject Reference Start Date/Time" format = . ;
_
85
76
94 + ATTRIB RFENDTC label = "Subject Reference End Date/Time" format = . ;
_
85
76
95 + ATTRIB RFXSTDTC label = "Date/Time of First Study Treatment" format = . ;
_
85
76
96 + ATTRIB RFXENDTC label = "Date/Time of Last Study Treatment" format = . ;
_
85
76
97 + ATTRIB RFICDTC label = "Date/Time of Informed Consent" format = . ;
_
85
76
98 + ATTRIB RFPENDTC label = "Date/Time of End of Participation" format = . ;
_
85
76
99 + ATTRIB DTHDTC label = "Date/Time of Death" format = . ;
_
85
76
100 + ATTRIB DTHFL label = "Subject Death Flag" format = . ;
_
85
76
101 + ATTRIB INVID label = "Investigator Identifier" format = . ;
_
85
76
102 + ATTRIB INVNAM label = "Investigator Name" format = . ;
_
85
76
103 + ATTRIB BRTHDTC label = "Date/Time of Birth" format = . ;
_
85
76
104 + ATTRIB AGE label = "Age" format = . ;
_
85
76
105 + ATTRIB AGEU label = "Age Units" format = . ;
_
85
76
106 + ATTRIB SEX label = "Sex" format = . ;
_
85
76
107 + ATTRIB RACE label = "Race" format = . ;
_
85
76
108 + ATTRIB ETHNIC label = "Ethnicity" format = . ;
_
85
76
109 + ATTRIB ARMCD label = "Planned Arm Code" format = . ;
_
85
76
110 + ATTRIB ARM label = "Description of Planned Arm" format = . ;
_
85
76
111 + ATTRIB ACTARMCD label = "Actual Arm Code" format = . ;
_
85
76
112 + ATTRIB ACTARM label = "Description of Actual Arm" format = . ;
_
85
76
113 + ATTRIB COUNTRY label = "Country" format = . ;
_
85
76
114 + ATTRIB DMDTC label = "Date/Time of Collection" format = . ;
_
85
76
115 + ATTRIB DMDY label = "Study Day of Collection" format = . ;
_
85
76
116 + ATTRIB RACEOTH label = "Race, other" format = . ;
_
85
76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, /, ;, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 76-322: Syntax error, statement will be ignored.
ERROR 85-322: Expecting a format name.