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
> 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
> 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;
> 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
two is the name of matrix defined previously in your IML session (two =
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