X-Mailer:     Pegasus Mail v2.3 (R3).
Newsgroups: bit.listserv.sas-l
Date:         Thu, 15 Oct 1992 18:37:22 EDT
Reply-To:     Ray Pass <PASSRAY@CPMAIL-NZ.CIS.COLUMBIA.EDU>
From:         Ray Pass <PASSRAY@CPMAIL-NZ.CIS.COLUMBIA.EDU>
Subject:      My turn, My turn
Comments: To: SAS-L@uga.bitnet

This isn't really in the same league as Phil G's or Deb C's recent
situations, but I am stumped.  Ah just don know what ta make of it.  I don't
think I've seen this behavior before - it may be a 6.07 thing, although we
just today loaded the Sept tape, so we're up to date.  I got my job done in a
perfectly acceptable way so this is more academic than anything else,
although it sure is puzzling.  Here's the situation.  I did a straightforward
PROC TABULATE using a few formats that I had created and got crazy results.
The following code bombed, telling me that I was trying to use a character
format with numeric data.

 *-----------------------------------------------------------------;
 PROC TABULATE  DATA=MARK F=5.0 MISSING;

    CLASS LOCATION DISUB82 FINCLASS;

    VAR   DAILY MTD;

    TABLE LOCATION*F=$LOCFMT. ALL,
          DISUB82='DISCHARGE DISPOSITION'*F=$UB82FMT. ALL,
          (FINCLASS='PAYOR' ALL)*(DAILY MTD)*SUM=''
          / RTS=16 BOX=_PAGE_ MISSTEXT=' ';

    KEYLABEL ALL='TOTAL';
 *-----------------------------------------------------------------;

LOCATION and DISUB82 are  *definitely*  character variables, and $LOCFMT and
$UB82FMT are  *definitely*  character formats.  According to my RTFM'ing, the
F=5.0 option in the TABULATE statement sets up default formats for all cells,
but can be overridden by F= options in TABLE statements.  Anyway, I didn't
think the page, row, and column 'cells' (CLASS values) were included in this
default, and in fact, when I excluded the F= options from the TABLE
statement, the row values did  *not*  shrink to a width of 5.

Now here's the odd part.  The following code worked perfectly.

 *-----------------------------------------------------------------;
 PROC TABULATE  DATA=MARK F=5.0 MISSING;

    CLASS LOCATION DISUB82 FINCLASS;

    VAR   DAILY MTD;

    TABLE LOCATION ALL,
          DISUB82='DISCHARGE DISPOSITION' ALL,
          (FINCLASS='PAYOR' ALL)*(DAILY MTD)*SUM=''
          / RTS=16 BOX=_PAGE_ MISSTEXT=' ';

    FORMAT LOCATION $LOCFMT.
           DISUB82  $UB82FMT.;

    KEYLABEL ALL='TOTAL';
 *-----------------------------------------------------------------;

The only differences in the two sets of code are that in the first set, I
specified the formats in the TABLE statement, something I've done endless
times before, whereas in the latter set , I used a separate FORMAT statement.
When you use a separate FORMAT statement, you can  *only*  refer to CLASS
variables, like I did here.  It has no effect on analysis vars or table
cell contents.

Like I said, its academic, but something is wrong here.  Anybody got any
ideas?

And I may be old, and I may be pooped, but I don't think I'm an old poop yet.

Ray


 *--------------------------------------------------------------------------*
 | Ray Pass, Ph.D.                                    Voice: (212) 305-7748 |
 | Columbia-Presbyterian Medical Center                 Fax: (212) 305-3302 |
 | 161 Ft. Washington Ave.       AP1310                                     |
 | New York, NY 10032-3784               passray@cpmail-nz.cis.columbia.edu |
 *--------------------------------------------------------------------------*
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU