home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / bit / listserv / sasl / 4131 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.3 KB  |  47 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!UDELVM.BITNET!ACS03043
  3. Message-ID: <SAS-L%92091011201144@VTVM2.CC.VT.EDU>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Thu, 10 Sep 1992 10:36:44 EDT
  6. Reply-To:     "John R. Gerlach" <ACS03043@UDELVM.BITNET>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         "John R. Gerlach" <ACS03043@UDELVM.BITNET>
  9. Subject:      The RETAIN Statement
  10. Lines: 35
  11.  
  12.    Greetings,
  13.  
  14.        There seems to be a problem with the RETAIN statement.  Consider
  15.    the code below which produces a single observation data set containing
  16.    n-variables initialized to zero using the RETAIN statement.  At the
  17.    96th, 97th, and 98th iteration, SAS generates an "Internal compiler
  18.    stack overflow" error message.  A patch to this problem is to use
  19.    two RETAIN statements.  Any comments?
  20.  
  21.        The SAS (6.06) code was executed on an IBM 3090 running VM/CMS.
  22.  
  23.  
  24.                                           --- John Gerlach
  25.  
  26.  
  27.  
  28.    %macro nth_run(n);
  29.       data ds;
  30.          retain var1-var&n. 0;
  31.       run;
  32.       proc print;
  33.          title "The &n.th iteration";
  34.       run;
  35.       proc datasets library=work;
  36.          delete ds;
  37.       run;
  38.    %mend nth_run;
  39.  
  40.    %macro doit;
  41.       %do i = 90 %TO 100;
  42.          %nth_run(&i.)
  43.          %end;
  44.    %mend doit;
  45.  
  46.    %doit
  47.