HDTenEightyP/NetNews huggingface dataset:
Newsgroups: bit.listserv.sas-l
Date:         Fri, 17 Jul 1992 22:41:44 CDT
Reply-To:     "Allen Herzog (312)955-3178" <U50161@UICVM.BITNET>
From:         "Allen Herzog (312)955-3178" <U50161@UICVM.BITNET>
Subject:      Documentation

         In the  August 1992 issue of "Dr. Dobbs Journal" (pps. 157-159)
there is an interesting review by  Andrew Schulman of a new book by
Donald E. Knuth "Literate Programming" (CSIJ Lecture Series Number 27,
Stanford University Center for the Study of Language and Information,
1992, 368 pp., $24.95 ISBN 0-937-07380-6) which consists of various
essays by Knuth on writing readable programs. Although this book is
intended for the professional programmer it makes some useful points
about writing documentation for any program.  Although SAS documentation
actually makes a far greater effort than most programs to explain how
the system is programmed (e.g., SYSTAT and SPSS make no such effort
at all which accounts for the fact that these systems are not used
with the same sophistication that serious SAS programmers employ), it
could be better documented in this area.
                                             Allen Herzog
                                             Univ. of Illinois Chicago
                                             U50161@UICVM
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Thu, 30 Jul 1992 13:28:00 PDT
Reply-To:     Bob Roberts <RROBERT@USCMVSA.BITNET>
From:         Bob Roberts <RROBERT@USCMVSA.BITNET>
Subject:      more on nesting data steps

I recently wrote to ask if it was possible to nest data steps in
SAS.  Thanks to those of you who responded.  The consensus is that
it is not possible.

Maybe someone can help me out with the original problem that led me
to write in the first place.  The problem stems from having to
examine all possible pairs of observations in a data set
in order to calculate several non-parametric statistics that are
not handled by statistical software packages.
A colleague (Michael Stallings) and I
are attempting to write a SAS program that will allow us to convert
an N x P matrix (N = subjects; P = variables) into a matrix of size
(N(N - 1) X 2P).  The larger matrix contains all possible pairs of
records (each record consists of a set of observations (P) for a
single person).  We have written a program that will convert the
smaller matrix to the larger one.  The problem, of course, is that
when N gets large, the program requires significant computational
resources (e.g., if N = 1000 and P = 20, the larger matrix is of the
order 999,000 by 40).  It's a bit clunky now, but the code is:

data first; set zero(keep=id var1 var2 var3) end=eof;
nobs = _N_;
array eins(50) v1-v50;   * N = 50;
einds(nobs) = id;
if end then output;

data second; set first(keep=v1-v50 nobs);
array zwei(50) v1-v50;
   do i = 1 to nobs;
      do j = 1 to nobs;
         id1 = zwei(i);
         id2 = zwei(j);
         output;
       end;
      end;
proc sort;
   by id1;

data third; merge first(rename=(id=id1)) second (in=intwo) ; by id1;
if intwo;

data fourth; set third;
proc sort;
   by id2;

data fifth; merge first (rename=(id=id2 var1=avar1 var2=avar2
                                 var3=avar3))
                  fourth (in=infour)
                  by id2;
if infour;
if id1=id2 then delete;


Because we routinely deal with data sets with large numbers of cases
we are interested in writing a more effecient program.
It turns out that we can achieve the final calculations of interest
to us by pooling results obtained within each of the N matrices
that consist of all possible pairings of subject i with all other
subjects j.  Our strategy was to loop out of the current data step
after we had constructed all pairings for each subject i and (1)
perform the merges required to retrieve the original data for each
subject, (2) perform the calculations required, (3) save the results
to a cummulative file, (4) delete the matrix for subject i, and (5)
return to the next subject in the original data step.  Since looping
in and out of data steps is not possible, we would be interested to
hear if anyone else has ideas about how to solve this problem.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Mon, 27 Jul 1992 15:42:11 -0500
Reply-To:     Kernon Gibes <gibes@SWIRL.MONSANTO.COM>
From:         Kernon Gibes <gibes@SWIRL.MONSANTO.COM>
Subject:      RE: SQL ? and SAS...
Comments: To: SAS-L@uga.cc.uga.edu@tin.monsanto.com
Comments: cc: GIBES@tin.monsanto.com

 CONTENT:   Response
 SUMMARY:   SQL is part of base SAS, works on data sets/views, ...
 REL/PLTF:  6.06+/all?
 E-ADDR:    gibes@swirl.monsanto.com
 NAME:      Kernon Gibes
 PHONE:     (708) 506-2873
 DATE/TIME: 27 July 1992, 4:03 p.m. CDT

Regarding:

>I've been watching the SQL discussions for quite a while and it
>just struck me that I haven't a clue on what types of files are
>being used in these queries...

>Does SQL under SAS work with any file that SAS understands ??

Any SAS data set or view (actually, if you have SAS/ACCESS, I imagine
you could be accessing a non-SAS data file/view, but I'm not experienced
with this).

>Do you need to have your datafiles in some special format ??

What kinds of formats are you speaking of?  Other than that the
"datafiles" must be sets/views, I believe the answer is "no".

>Is the SAS SQL PROC specially priced? or is it part of Base SAS ?

It is part of base SAS.

>Short of asking the systems people... how can I tell if my
>installation has SAS SQL on it's various machines ??

Since it is part of base SAS, version 6.06+, this should be more of a
"which version of SAS am I running" question.  However, you could always
just try a:

   data junk; x=1; stop; run;
   proc sql;
    validate
     select * from junk;
   quit;

and you'll either get a "NOTE: The PROC SQL syntax is valid" or an
error message that PROC SQL is unknown.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Wed, 29 Jul 1992 21:32:20 EDT
Reply-To:     "Patrick Spreng" <76666.136@COMPUSERVE.COM>
From:         "Patrick Spreng" <76666.136@COMPUSERVE.COM>
Subject:      Ghosts left on SAS/SHARE servers

Re: Ghosts left on SAS/SHARE servers
(SAS/SHARE release 6.07, and TSO)

Tom Frenkel writes that he is experiencing similar problems with "ghosts"
left using files on his SAS/SHARE server.

Tom --

Our tracking number on this problem was 234123.  If they are interested,
SAS Tech Support can check back to pick up the history on this problem.

We tried a number of different test scenarios.  It was difficult, because
we had to establish a separate MVS Domain in order to manipulate the
operating system paramteters without disrupting the production system.
At first I thought that the problem might be related to whether Slip
Trap was in effect on S/522 abends, but that turned out to be a "red
herring."

When we discovered that specifying NOSTAE and DUMPPROL made the symptoms
go away, SAS closed the tracking number on this problem.  We are
currently running with those options, and response time does not seem
to be any slower than it was before.

I hope that this helps.

-- Bruce

(P.S.  Freddie Arie and I share this CompuServe account with our End-
        User Computing Department, which had temporarily unsubscribed
       us from SAS-L.)

Bruce Zak                        ^         CompuServe 76666,136
Lone Star Gas Company           /^\        Phone (214) 573-3475
Dallas, Texas                  (___)       Fax   (214) 573-3174
Newsgroups: bit.listserv.sas-l
From: alspach@casbah.acns.nwu.edu (Steve Alspach)
Subject: Problem with Data step loop
Organization: Northwestern University, Evanston Illinois.
Date: Fri, 31 Jul 1992 19:52:22 GMT

To whom it may concern,

This is Steve Alspach from Northwestern University.  Some time ago we had a
user try to read a file from tape using SAS.  The file has 299,469
observations in it.  The SAS program used to read the data keeps trying to
read one case more than what exists.  We checked the tape and it seems to be
fine.  The DATA step is rather involved and looks like this:

DATA SASDATA.CPS;
INFILE CPSADF84 LRECL=390 BLKSIZE=30420 RECFM=FB;
YR=84;
KEEP YR PTYPE AGE RACE SEX ED WKS HRWK IND OCC CLSWKR
  EARN WAGSAL PWT;
IF (YR GT 76) THEN LINK LOOP1;
RETURN;
LOOP1:
  INPUT REC 331 @;
  SELECT (REC);
  WHEN (1) DO; INPUT; GO TO LOOP1; END;
  WHEN (2) DO; INPUT; GO TO LOOP1; END;
  WHEN (3) DO;
  INPUT AGE 110-111 PTYPE 102 CLSWKR 150 @:
  IF (PTYPE=1) AND ((AGE GE 18) AND (AGE LE 65))
    AND ((CLSWKR GE 1) AND (CLSWKR LE 4) THEN DO;
  LINK LOOP10; GO TO LOOP1; END;
  ELSE DO; INPUT; GO TO LOOP1; END;
END;
OTHERWISE;
END;

LOOP10:
  INPUT SEX 108 RACE 109 EDCMPLTD 117 WKS 134-135 IND 151-153
  OCC 154-156 WAGSAL 191-195 PWT 118-128 @;
  IF (YR LT 81) THEN INPUT EARN 254-260;
  IF (YR GE 81) THEN INPUT EARN 255-261;
  IF (EARN GT 0) AND (WKS GE 0) THEN OUTPUT;
RETURN;

The error message that we get is that there is a lost card, and looks like
this:

RULE:    ----+----1----+----2----+----3----+----4----+----5----+----6
299470
YR=84 REC=3 AGE=32...
_ERROR_=1 _N_=1

Why is SAS looking for Record no. 299470?  It's making one more iteration
through the DATA step than it is supposed to.  Any help you can give on this
is greatly appreciated.

Steve Alspach
Northwestern University
alspach@casbah.acns.nwu.edu

Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Envelope-to: SAS-L@UGA.BITNET
X-VMS-To: IN%"SAS-L@UGA.BITNET"
Newsgroups: bit.listserv.sas-l
Date:         Wed, 22 Jul 1992 16:55:00 CST
Reply-To:     Debbie Wall - UMKC Computing Services <WALL@UMKCVAX1.BITNET>
From:         Debbie Wall - UMKC Computing Services <WALL@UMKCVAX1.BITNET>
Subject:      Need some info. on MAPS based on ZIPCODE

A Sociology professor asked me yesterday if he gave me some zipcode and
data about those areas, could I produce a map of the Kansas City
Metropolitan Area (ie a city map plus some of the outling regions).  I
did not think this was possible, but thought I best ask the SAS experts
before I give him my response.  What do you think?

Deborah Wall                            User Services Support Supervisor
Academic Computing Services             University of Missouri - Kansas City
Internet Addr:  wall@vax1.umkc.edu      Bitnet Addr: wall@umkcvax1
Phone Number:   (816) 235-1184          10am - 7pm Central Time
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Fri, 24 Jul 1992 14:23:00 EST
Reply-To:     Daisy Hsu <DAISY@TWNMOE10.BITNET>
From:         Daisy Hsu <DAISY@TWNMOE10.BITNET>
Subject:      about varity datasets merge

Hi folks:
  There is a question bothered me for a while.  The following is the
problem:
  There are three datasets with different type.
 First:  Lrecl = 40
         date (4.)     fid ($7.)   dummy (16.)   itm (5.)      qty (8.)
            0101        a100001     123986....     45422        34400
            0101        a100001          .         45666        23455
             .            .              .             .           .
             .            .              .             .           .
            0131        a100001          .         00123        123234
            0101        a100002          .         12993        123300
             .           .               .            .            .
             .           .               .            .            .

 Second:  Lrecl = 110
           date  fid  itm1  qty1  itm2  qty2  ... itm8  qty8   check
                                                                 *

          * the check # is the symbol of how many records belongs to
            the same fid on the same date.

 Third:   Lrecl = 341
          fid  date  dummy (19.)  account (2.)  qty1 itm1 ... qty24 itm24
                                     *                      *     *
          * account is the symbol of the qty# and itm#.
            eg:  account = 12  implied from qty1 itm1 to qty12 itm12

  finally I want to manage the dataset as:
      Lrecl = 80
       fid   date             blank  (67)                       cd (2)
       fid   date  itm1 (5)  qty1 (8) ... itm5  qty5  blank (2) cd (2)
                                                                *
       * take the card # appart.
         eg:  cd = 1        is the card included fid date
              cd = 2 or 3 or ...    is the sequence # of the contant
               fid itm qty
              if the qty# & itm# over 5 on the same date in the same fid
              then cd will be add 1.

  Any advice is appreciated.   Welcome your anser.
Daisy Hsu
Bitnet : Daisy@twnmoe10
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Tue, 21 Jul 1992 16:56:00 GMT
Reply-To:     Joseph A Schunk <0001007026@MCIMAIL.COM>
From:         Joseph A Schunk <0001007026@MCIMAIL.COM>
Subject:      re: shared dasd, MVS & CMS

I'm not sure but I believe you may not be able to get there from here :).
At least with v6. From v5 to v6 on MVS they changed the dcb's and file
organization of sas datasets. RECFM=PS is not known to cms ?!

Try: 1) transport engine (defeats purpose of shared dasd) (2) v5 engine
(3) tape engine ?

  +------------------------------------------------------------+
  |  MCI Mail:  JSchunk or 100-7026                            |
  |  Telex (MCI/WUI): 6501007026   Ans: 6501007026MCI UW       |
  |  Internet:  JSchunk@MCIMail.Com                            |
  |  X.400: G=joseph; S=schunk; ADMD=mci; C=us;                |
  +------------------------------------------------------------+
From: mschaeff@pilot.njin.net (Marc Schaeffer)
Newsgroups: bit.listserv.sas-l
Subject: File date in SAS 6.07 VMS
Keywords: sas
Date: 29 Jul 92 16:09:52 GMT
Organization: Rutgers Univ., New Brunswick, N.J.


I use SAS 6.07 under VMS.  My data sets are files, in SAS dataset
form, extracted from an on-line student information system.  The
extracts are not dynamic files in that they are refreshed on a regular
schedule (some nightly, some weekly).  Question: Is there a macro,
like &sysdate, which I can use to insert the filedate (i.e., the date
the file was last refreshed) in a footer in my reports?
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Fri, 24 Jul 1992 13:08:28 -0500
Reply-To:     mark feddersen <mfedder@BRONZE.UCS.INDIANA.EDU>
From:         mark feddersen <mfedder@BRONZE.UCS.INDIANA.EDU>
Subject:      What's happening?
Comments: To: sas-l@uga.cc.uga.edu
Comments: cc: mfedder@ucs.indiana.edu

I have received no sas-l listings for a number of days?
Is SAS-L down, or is it just me?
Please reply to the address below...
Mark Feddersen
SAS/Analyst
Indiana University Libraries
internet: mfedder@ucs.indiana.edu
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Tue, 28 Jul 1992 12:02:00 EST
Reply-To:     "A. Barrios" <UABC@UNC.BITNET>
From:         "A. Barrios" <UABC@UNC.BITNET>
Subject:      Asking about OS/2 list

----------------------------------------------------------------------
CONTENT:  Question about OS/2 list
E-ADDR:   uabc@unc.bitnet
NAME:     Arturo Barrios
PH/ADDR:  (919)962-6501  OIT CB#3455, UNC, Chapel Hill NC 27514
----------------------------------------------------------------------
Hi sas-lers:

I would appreciate if some of you know about a discussion
list for OS/2 users and could give me directions to subscribe
it.

Thanks,

Arturo Barrios
Newsgroups: bit.listserv.sas-l
From: gamerine@bluemoon.rn.com (Glenn Amerine)
Subject: 1980 STF1 or STF3 Dictionary?
Organization: Blue Moon BBS ((614) 868-998[024])
Date: Mon, 20 Jul 92 19:18:19 EDT

Does anybody happen to have any electronic form of the data dictionary
for any of the 1980 STF1 or STF3 tapes? We purchased them on 6250bpi tapes 
which only include hardcopy dictionaries, and that is a *LOT* of typing! A 
SAS program would be great, but at this point I'll take anything I can 
get.

Thanks in advance for any help,
Glenn

 This is from
     gamerine@bluemoon.rn.com
who doesn't have his (or her) own obnoxious signature yet
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Mailer: ELM [version 2.2 PL16]
Newsgroups: bit.listserv.sas-l
Date:         Tue, 28 Jul 1992 15:23:56 CDT
Reply-To:     "R. Snyder" <rsnyder@LOBBY.TI.COM>
From:         "R. Snyder" <rsnyder@LOBBY.TI.COM>
Subject:      Re: writing variable names to external file
Comments: To: SWICKHAM%DARTCMS1.BITNET@uga.cc.uga.edu
Comments: cc: sas-l@uga.cc.uga.edu
              92 2:32 pm

>
> System: VMS/SAS 6.06
> Subject: Writing variable names to an external file
>
> Hi, y'all
>   This ought to be a simple one, but it's got me stumped.  I have a transposed
> data set that I'd like to write to an external file, with variable names
> at the top of columns.  Put 'var1' 'var2', etc. where var1 is the 1st variable
> name, etc. won't work because I don't exactly know the names of the variables
> due to the transpose.  The transposed variables all have the same prefix, but
> the also have a number that ranges between 0 - 99, but not consecutively.
> Confused? An example:
> DATE RIVER SITE ORDER1 ORDER3 ORDER5 ORDER17 ORDER9 ORDER85
> I need to output these column headings along with their values without
> knowing their names beforehand.  Any ideas?
>
>   Thanks,
>   Steve Wickham
>   Dartmouth College
>   bitnet:swickham@dartcms1
>
Steve,

Can you read the variable names prior to transposing the data set?

Bob Snyder, Texas Instruments, Sherman, TX
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Sun, 26 Jul 1992 16:48:18 EDT
Reply-To:     Cindy Walawander <STTWALAW@UBVM.BITNET>
From:         Cindy Walawander <STTWALAW@UBVM.BITNET>
Subject:      Percentage formats

Dear SAS-ler's

I am using SAS5.18 on CMS.  I would like to change the format of the
percentages that are produced in the Proc Gchart block statement from
2 decimal places to 1. Is there a way to do this?

Thank you!

Cindy Walawander
sttwalaw@ubvm
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Mailer: Elm [revision: 66.36.1.1]
Newsgroups: bit.listserv.sas-l
Date:         Thu, 30 Jul 1992 10:37:54 EDT
Reply-To:     Ronald Cody EdD <cody@UMDNJ.EDU>
From:         Ronald Cody EdD <cody@UMDNJ.EDU>
Subject:      Re: Comma delimited output file
Comments: To: Pauline Sing <DC.SYSD10@TS3.TEALE.CA.GOV>
Comments: cc: SAS-L@uga.cc.uga.edu

>
> I am trying to create a comma delimited flat file from SAS on an MVS machine.
> I know that I could put a ',' between each variable but I have 600 variables
> in 27 tables. I was wondering whether there is a shortcut? Any suggestions
> would be greatly appreciated.
>
>                  Teale Data Center, State of California
>                  Internet: DC.SYSD10@TS3.TEALE.CA.GOV
>                  Address: P.O. Box 13436, Sacramento, Ca. 95813
>                  phone: (916) 920-6568, atss 430-6568
>
Why not one more answer (there have already been several good responses
already).  For numeric variables, one fairly easy solution is to use a
picture format.  Look at the example below:

        PROC FORMAT;
        PICTURE XXX LOW-HIGH='000,' . = '   ,';
        *Note: increase the number of zeros or blanks as necessary;
        RUN;
        DATA _NULL_;
        FILE 'DATA.ASC';
        SET ORIG;
        PUT (_NUMERIC_)(XXX.);
        RUN;

 -----------------------------------------------------
|  Ronald Cody, Ed.D.                                 |
|  Robert Wood Johnson Medical School                 |
|  Department of Environmental and Community Medicine |
|  675 Hoes Lane                                      |
|  Piscataway, NJ 08854                               |
|  -------------------------------------------------- |
|  Voice Phone (908)463-4490                          |
|  Fax         (908)463-4569                          |
|  E-Mail      CODY@RWJA.UMDNJ.EDU                    |
 -----------------------------------------------------
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Newsgroups: bit.listserv.sas-l
Date:         Mon, 27 Jul 1992 09:27:36 -0500
Reply-To:     Kernon Gibes <gibes@SWIRL.MONSANTO.COM>
From:         Kernon Gibes <gibes@SWIRL.MONSANTO.COM>
Subject:      RE: all possible combinations merge
Comments: To: SAS-L@uga.cc.uga.edu@tin.monsanto.com
Comments: cc: GIBES@tin.monsanto.com

 CONTENT:   Response
 SUMMARY:   SQL can be used to generate all possible combinations
 REL/PLTF:  6.07/ VMS
 E-ADDR:    gibes@swirl.monsanto.com
 NAME:      Kernon Gibes
 PHONE:     (708) 506-2873
 DATE/TIME: 27 July 1992, 9:33 a.m. CDT

Barbara Okerson (BOKERSON@MEMSTVX1.BITNET) wrote:

>I am running SAS 6.07 with VAX/VMS 5.5...

>Does anyone know of a good way of merging two data sets in an all combinations
>merge for the by-variable when there are duplicates of the by variable in both
>data sets to be merged and no other variable in common??  If I have three
>observations of a by-variable value in the first data set and 4 in the second,
>the final data set needs to have 12 observations with that value..

Maybe I'll beat Howard to the punch on this one!  Yes, SQL can be used
here.  If your two data sets are called "ONE" and "TWO" and the by
variable is called "BYVAR", then:

   proc sql;
    create table total as
    select one.byvar /*** var1, var2, ... ***/
    from one, two
    where one.byvar=two.byvar
    ;

will "merge" ONE and TWO giving all combinations of the by-variable in
the two data sets (the standard SQL cartesian product).
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
X-Mailer: ELM [version 2.2 PL16]
Newsgroups: bit.listserv.sas-l
Date:         Thu, 30 Jul 1992 10:04:17 CDT
Reply-To:     "R. Snyder" <rsnyder@LOBBY.TI.COM>
From:         "R. Snyder" <rsnyder@LOBBY.TI.COM>
Subject: Re: Summary of PC/X-windows posting
Comments: To: richardh@EPISUN.EPIDEM.UWA.EDU.AU
Comments: cc: sas-l@uga.cc.uga.edu
              92 8:24 am

A comment on:
>
> Xappeal - uses clarkson packet drivers and svga on 386 or better. A demo
> copy is available by Anon FTP from syrinx.kgs.ukans.edu in /pub/X_Appeal
> Address is:
> Xtreme s.a.s.
> email: xappeal@xtreme.sublink.org
> fax: +39 586 502310
>
> Both give academic discounts.
>
> | Richard Hockey                    email:richardh@episun.epidem.uwa.edu.au
 |
> | Department of Public Health       phone:+61 9 389-3463        _--_|\
 |
> | University of Western Australia   fax:  +61 9 389-3648       /      \
 |
> | NEDLANDS WA 6009                                             *_.--._/
 |
> | Australia                                                          v
 |
>
I've tried Xvision and found it to be extremely slow and resource hungry.
I do not recommend it. eXceed/w by Hummingbird is the product I prefere.
I've not tried Xappeal.

Bob Snyder, Texas Instruments, Sherman, TX
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU