LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 16 Jul 2004 16:02:56 -0700
Reply-To:     David Fickbohm <DavidF@HOMEGAIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         David Fickbohm <DavidF@HOMEGAIN.COM>
Subject:      TIMESTAMP Macro Works except in ODS and Email
Content-Type: text/plain; charset="iso-8859-1"

People, With the kind help of several people in this group I managed to create a macro that creates a timestamp and got it into a macro library. It works wonderfully except when I try to use it in ODS or email. Your thoughts would be greatly appreciated. An example of successful and unsuccessful code is attached.

NOTE: SAS initialization used: real time 0.98 seconds cpu time 0.82 seconds

1 OPTIONS LS =79 PS = 68 FORMCHAR = " " LNOTES MERROR SERROR SYMBOLGEN 2 MPRINT MLOGIC MTRACE MSTORED SASMSTORE = SMACROLB MAUTOSOURCE 2 ! SASAUTOS=(SASAUTOS SMARCO) ; 3 4 %let entry_id_one = 4466; 5 %LET ENTRY_ID_TWO = 4467; 6 %LET ENTRY_ID_TRE = 4468; 7 %LET ENTRY_ID_FOR = 4469; 8 %LET ENTRY_ID_FIV = 4470; 9 %let start_dt = 01APR04; 10 %let affname = SEO_BERNT_CARL_HANSEN ; 11 LIBNAME SMACROLB "S:\DM\sasmacrolib"; NOTE: Libref SMACROLB was successfully assigned as follows: Engine: V8 Physical Name: S:\DM\sasmacrolib 12 libname davehold "S:\DM\davef\ALL_LEADS"; NOTE: Libref DAVEHOLD was successfully assigned as follows: Engine: V8 Physical Name: S:\DM\davef\ALL_LEADS

13 PROC EXPORT DATA=DAVEHOLD.PROFILES 14 OUTFILE= "S:\dm\davef\ALL_lEADS\ALL_TEST_%TIMESTAMP.xls" MLOGIC(TIMESTAMP): Beginning execution. MLOGIC(TIMESTAMP): Ending execution. 15 DBMS = excel2000 REPLACE; NOTE: S:\dm\davef\ALL_lEADS\ALL_TEST_20040716T155834.xls was successfully created. NOTE: PROCEDURE EXPORT used: real time 0.89 seconds cpu time 0.20 seconds

16 RUN; 17 PROC SORT DATA = DAVEHOLD.PROFILES; BY D_ENTRY_ID; RUN;

NOTE: Input data set is already sorted, no sorting done. NOTE: PROCEDURE SORT used: real time 0.04 seconds cpu time 0.00 seconds

18 ODS HTML FILE = "S:\DM\DAVEF\ALL_LEADS\ALL_test_%timestamp.XLS"; MLOGIC(TIMESTAMP): Beginning execution. NOTE 141-205: SCL source line. 18 ODS HTML FILE = "S:\DM\DAVEF\ALL_LEADS\ALL_test_%timestamp.XLS"; - 22 ERROR 22-322: Syntax error, expecting one of the following: ;, (, ANCHOR, ARCHIVE, ATTRIBUTES, BASE, BODY, CHARSET, CLOSE, CODE, CONTENTS, CSS, ENCODING, FILE, FRAME, GFOOTNOTE, GPATH, GTITLE, HEADTEXT, METATEXT, NEWFILE, NOGFOOTNOTE, NOGTITLE, PAGE, PARAMETERS, PATH, RECORD_SEPARATOR, STYLE, STYLESHEET, TRANTAB.

NOTE: SCL source line. 18 ODS HTML FILE = "S:\DM\DAVEF\ALL_LEADS\ALL_test_%timestamp.XLS"; --- 202 ERROR 202-322: The option or parameter is not recognized and will be ignored.

MLOGIC(TIMESTAMP): Ending execution. 19 PROC PRINT DATA = DAVEHOLD.PROFILES; 20 BY D_ENTRY_ID; 21 TITLE "LEAD REPORT BY ENTRY ID"; 22 TITLE1 "PRODUCED JULY 15, 2004"; 23 VAR D_NAME 24 D_PROPERTY_ID D_UID 25 LEAD_TYPE D_ROLES 26 D_EMAIL 27 D_FIRST_NAME D_LAST_NAME 28 D_STREET_NUMBER D_STREET_NAME D_UNIT_NUMBER 29 D_CITY D_STATE D_ZIP_CODE 30 D_EXPECTED_PRICE D_EXPECTED_DATE 31 PROFILE_DT D_ENTRY_ID D_COMMENTS; 32 RUN;

WARNING: Data too long for column "D_ROLES"; truncated to 75 characters to fit. WARNING: Data too long for column "D_EMAIL"; truncated to 75 characters to fit. WARNING: Data too long for column "D_COMMENTS"; truncated to 75 characters to fit. WARNING: Data too long for column "D_ROLES"; truncated to 75 characters to fit. WARNING: Data too long for column "D_EMAIL"; truncated to 75 characters to fit. WARNING: Data too long for column "D_COMMENTS"; truncated to 75 characters to fit. NOTE: The above message was for the following by-group: D_ENTRY_ID=4470 WARNING: Data too long for column "D_ROLES"; truncated to 75 characters to fit. WARNING: Data too long for column "D_EMAIL"; truncated to 75 characters to fit. WARNING: Data too long for column "D_COMMENTS"; truncated to 75 characters to fit. NOTE: There were 114 observations read from the data set DAVEHOLD.PROFILES. NOTE: PROCEDURE PRINT used: real time 0.17 seconds cpu time 0.04 seconds

33 ODS HTML CLOSE; 34 RUN; 35 ods listing; 36 37 filename myfile email EMailid = "MS Exchange Settings" 38 to= ("davidf@homegain.com") SYMBOLGEN: Macro variable SYSDATE resolves to 16JUL04 39 subject= "Daily Lead Report HG1000 as of &sysdate." 40 type="text/plain" MLOGIC(TIMESTAMP): Beginning execution. 41 attach=( "s:\dm\davef\all_leads\all_test_%timestamp.xls"); MLOGIC(TIMESTAMP): Ending execution. 42 run; 43 quit; 44 ods listing; 45 46 data _null_; 47 file myfile; 48 put "Here is A TEST "; 49 Put " "; 50 put "Thanks,"; 51 put "Dave"; 52 run;

NOTE: The file MYFILE is: E-Mail Access Device

ERROR: Unable to access E-mail attachments. NOTE: The SAS System stopped processing this step because of errors. NOTE: DATA statement used: real time 2.79 seconds cpu time 0.04 seconds

53 quit;

Dave Fickbohm Data Mining Analyst Homegain+ 2450 45th St. Emeryville, CA, 94608 Phone 510 655 0800 ext 4151


Back to: Top of message | Previous page | Main SAS-L page