HDTenEightyP/NetNews huggingface dataset:
Transport-Options: /STANDARD/REPORT
Importance: Normal
Content-Type: text
Newsgroups: bit.listserv.sas-l
Date:         Thu, 7 Jan 1993 22:19:20 GMT
Reply-To:     sce!CONNERBC/G=BEN/I=C/S=CONNER@MHS.ATTMAIL.COM
From:         sce!CONNERBC/G=BEN/I=C/S=CONNER@MHS.ATTMAIL.COM
Subject:      NOTE 01/07/93 14:22:00
Comments: To: SAS-L@uga.cc.uga.edu

From: Ben Conner
     SAS Consultant
Subject:
Hi,

Has anyone encountered the error indicated below?  Any ideas/suggestions for a
solution?

The user is operating on an IBM MVS mainframe under SAS 6.07.  She coded
  MINSTG,MEMSIZE=50M  on her EXEC statement for SAS.

Thanks much!

--Ben
--------------------Partial note follows---------------------------------------
Obviously the gremlins have moved on to better digs.  Say do you know anything
about proc fastclus.  This user from eco analysis is trying to run it and is
getting a fetch failed error.  And then she gets:
ERROR: Image SASLOG found but not loadable.
This error msg seems to pick up the last dataset that was allocated.  In
previous jobs, she would get the same error msg but with different dataset.
It would always be the last dataset she allocated.  She also said she took
the same code down to San Diego and ran it on a mainframe and it ran fine.
Any ideas?
EE&MS Budgets & Accounting  San Dimas   SCE
(714) 394-8555   (Pax 47555)   Internet: bconner@netcom.com
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Organization:  School of Public Health, University of Minnesota
Newsgroups: bit.listserv.sas-l
Date:         Wed, 6 Jan 1993 11:47:20 -0800
Reply-To:     Jim Goes <goes@chimera.sph.umn.edu>
From:         Jim Goes <goes@CHIMERA.SPH.UMN.EDU>
Subject:      dos 5.0 & SAS 6.0.4
Comments: To: SAS Discussion List <sas-l@uga.cc.uga.edu>

> From: David Webb <dcwebb@GIBBS.OIT.UNC.EDU>

> I can't reference a manual, but one of the campus support
> folk here told me that -ems all only gives 2 meg of expanded
> memory.  To get more you have to use the following formula:
>

> (K/16)-1  where K=the # of kilobytes of expanded memory
> you want.
>

> i.e. for 4 meg of expanded memory you would have
> (4096/16)-1=255. Then your ems line in config.sas would
> read as follows:
>

> -ems 255


While you can get SAS to use more than 2 meg of EMS, I'm not sure
that you want to.  I recall a discussion some time ago on the list
that few SAS procs will use more than 2 meg EMS.  It's not like this
is a linear expansion of your usable memory for memory-intensive
procs like SORT.  Even on a 286, that extra memory (>2 meg) can be
more beneficially used for ramdisks, etc. that can speed SAS up a
little.  If you are wedded to the '286, at least get a floating point
co-processor chip if you don't have one (in fact I can sell you a
used one).  They go for cheap these days, and make a big difference. --
*********************************************************************
Jim Goes                        + InterNet: goes@chimera.sph.umn.edu
Health Management & Policy      +            (NeXTmail welcome!)
School of Public Health         + Phone:    (612) 624-3118
University of Minnesota         + FAX:      (612) 624-3972
*********************************************************************
When I hear "family values," I reach for my revolver.
From: henebry@matt.ksu.ksu.edu (Geoffrey M Henebry)
Newsgroups: bit.listserv.sas-l
Subject: Re: White Noise test stats in proc spectra
Date: 5 Jan 1993 09:03:54 -0600
Organization: Kansas State University
NNTP-Posting-Host: matt.ksu.ksu.edu

Janice Winchell <WINCHELL@KENTVM.BITNET> writes:

>Would anyone out there be able to give me information on the two test
>statistics generated by the WHITETEST options on Proc Spectra (SAS ETS 6.07)?

check out Introduction to Statistical Time Series by Fuller (ISBN:0-471-28715-6)
he discusses these tests on pp 282-287.
                                        tchau!
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 
 Geoffrey M. Henebry                voice: (913) 532-7997   fax: (913) 532-6653 
 Konza Prairie LTER                 BITNET:     HENEBRY@KSUVM                   
 Division of Biology/Ackert Hall    internet:   gmh@andro.konza.ksu.edu         
 Kansas State University                        henebry@matt.ksu.ksu.edu        
 Manhattan, KS 66506 USA            Heraclitus: PANTA HREI                      
Xref: sparky bit.listserv.sas-l:5507 bit.listserv.stat-l:2297
From: parilis@gandalf.rutgers.edu (Gary Parilis)
Newsgroups: bit.listserv.sas-l,bit.listserv.stat-l
Subject: multivariate design question
Date: 5 Jan 93 03:55:04 GMT
Followup-To: bit.listserv.sas-l
Organization: Rutgers Univ., New Brunswick, N.J.


I'm no multivariate statistics wizard, and I'm having a bit of trouble
figuring out how to set up the analyses for a set of data that looks
like this:

I'm looking for differences between 2 levels of a discreet independent
variable (treatment A and treatment B) on several related continuous
dependent variables.

There are 2 groups (group1 and group2).  Data was collected at three
times (t1, t2, t3), in a repeated analysis design.  

For both groups, t1 is the baseline. 

For logistical reasons, group1 got treatment A at t2 and treatment B
at t3, and group 2 got the treatments in the reverse order.

The ideal situation would have been a simple between Ss design, in
which one group was only given one treatment, and the other group was
only given the other, but unfortunately, because of manipulation
involves different treatments of students (which are hypothesized to
differentially affect their academic performance) it would be
unethical to do so.

I'm using SAS.  A univariate version of what I want to do would look
something like:


proc glm;
  class group;
  model y1-y3 = group / nouni;
  repeated time 3;


How do I set up a multivariate version of this?

I don't want to resort to doing separate univariate analyses, for
obvious reasons...


Thanks muchly in advance...

-Gary

parilis@gandalf.rutgers.edu
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Fri, 8 Jan 1993 14:14:42 EST
Reply-To:     Sam Ye <TYE@CCVM.SUNYSB.EDU>
From:         Sam Ye <TYE@CCVM.SUNYSB.EDU>
Subject:      TRANSPORT DATA FROM VAX TO PC

Hi,folks:
   My problem is to transport SASdata sets from VAX to PC. I used
PROC COPY to do data transporting both on VAX and on PC, and KERMIT in
binary mode to do file transfer. I carfully followed the instructions in SAS
Procedure Guide and Technical Report P195. I have successfully used these
procedure to move SAS data sets from IBM mainframe to PC. Therefore, I
believe no mistakes in programs. But I failed to do the same thing from
VAX to PC.
  The difference between success and failure is this: The transportable
data file on PC transfered from IBM mainframe (before using PROC COPY) is
sequential file without breaking into lines. But the file transfered
from VAX was broken into lines with 80 column for each line, and was
rejected by  PROC COPY on PC. So, it is clear that the transportable data
file on PC should be a sequential one. When I check the transportable data
file created by PROC COPY on VAX, it show that:
   file organization is sequential, and
   record format is fixed length 80 byte records.
I don't known what that means and what goes wrong. Transportable file
created by PROC COPY on VAX? or KERMIT on VAX? Any solution?
Please give your advice. I need it badly. Many thanks!
   The following are the programs I used on VAX and PC.
 On VAX:   libname dat  '[.data]';
  (6.07)   libname tran xport 'tran.vax'  ;
           proc copy in=dat out=tran memtype=data ;
              select a1;
 On PC :   libname indat  sasv5xpt 'c:tran.vax';
  (6.03)   libname psy        'c:psy  '  ;
           proc copy in=indat out=psy  ;
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Delivery-Notice:  SMTP MAIL FROM does not correspond to sender.
Newsgroups: bit.listserv.sas-l
Date:         Wed, 6 Jan 1993 16:18:10 EST
Reply-To:     Jozsef Vitrai <VITRAI@NKI.BITNET>
From:         Jozsef Vitrai <VITRAI@NKI.BITNET>
Subject:      ML vs OLS in regression

Hi,
Could anybody tell me what the advantages of fitting a ML regression model
could be over the least squares approach (1 dependent, 1 independent continous
var). I am interested in theoretical background rather than the computational
one; I would be glad if somebody could suggest an introductory text relevant
to this question.
Thanks in advance.
Jozsef
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Return-Path: <ZINJMAN@uog.pacific.edu>
X-Origin: The Portal System (TM)
Newsgroups: bit.listserv.sas-l
Date:         Tue, 12 Jan 1993 00:27:46 PST
Reply-To:     ZINJMAN@UOG.PACIFIC.EDU
From:         ZINJMAN@UOG.PACIFIC.EDU
Subject:      Re: data set definition problem
Comments: To: sas-l@awiimc12.bitnet

Can anyone out there help us with a problem we're encountering
with SAS-PC?:

When creating a large data set in the Data Set Definition Mode,
is it possible to END the SAS session without completely
defining the DATA SET and then re-enter the Data Set
Definition Mode at a later time to continue defining
the same data set?

Thanks for your assistance!  Gary Heathcote/Brad Dillie
                             Anthropology Lab
                             University of Guam, UOG Station
                             Mangilao, Guam 96923
                             FAX: 671-734-2906 (c/o BEAM)
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Tue, 5 Jan 1993 09:27:00 EST
Reply-To:     Sally Muller <UNCSM1@UNC.BITNET>
From:         Sally Muller <UNCSM1@UNC.BITNET>
Subject:      Data manipulation problem solved!

----------------------------------------------------------------------
SUMMARY:  Thanks for solving data manipulation problem
REL/PLTF: 6.07 MVS/ESA
E-ADDR:   uncsm1@unc.bitnet
NAME:     Sally Muller
PH/ADDR:  919-962-6501  OIT CB#3455, UNC, Chapel Hill NC 27514
----------------------------------------------------------------------
Thanks everyone for all the responses to my data manipulation
question!  I'll shortly post a benchmark comparing Allan  Rosen's
SQL solution with Matthew Zack's Data Step solution....ought to
be interesting.....
Stay tuned,
Sally
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Subject: (no subject given)
Posted-Date: Tue, 5 Jan 93 20:32:30 -0800
Newsgroups: bit.listserv.sas-l
Date:         Tue, 5 Jan 1993 20:32:30 -0800
Reply-To:     tiny t <tamara@GLIA.BIOSTR.WASHINGTON.EDU>
From:         tiny t <tamara@GLIA.BIOSTR.WASHINGTON.EDU>
Comments: To: sas-l@vtvm2.cc.vt.edu

SESUG, the SouthEast SAS Users Group Conference is close to the next
registration deadline. So register now for the conference and conference
hotel--The TradeWinds, St. Petersburg Beach Florida.
Be sure to let them know you're with the conference for
our special rates.

Almost 80 Beginning, Intermediate, and Advanced-level papers and posters have
been scheduled for concurrent sessions during the conference--February 14
through February 16.

In addition to the papers and posters
there will be
----Video Tutorials,
-----a Demonstration Area,
------Formal Demonstrations presented by SAS Institute,
--------BOFs,
---------a RoundTable Luncheon

After the conference, seven SAS
training courses are scheduled to be presented
starting on Wed, Feb 17, 1993.

The deadline for Regular Conference Registration ($150.00) is Tuesday,
January 12, 1993.  After that date, a registration fee of $175.00 will be
charged.  If you have not yet registered, you are encouraged to send in your
registration now.  Registration after January 12 does not guarantee you a
Conference Proceedings or other registration materials.  SAS training courses
have also started to fill up.  Space is limited in some training courses,
so enroll early.

Please call me or e-mail me for registration forms:

Tamara Fischell
(919) 933-6404

Tamara@glia.biostr.washington.edu
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Encoding: 49 TEXT
X-Mailer: Microsoft Mail V3.0
Newsgroups: bit.listserv.sas-l
Date:         Thu, 7 Jan 1993 08:33:00 EST
Reply-To:     rjf2@PHPDLS1.EM.CDC.GOV
From:         rjf2@PHPDLS1.EM.CDC.GOV
Subject:      discard superfluous observations *HOW*?
Comments: To: SAS-L@uga.cc.uga.edu

content      : Response
summary      : discarding excess obs
rlse/platform: V6.07 / MVS
Ron Fehd     :                SMTP:BitNet:    <rjf2@phpdls1.em.cdc.gov>
              Centers for Disease Control
              1600 Clifton Rd  MS:G25         FAX  : 404/639-1778
              Atlanta, GA 30333  USA          phone: 404/639-1707
????????????????????????????????????????????????????????????????????????
From:         Patrick Haggard <ph@PHYSIOLOGY.OXFORD.AC.UK>
Subject:      discard superfluous observations *HOW*?
I have some data containing between n and m observations in each
of C conditions.  I would like to have exactly n observations in
each condition, so that my design is balanced: I'm fairly happy that
discarding the excess observations shouldn't change things too much.
My question: can anyone suggest a way to discard the excess
observations in a SAS data step, and to number the remaining
observations 1...n for each condition.
Thanks
--------------------------------------------------------------------------
Patrick Haggard                         Email (WORLD): ph@physiol.ox.ac.uk
University Laboratory of Physiology     Email (JANET): ph@uk.ac.ox.physiol
Parks Road,                             Tel. (0865) 272116
Oxford, OX1 3PT                         Fax. (0865) 272469
England
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ooooooooh, getting rid of extra data!?!?!? what a shame, once you have spent
the money to collect. really good stuff, that data.

you'll need a counter and retain statement:

%LET HOW_MANY = 3;

/*if not SORTED then:*/
proc SORT;
  by ID_Var;

DATA OBS_EQ_&HOWMANY.;
  set <something>;
  retain Counter 1;
  by  ID_Var;
  if first.ID_Var then Counter = 1;
  else                 Counter + 1;
  if Counter le &HOW_MANY. then output;

endSAS; happy crunching!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Envelope-to: sas-l@VTVM1.BITNET
X-VMS-To: BITNET%"sas-l@vtvm1"
Newsgroups: bit.listserv.sas-l
Date:         Tue, 12 Jan 1993 08:40:00 EST
Reply-To:     "Robert M. Hamer 908-932-2696" <HAMER@ZODIAC.BITNET>
From:         "Robert M. Hamer 908-932-2696" <HAMER@ZODIAC.BITNET>
Subject: RE: data set definition problem

ZINJMAN@UOG.PACIFIC.EDU writes:

>Can anyone out there help us with a problem we're encountering
>with SAS-PC?:

>When creating a large data set in the Data Set Definition Mode,
>is it possible to END the SAS session without completely
>defining the DATA SET and then re-enter the Data Set
>Definition Mode at a later time to continue defining
>the same data set?

Under the assumption that the question you're asking can be restated
as:  When using PC DOS SAS to create a dataset with the data step
can you create part of a dataset in one session and then in a later
different session add observations to the dataset the answer is yes.

Session one:

libname .......... whatever;
Data abc;
  infile .........  whatever;
  input .........  statement;
  run;


And in a different session:

libname .......... whatever;
Data xyz;
  infile .........  whatever;
  input .........  statement;
  run;

proc append base=abc data=xyz;

(Look up append to make sure I have the syntax right; I don't have
a manual here in front of me.  But you get the idea, don't you?)
This requires that you have the "xyz" part of the data around
for part of the SAS session before appending it to the existing
dataset.

If you were using SAS 6.07 or above you would have available to
you in the data step the MODIFY statement which would allow
you to add observations directly to an existing dataset when
paired with the output statement.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Sat, 9 Jan 1993 17:48:11 EST
Reply-To:     Michael Davis <75046.1627@COMPUSERVE.COM>
From:         Michael Davis <75046.1627@COMPUSERVE.COM>
Subject: Re: Creating Large Financial and Admin. Systems with SAS
Comments: To: LIST SAS-L <sas-l@uga.cc.uga.edu>

-----------------------------------------------------------------------
CONTENT:    response to Question about SAS for large admin. systems
SUMMARY:    find existing software packages and see Paper from SUGI 17
REL/PLTF:   n/a E-ADDR:     0002395748@mcimail.com P-ADDR:     BC&BS OF
Conn., 370 Bassett Road, North Haven, CT 06473 PHONE:      (203)-985-7187
FAX:        (203)-985-7030
-----------------------------------------------------------------------
Mark Schildhauer asked if anyone out there is successfully using SAS,
particularly on Unix servers networked via TCP/IP, to provide a complete
administrative solution for an organization with thousands of employees and
clients?

I agreed with Bill Kahn's answer but I have three additional observations.

1.  After you zero in on your needs and budget, it is usually less
    expense, less risky, and faster to look for existing packages
    that can be customized to meet your organization's needs.  My view
    of SAS is that it can be the glue that ties those systems together
    at a high level as an interface and a consolidated report-writer.

2.  Jeff Babcock, SI, presented a paper titled "Running the Business:
    Financial Management with the SAS System" at SUGI 17 (pp. 405-418)
    which deals with this subject on detailed abstract level.

3.  I know of at least one organization with over 2,000 employees
    that uses SAS in the manner Mark described ... SAS Institute.
    My point in mentioning this is not to contend that the SAS system
    is the best tool for these purposes but that it can be done
    completely within SAS, down to printing the paychecks.


Distribution:
  LIST SAS-L >internet: sas-l@uga.cc.uga.edu
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Subject: (no subject given)
Newsgroups: bit.listserv.sas-l
Date:         Tue, 12 Jan 1993 15:41:00 CST
Reply-To:     Dan Nguyen <DNGUYEN@KSUVM.BITNET>
From:         Dan Nguyen <DNGUYEN@KSUVM.BITNET>

Set No Mail
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Tue, 12 Jan 1993 12:50:09 EST
Reply-To:     Dale Houston <dhouston@BIO.RI.CCF.ORG>
From:         Dale Houston <dhouston@BIO.RI.CCF.ORG>
Subject:      SAS under SunOS and the automounter...
Comments: To: sas-l@uga.cc.uga.edu

Anyone out there in SAs-land try to automount SAs from different
directories on different machines? It's really fun and I am interested
in seeing if anyone else was as dumb as I about how to go about it.

dale
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Encoding: 71 TEXT
X-Mailer: Microsoft Mail V3.0
Newsgroups: bit.listserv.sas-l
Date:         Thu, 7 Jan 1993 09:13:00 EST
Reply-To:     rjf2@PHPDLS1.EM.CDC.GOV
From:         rjf2@PHPDLS1.EM.CDC.GOV
Subject:      user-defined macro functions?
Comments: To: SAS-L@uga.cc.uga.edu

content      : Response
summary      : user-defined function written in macro
rlse/platform: V6.07 / MVS
Ron Fehd     :                SMTP:BitNet:    <rjf2@phpdls1.em.cdc.gov>
              Centers for Disease Control
              1600 Clifton Rd  MS:G25         FAX  : 404/639-1778
              Atlanta, GA 30333  USA          phone: 404/639-1707
????????????????????????????????????????????????????????????????????
From:         John Mark Williams <jmw@TASMAN.CC.UTAS.EDU.AU>
Subject:      user-defined macro functions?
Hi all,
Is is possible to write a user-defined function in SAS? Something that would
operate like:
%let x = %amacro;
where amacro will return a value. Alternatively what about
%amacro(x)
where the value of x is altered within the macro and is available outside it.
Many thanks,
--
John M Williams,
School of Health Sciences, University of Tasmania
J.M.Williams@med.utas.edu.au
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
ah, yes, string processing, I love it!

here is a macro for the xor operator, which I wrote for &SYSVER le 5.18;
note that V6 has the bxor operator (bit-wise xor) which works differently
than this macro.

%MACRO XOR(COND1,COND2);/*evaluation yields boolean value in (0,1)*/

    (   (    &COND1 and not (&COND2)
     or (not &COND1 and     (&COND2) )                     %MEND;

/*NB: Note Well: no semicolons in this macro!
  caveat: neither COND1 nor COND2 may contain an equals sign: '='
          use operator 'eq' and it works fine*/

usage in data step:

DATA;
  set <something>;
  if %XOR(A,B) then <do something1>;
  if %XOR(C eq D,D gt E) then <do something2>;
  if %XOR(first.ID,last.ID);
  /*try this with F & G in (0,1,2,3)*/
  Var_xor  = %XOR(F,G);
  Var_bxor = bxor(F,G);

a macro (procedure or subroutine) to pad a char var with dots
%MACRO SPAC2DOT(VAR);
&VAR = translate(&VAR.,'.',' ');                            %MEND;

usage in data step:

DATA;
  set <something>;
  %SPAC2DOT(Char6);

happy crunching!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!
Organization: Penn State University
Date: Tue, 12 Jan 1993 11:02:02 EST
From: <DRH4@psuvm.psu.edu>
Newsgroups: bit.listserv.sas-l
Subject: Obtaining a library reference within an AF application


  I am running SAS 6.07 in VM/ESA 1.1.  I have an AF application which uses
SCL and issues LIBNAME statements for each library.  The problem I have is
that I am not sure of what mode the current 'permanent' libraries I am storing
are.  Is there an SCL function or command that allows me to retrieve the
'filemode' of a SAS library ?

  The only other way I am sure that I can do it is with a SYSPARM in my
AUTOEXEC file pointing to the CMS minidisk where I want all of the SAS
libraries stored.  On CMS I default to the A-disk if I do not specify a
libref and there are no other librefs on any other disks.

  So my problem is that I have a new dataset that I want to create, but I have
no way of knowing where the other datasets are stored.  Has anyone solved this
one ?

Daryl R. Hoffman              The Pennsylvania State University
Bitnet:   drh4@psuvm.bitnet   The Center for Academic Computing
Internet: drh4@psuvm.psu.edu  Senior Applications Programmer Analyst
PopMail:  drh4@apix.psu.edu   Resource Administration
Office: (814) 865-0845        Fax: (814) 863-7049
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Tue, 5 Jan 1993 13:39:03 -0600
Reply-To:     Kernon Gibes <gibes@SWIRL.MONSANTO.COM>
From:         Kernon Gibes <gibes@SWIRL.MONSANTO.COM>
Subject:      RE: Match Merge Problem
Comments: To: SAS-L@uga.cc.uga.edu@tin.monsanto.com
Comments: cc: GIBES@tin.monsanto.com

In reply to a data merging question by Dr. Francis Dane, Ron Fehd wrote,
in part:

>well, looks like you may have a problem with your version.

and I agree that a straightforward merge should have worked, but in
Ron's single data step solution:

>now here's another data build solution with arrays and retain:
>
>DATA PEOPLE;
>  set <something>;
>  by Pt# NCode;
>  retain VarA1 VarA2 ... VarAn
>         VarB1 VarB2 ... VarBn 0;
>  select(NCode);
>    when (1);
>    when (2) do; VarA2 = VarA1;
>                 VarB2 = VarB1;                 end;
>    when (3) do; VarA3 = VarA1;
>                 VarB3 = VarB1;                 end;
>    ...
>    when (N) do; VarAN = VarA1;
>                 VarBN = VarB1;                 end;
>    otherwise;                                  end;
>    if last.NCode then output;

It seems to me that the "last.NCode" should probably be a "last.Pt#",
but the larger issue is that this code would appear to propagate the
values of VarA1, VarB1 in an unintended fashion, i.e. yielding:

             OBS    PT#    VARA1    VARB1    NCODE    VARA2    VARB2

              1     12       85       50       2        85       50
              2     13       70       80       1        85       50

I think a more elaborate retain/variable assignment would be required to
fix the single data step solution.

Kernon Gibes
Internet: gibes@swirl.monsanto.com
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU