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 (August 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 8 Aug 2000 13:48:57 +0200
Reply-To:     Maria Blanke <mblanke@IX.URZ.UNI-HEIDELBERG.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Maria Blanke <mblanke@IX.URZ.UNI-HEIDELBERG.DE>
Organization: University of Heidelberg, Germany
Subject:      macro2
Content-Type: text/plain; charset=iso-8859-1

Hello, can please someone take a look at this macro?

goptions reset=global gunit=pct border ftext=swissb htitle=6 htext=3;

data time; infile 'c:\temp\D.dat' LRECL=705;

input nummer geboren $11-20 datum $33-41 item1 - item53 faktor1 - faktor7 komp1 - komp3;

patient=nummer;

yy=substr(datum, 1,2); my=substr(datum, 3,3); dy=substr(datum, 6,4);

if my = 'JAN' then mmy = .000001; if my = 'FEB' then mmy = .000002; if my = 'MAR' then mmy = .000003; if my = 'APR' then mmy = .000004; if my = 'MAY' then mmy = .000005; if my = 'JUN' then mmy = .000006; if my = 'JUL' then mmy = .000007; if my = 'AUG' then mmy = .000008; if my = 'SEP' then mmy = .000009; if my = 'OCT' then mmy = .000010; if my = 'NOV' then mmy = .000011; if my = 'DEC' then mmy = .000012;

array iitem(53) iitem1-iitem53; array item(53) item1-item53;

do i=1 to 53; iitem(i)=item(i); end;

dy=dy / 10000; Zeit = dy + mmy; Zeit = Zeit * 10000000;

if patient= 1.1 then do; dotime=_N_; end; if patient= 1.2 then do; dotime=_N_; end; if patient= 1.3 then do; dotime=_N_; end; if patient > 3 then do; do i=3 to 10; if patient = i then do; dotime=_N_; end; end; end; if patient= 1.1 then do; first=dotime; Tage=(1+ (Zeit-first)); end; if patient= 1.2 then do; first=dotime; Tage=(1+ (Zeit-first)); end; if patient= 1.3 then do; first=dotime; Tage=(1+ (Zeit-first)); end; if patient > 3 then do; if patient = i then do; first=dotime; Tage=(1+ (Zeit-first)); end; end;

proc standard; var item1-item53 iitem1-iitem53; run; proc sort; by patient Tage; run;

%macro schitt(tt=);

title1 ' Fluctuations Window 7Days'; title2 ' Konfidenzintervall: Patient Nr.'&i 'Item Nr.' &j ; footnote j=c 'blau=Konfidenzintervall grün=std.Itemscore' ;

symbol1 value=dot interpol=join ci=green; symbol2 value=dot interpol=rcclm95 ci=yellow co=blue;

axis1 label=none minor=none offset=(2) ; axis2 order=(-4 to 4 by 1) minor=none /*label=('Score < 10' justify=right '') */ offset=(2) ;

proc Gplot; plot item&j * Tage=1 iitem&j * Tage=2 / haxis=axis1 vaxis=axis2 overlay frame; run; quit; %mend schitt;

%macro Schi(tt=);

data tt; set tt;

call symput('Tage', put(Tage, 3.)); call symput('patient', put(patient, 3.));

%do i=1 %to 10; /*53; *Items */ call symput("item&i", put(item&i, 3.)); call symput("iitem&i", put(iitem&i, 3.)); %end;

proc sort; by patient Tage; run;

data tt; set tt; /*94; *Patienten */ if patient= 1.1 then %do; %schitt(tt=tt); %end;

if patient > 3 then %do i=3 %to 10; %if patient = &i %then %do; %schitt(tt=tt); run; %end; %end; %mend Schi;

data tt; set time; Options MPRINT mlogic symbolgen; %Schi(tt=tt); run;

since it is making:

MPRINT(SCHI): DATA TT; MPRINT(SCHI): SET TT; MPRINT(SCHI): IF PATIENT= 1.1 THEN MLOGIC(SCHITT): Beginning execution. MLOGIC(SCHITT): Parameter TT has value tt NOTE: Line generated by the invoked macro "SCHITT". 276 title1 ' Fluctuations Window 7Days'; title2 ' Konfidenzintervall: Patient Nr.'&i 'Item Nr.' &j ; footnote j=c 'blau=Konfidenzintervall grün=std.Itemscore' ; symbol1 value=dot interpol=join ci=green; symbol2 value=dot interpol=rcclm95 ci=yellow co=blue; ------ 180 MPRINT(SCHITT): TITLE1; SYMBOLGEN: Macro variable I resolves to 11 WARNING: The TITLE statement is ambiguous due to invalid options or unquoted text. WARNING: Apparent symbolic reference J not resolved. MPRINT(SCHITT): TITLE2 ' Konfidenzintervall: Patient Nr.'11 'Item Nr.' &j ; MPRINT(SCHITT): FOOTNOTE j=c 'blau=Konfidenzintervall grün=std.Itemscore' ; MPRINT(SCHITT): SYMBOL1 VALUE=dot interpol=JOIN CI=GREEN; MPRINT(SCHITT): SYMBOL2 VALUE=dot interpol=RCCLM95 CI=YELLOW CO=BLUE; MPRINT(SCHITT): AXIS1 LABEL=NONE MINOR=NONE OFFSET=(2) ; MPRINT(SCHITT): AXIS2 ORDER=(-4 TO 4 BY 1) MINOR=NONE OFFSET=(2) ; NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.TT may be incomplete. When this step was stopped there were 0 observations and 129 variables. WARNING: Data set WORK.TT was not replaced because this step was stopped. NOTE: The DATA statement used 1.28 seconds.

NOTE 137-205: Line generated by the invoked macro "SCHITT". 276 axis1 label=none minor=none offset=(2) ; axis2 order=(-4 to 4 by 1) minor=none offset=(2) ; proc Gplot; plot item&j * Tage=1 iitem&j * Tage=2 / haxis=axis1 vaxis=axis2 overlay frame; run; quit;

-

22 ERROR 180-322: Statement is not valid or it is used out of proper order.

ERROR 22-322: Expecting one of the following: { * NAME }. The statement is being ignored.

Thanks very much for any help.

M. Blanke


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