LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (February 1997, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 20 Feb 1997 12:01:36 -0800
Reply-To:     Jean-Pierre Le Cruguel <jean-pierrel@ALGENE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Jean-Pierre Le Cruguel <jean-pierrel@ALGENE.COM>
Organization: Communications Accessibles Montreal, Quebec Canada
Subject:      Re: Proc IML - Saving Output
Content-Type: text/plain; charset=us-ascii

Nancy G. Berman wrote: > > I am using an IML program which is basically a lot of computation inside a > DO loop. The result of each step in the DO loop is a 1xn matrix (n would be > constant within a run). I would like to output a single file which contains the > index and the n matrix values for each value of the index. I would prefer an > ASCII file but a SAS file which I could later convert with a PUT statement > would be okay. So far, everything I have done has just given me the results > from the last iteration. Can someone please tell me how to get the file I want. > > The program look something like this: > > PROC IML; > USE DATA1; > DO S = 1 TO 40; > . > . > lots of IML statements - results in matrix A (1xn); > . > . > PRINT S A; > end; > > Thanks for helping, > > Nancy Berman

What you should put at the end of your loop is: something like this.

CREATE one FROM two; APPEND FROM three;

one is the name of a sas dataset (you may need to have it renamed in your loop).

two is the name of matrix defined previously in your IML session (two = J(1,n,0)) it gives to ONE the dimensions of two.

and APPEND FROM three fills the data ONE with the content of matrix THREE. (you may need to have it renamed in your loop).

You can use the same name in the 3 fields.

Hope this help


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