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 (June 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 4 Jun 2001 11:08:05 -0400
Reply-To:     Paula Runk <prunk@JSR.CC.VA.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paula Runk <prunk@JSR.CC.VA.US>
Subject:      ODS,HTML problem with nested macro
Content-Type: multipart/alternative;

Hello fellow SAS-L colleagues.

I just started using SASv8.1under Windows 98 less than a week ago. I have a program that produces questionnaire results by curriculum. The code contains a nested macro; the outer macro controls processing by curriculum and the inner macros process results for questions 1-20. So my output is arranged by curriculum, for example, all results for questions 1-20 for the Business Administration program, then all results for Engineering etc. This program works fine in PC-SAS V6.1

I've added HTML code so the results could be posted to our website. The problem is I'm only getting HTML output results for the LAST curriculum processed instead of all of the curriculums. In the output file all curriculums have output but not in the HTML output file. It appears I'm writing over the HTML output file each time a new curriculum is processed instead of appending to the file. I've tried moving the ODS CLOSE statement around but it doesn't make any difference. I've searched the SAS website and Charles Patridge's website but can't find anything posted that is similar to this situation. I also have Lauren Haworth's new book on ODS which helped get me started (Thanks Lauren) but now I need even more help from you all.

I've included the code from the last question on the survey (q.20) and the outer macro that controls curriculum (a la Art Carpenter).

%MACRO GFU20 (QVAR, QFMT, QTITLE2);

PROC TABULATE DATA = &DSOUT FORMAT=6.0; CLASS &QVAR; TABLE &QVAR=' '*(N PCTN<&QVAR>='%'*F=6.1) / RTS=15; FORMAT &QVAR &QFMT.; TITLE1 "<FONT SIZE=4>Results for &PROGRAM </FONT>"; TITLE2 "<FONT SIZE=4>&QTITLE2</FONT>" ; TITLE3 ' '; RUN;

%MEND GFU20;

%GFU20(Q20A,YNFMT.,Q20. May we have your permission to send a questionnaire to your employer?);

ODS HTML CLOSE;

***********************************************************************************************;

%MEND READNEW;

%MACRO DOIT; %READNEW(DSOUT=PGM213,DSIN=IF AWARD=213,PROGRAM=Business Administration AS) %READNEW(DSOUT=PGM831,DSIN=IF AWARD=831,PROGRAM=Engineering AS) %READNEW(DSOUT=PGM648,DSIN=IF AWARD=648,PROGRAM=Liberal Arts AA) %READNEW(DSOUT=PGM880,DSIN=IF AWARD=880,PROGRAM=Science AS) %READNEW(DSOUT=PGM882,DSIN=IF AWARD=882,PROGRAM=Social Science AS)

%MEND DOIT;

%DOIT; RUN;

;

Any ideas, thanking you in advance


[text/html]


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