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 (February 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 19 Feb 2004 12:08:06 -0800
Reply-To:     Helen <sunchunkui@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Helen <sunchunkui@HOTMAIL.COM>
Organization: http://groups.google.com
Subject:      Pointer line control problem
Content-Type: text/plain; charset=ISO-8859-1

Dear SAS-L,

I have a macro to do some report output and have line pointer control problem like the following(seems numeric-variable doesn't work):

1---the follwing codes works,and output like: column1 line1 column2 line1 column1 line2 column2 line2 column1 line3

filename out 'c:\temp\wrap test.txt';

data _null_; file out print ; /* do index=1 to 10; col='column1 line'||trim(put(index,2.)); put #index @1 col @; end;

do index=1 to 5; col='column2 line'||trim(put(index,2.)); put #index @30 col @; end;*/

index=1; put #1 @1 'column1 line1' @; index=2; put #2 @1 'column1 line2' @; index=3; put #3 @1 'column1 line3' @; index=1; put #1 @30 'column2 line1' @; index=2; put #2 @30 'column2 line2' @;

put; run;

2--When use 'index' variable ,it didn't work and result like the following: column1 line1 column1 line2 column1 line3 column2 line1 column2 line2

filename out 'c:\temp\wrap test.txt';

data _null_; file out print ; /* do index=1 to 10; col='column1 line'||trim(put(index,2.)); put #index @1 col @; end;

do index=1 to 5; col='column2 line'||trim(put(index,2.)); put #index @30 col @; end;*/

/* index=1; put #1 @1 'column1 line1' @; index=2; put #2 @1 'column1 line2' @; index=3; put #3 @1 'column1 line3' @; index=1; put #1 @30 'column2 line1' @; index=2; put #2 @30 'column2 line2' @; */ index=1; put #index @1 'column1 line1' @; index=2; put #index @1 'column1 line2' @; index=3; put #index @1 'column1 line3' @; index=1; put #index @30 'column2 line1' @; index=2; put #index @30 'column2 line2' @;

put; run;

Could someone help me here? Thanks in advance.

Helen


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