sas >> MISSOVER vs TRUNCOVER

by Susie.Li » Tue, 22 Aug 2006 01:50:47 GMT

I still get stumped by this sometimes. Could someone give me a simple
explanation of the difference, preferably with a simple example.

Thanks.

Susie Li
TV Guide
1211 Avenue of the Americas
New York, NY 10036
Tel 212.852.7453
Email XXXX@XXXXX.COM


sas >> MISSOVER vs TRUNCOVER

by clinton.rickards » Tue, 22 Aug 2006 02:35:52 GMT


Susie,

the *over infile statement options tell SAS what to do when the program reaches the end of the current input record and there are still data needs to be fulfilled.

- flowover: keep reading on the next line
- scanover: look for @'txt' data - redundant with flowover
- missover: set remaining variables to missing
- trunover: read what it can from the line and put it into the variable
- stopover: stop the data step

Try the following with each of the options:

data fred;
infile cards /* *over option here */ ;
length num1 num2 8 charvar $20;
input num1 charvar num2;
put num1= charvar= num2;
cards;
1 small
2 more 2
3 stillmore 3
;
run;

Clint


-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ]On Behalf Of
Susie Li
Sent: Monday, August 21, 2006 1:51 PM
To: XXXX@XXXXX.COM
Subject: MISSOVER vs TRUNCOVER


I still get stumped by this sometimes. Could someone give me a simple
explanation of the difference, preferably with a simple example.

Thanks.

Susie Li
TV Guide
1211 Avenue of the Americas
New York, NY 10036
Tel 212.852.7453
Email XXXX@XXXXX.COM



sas >> MISSOVER vs TRUNCOVER

by tobydunn » Tue, 22 Aug 2006 02:39:49 GMT

Susie ,

MissOver will stop SAS from continuing to the next line of data when there
are more variables pecified than data for a particular observation.

Data MissOver ;
Infile Cards MissOver ;
Input ID $ Var1 Var2 Var3 ;
Cards ;
A 1
B 1 2
C 1 2 3
;
Run ;


Proc Print
Data = MissOver ;
Run ;


Now TruncOver is meant for when you are reading in using formatted or column
style input.
Data TruncOver ;
Infile Cards TruncOver ;
Input ID $ 1 Var1 $ 3-7 Var2 $ 9-12 ;
Cards ;
A 11111 2222
B 111 222
C 1 2
;
Run ;


Proc Print
Data = TruncOver ;
Run ;






Toby Dunn

Normal People Worry Me!!!!!

I reject your reality and substitute my own!!!





From: Susie Li < XXXX@XXXXX.COM >
Reply-To: Susie Li < XXXX@XXXXX.COM >
To: XXXX@XXXXX.COM
Subject: MISSOVER vs TRUNCOVER
Date: Mon, 21 Aug 2006 13:50:47 -0400

I still get stumped by this sometimes. Could someone give me a simple
explanation of the difference, preferably with a simple example.

Thanks.

Susie Li
TV Guide
1211 Avenue of the Americas
New York, NY 10036
Tel 212.852.7453
Email XXXX@XXXXX.COM


Similar Threads

1. Q: infile missover vs. truncover

2. MISSOVER or TRUNCOVER?

All,

With the program below it appears that either MISSOVER or TRUNCOVER work
equally well.  In both the "Little SAS Book" and Cody's "Learning SAS by
Example" the authors seem to imply to use MISSOVER with list input and
TRUNCOVER with formatted input.

Is this a hard and fast rule or is it the case that you can use missover and
truncover with either?

Thanks much!

Sally Muller



data four_dates;
   infile datalines truncover; /* missover appears to work the same */
   input @1  Subject   $3.
         @5 DOB       mmddyy10.
         @16 VisitDate mmddyy8.
         @25 TwoDigit  mmddyy8.
         @34 LastDate  date9.;
   format DOB VisitDate date9.
          TwoDigit LastDate mmddyy10.;
datalines;
001 10/21/1950 05122003 08/10/65 23Dec2005
002 01/01/1960 11122009 09/13/02 02Jan1960
003 03/        10052009 12/01/08
004 06/24/2000 06122007 09/11/60 24AUG2009
run;

proc print;
run;

3. Is TRUNCOVER now the default?

4. Ok on SAS vs SCSI, How About SATA vs SATA

I read the recent SAS/SCSI post and Russ' SATA comment. I need to add 
storage to a Dell PE1800 with 3 sata raid 5 on their CERC 6 ch raid 
controller. Each drive is 80 GB. I have C/D partitions on the single raid 
set. I can't seem to find out how sata vs sata vs sas configurations 
compare. With a bigger Dell server I would spec a PERC5 controller, ch 1, 
two sas, raid 1 and ch 2, 3 sas, raid 5. For this storage upgrade I am 
considering a similar sata configuration. In other words, take two of the 
three 80 GB and create raid 1, and add three or four new 160 GB or larger 
drives for a new raid 5. What I can't find out is how good is two channel 
sata compared to two channel sas performance. Would this configuration give 
a significant performance boost over just adding drives to a single raid 5 
set? I'm not looking for performance comparable to sas, just enough bang for 
the buck to make it worthwhile. We may be running SQL on this box this year. 
Comments and advice would be appreciated.
Thanks in advance,
Dave


5. Length vs LRECL vs no LRECL

6. libref for "work" data sets (one level name): WORK vs USER vs User= option

I thought there was an easy way to determine the libref for "work"
data sets (i.e. those that can be accessed via a one level name), but
I could not find anything on SAS-L or in the on-line doc. Of course,
searching for WORK USER LIBREF can provide a number of non-related
hits (see additonal slightly off topic question at bottom).
 
I ended up writing the code included below to determine the libname
and memname for one level data set names.
(I need the two level name to extract info from the dictionary tables)

Is there an easier way to figure out the two level name?
=============================================================
%*** get lib & mem;
%macro libmem(in=,lib=_lib,mem=_mem);
  %if %scan(&in,2,.)>' ' %then %do;
     %*** two level names are easy;
     %let &lib=%scan(&in,1,.);
     %let &mem=%scan(&in,2,.);
  %end;
  %else %do;
     %*** one level names are more challenging;
     %*** if USER option is set, then use it;
     %let &lib=%sysfunc(getoption(USER));
     %if "&&&lib"="" %then %do;
        %*** if no USER option, check USER libref, if there use it;
        proc sql noprint;
         select distinct libname into :&lib from DICTIONARY.MEMBERS
          where libname='USER';
        quit;
        %*** if no USER libref defined then it must be WORK;
        %if "&&&lib"="" %then %let &lib=WORK;
     %end;
     %let &mem=∈
  %end;
  %*** upcase for use with dictionary tables; 
  %let &lib=%upcase(&&&lib);
  %let &mem=%upcase(&&&mem);
%put &lib is &&&lib  &mem is &&&mem;
%mend;

%libmem(in=sashelp.prdsale);
data prdsale; set sashelp.prdsale(obs=1); run;
%libmem(in=prdsale);

libname USER 'c:\DeleteThisFolder';
data prdsalU; set sashelp.prdsale(obs=1); run;
%libmem(in=prdsalU);

libname altUser 'c:\DeleteThisOneToo';
options user=altUser;
data prdsalO; set sashelp.prdsale(obs=1); run;
%libmem(in=prdsalO);
=============================================================

While looking at the on-line doc I found these:

Files in UNIX System Services can also be specified without a libref.
The following example specifies an HFS file using a relative path:
data 'saswork/two'; x=2; run;

I do not currently have access to a UNIX or OS/390 box, but was
wondering, do data sets accessed in this way show up in the dictionary
tables? And, if so, what do they look like? Just curious. No real need
to know.

Thanks for any assistance or advice,
Tammie

7. Length vs LRECL vs no LRECL

8. INPUT VS PUT, FORMAT VS INFORMAT

Hi,
I spent 20 minutes reading SAS documentation but I am still too stupid
to comprehend what it says.


The difference between put and input is one acts on format and the
other acts on informat.


put (source, format)
input(source, informat)

If I understand correctly, format is output attribute and informat is
input attribute.
So why is it that put can convert num2char and input can convert
char2num?