On Thu, 22 May 2014 00:05:27 -0500, Ron Thomas <[email protected]> wrote:
>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 > Others have suggested why SAS is displaying the quoted (blank value) DESC variable, generated from your PROC PRINT with the BY statement behavior. Suggest you might also diagnose your DATA step to determine/verify each input row's data-value for DESC field. Add these statements to the DATA step near the end: FORMAT DESC $HEX50. ; PUTLOG _ALL_; Also, SAS will help you determine the format/content of the DESC SAS variable based on your input data. Also, review your INFILE statement options as well, like TRUNCOVER or MISSOVER, depending on the input data format (RECFM FB or VB). As previously mentioned, you would be best served to subscribe to the SAS.COM supported list, as well. Scott Barry SBBWorks, Inc. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
