You need KEEP statements in the Data steps,

On Thu, May 22, 2014 at 1:57 AM, Lizette Koehler <[email protected]>wrote:

> There is a  SAS List if you are interested.  To join, go to this URL.
>
> http://listserv.uga.edu/archives/sas-l.html
>
>
>
> Second, if this is what concerns you
>
>
> ------------------------------- DESC=' '
> ------------------------------------
>
>                             Obs       ITEM
>
>                              1     642621639
>
> The DESC=' '
> Indicates that the Description is BLANK.  That is there is no description
> for item 642621639
>
> You can use a LABEL statement to change that behavior if you like.
>
> Of in your SAS code you can do a TEST for Description if there is none put
> one in.
>   DATA A1;
>      INFILE IN1;
>       INPUT @1  ITEM 9.
>           @10 DESC $25.;
> If DESC = ' ' Then Desc = 'No Description' ;
>
> Or you can test for MISSING Vars.
>
>
> Also, you do not need to state OPTIONS OBS=MAX - that is what will be done
> if you do not specify a count.
>
>
>
> Lizette
>
>
> > -----Original Message-----
> > From: IBM Mainframe Discussion List [mailto:[email protected]] On
> > Behalf Of Ron Thomas
> > Sent: Wednesday, May 21, 2014 10:05 PM
> > To: [email protected]
> > Subject: SAS
> >
> > Hello
> >
> >
> > I have coded a simple SAS Module, when i printed when the description is
> comming
> > in quotes. Could some one please help me understand why the quotes is
> comming ?
> >
> >
> > OPTIONS OBS=MAX;
> >
> > DATA A1;
> >     INFILE IN1;
> >     INPUT @1  ITEM 9.
> >           @10 DESC $25.;
> > *DATA A2;
> > *    INFILE IN2;
> > *    INPUT @1  ITEM 9.
> > *          @10 DESC $25.;
> >
> > DATA A3;
> >    SET A1;
> >
> > PROC PRINT DATA=A3;
> > TITLE 'ITEM DETAILS -APPEND DATA STEP';
> > RUN;
> >
> > *PROC APPEND BASE=A1 DATA=A2;
> >
> > *PROC PRINT DATA=A1;
> > *TITLE 'ITEM DETAILS - APPEND PROC';
> > *RUN;
> >
> > PROC SORT DATA=A3 OUT=A4;
> >   BY DESC;
> > RUN;
> >
> > PROC PRINT DATA=A4;
> > BY DESC;
> > TITLE 'ITEM DETAILS - SORTED';
> > RUN;
> >
> >
> > 642619109NEW BEL SUMMER FOLLY
> > 642621639
> > 642621839SCHLAFLY PALE ALE
> > 645051939CANADA DRY GINGERALE
> > 645051969BLUE MOON VARIETY
> > 645052399
> > 645052569COUNTRYTIME LEMONADE
> >
> > ********************************* Top of Data
> ****************************
> >                      ITEM DETAILS -APPEND DATA STEP
>  23:41
> >
> >                 Obs       ITEM              DESC
> >
> >                  1     642619109    NEW BEL SUMMER FOLLY
> >                  2     642621639
> >                  3     642621839    SCHLAFLY PALE ALE
> >                  4     645051939    CANADA DRY GINGERALE
> >                  5     645051969    BLUE MOON VARIETY
> >                  6     645052399
> >                  7     645052569    COUNTRYTIME LEMONADE
> >                          ITEM DETAILS - SORTED
> 23:41
> >
> > ------------------------------- DESC=' '
> ------------------------------------
> >
> >                             Obs       ITEM
> >
> >                              1     642621639
> >
> > Thanks
> > Ron T
> >
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to