LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 2 Oct 2008 10:04:30 -0400
Reply-To:     Hari Nath <hari_s_nath@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Hari Nath <hari_s_nath@YAHOO.COM>
Subject:      Re: Warning: Truncated record
Comments: To: "Howard Schreier <hs AT dc-sug DOT org>"
          <schreier.junk.mail@GMAIL.COM>

Thanks a lot Howard. Breaking the put statement in to shorter lines works great.

On Wed, 1 Oct 2008 22:04:07 -0400, Howard Schreier <hs AT dc-sug DOT org> <schreier.junk.mail@GMAIL.COM> wrote:

>On Mon, 29 Sep 2008 19:46:26 -0400, Hari Nath <hari_s_nath@YAHOO.COM> wrote: > >>Hi all, >>From the sas website (http://support.sas.com/kb/5/953.html), it says to >>reduce the line length to less than 256 characters. I tried like option >>pagesize = 255 and then in the file statement, used n=ps which didnt work >>either....following is my log file........ > >It has nothing to do with output or with data. It's about the way the SAS >*code* is composed. Shorten the lines. For example, instead of > > put 'This is an excessively log line of code' 'It should be shorter.'; > >make it > > put 'This is an execessively log line of code' > 'It should be shorter.'; > >> >> >>**********my log file*************; >> >>122 data _null_ ; >>123 set data.model_current_retail ; >>124 file "/c:/model_current_retail.csv" dlm = "|" dsd lrecl = >>32767 ; >>125 >>126 if _n_ = 1 then >>127 do ; >>128 >>WARNING: Truncated record. >>129 >> put 'CUSTOMER_KEY' '|' 'POINTS_AVAILABLE' '|' 'retailseg' '|' 'prio >>r_pts' '|' 'prior_seg' '|' 'cell_pts' '|' 'cell_seg' '|' 'cell2_seg' '|' 'c >>ardtype' '|' 'is_Blue' '|' 'is_Copper' '|' 'is_Gold' '|' 'is_Platinum' '| ' >>'pts_available_hun' '|' >>129 ! 'points_cent' >>130 '|' 'int_plat_pntsava_n' '|' 'LTD_REDEEM' '|' 'BLOCK_RECLASS_C OD >>E' '|' 'opendate' '|' 'vintage' '|' 'vintage_yr' '|' 'vintage_yr_squared' ' >>|' 'vintage_yr_cube' '|' 'dmaregion' '|' 'is_Region_missing' '|' 'is_10_R eg >>ion' '|' 'is_20_Region' '|' >>131 'is_30_Region' '|' 'is_40_Region' '|' 'is_50_Region' '|' 'deli nq >>uent_d' '|' 'ever_delinquent' '|' 'CARDMEMBER_AGE' '|' 'zip_region' '|' ' ca >>rdmember_age_cat' '|' 'is_age_miss' '|' 'is_age_le30' '|' 'is_age_30_40' '| >>' 'is_age_40_50' '|' >>131 ! 'is_age_50_60' '|' >>132 'is_age_60_70' '|' 'is_age_70_80' '|' 'is_age_gt80' '|' 'is_ag e_ >>gt70' '|' 'EVER_OWNED_OR_LEASED_GM_FLAG' '|' 'CURRENT_FLEET_LOYALTY_DESC' ' >>|' 'is_defectormixed' '|' 'is_gmmixed' '|' 'is_gmonly' '|' 'is_pureconque st >>' '|' 'is_resloyalist' '|' >>132 ! 'is_unknown' >>133 '|' 'ever_owned_or_leased_gm_flag_new' '|' 'is_owned' ; >>138 >>139 end ; >>140 >>141 do ; >>142 put CUSTOMER_KEY POINTS_AVAILABLE retailseg prior_pts >>prior_seg cell_pts cell_seg cell2_seg cardtype is_Blue is_Copper is_Gold >>is_Platinum pts_available_hun points_cent int_plat_pntsava_n LTD_REDEEM >>BLOCK_RECLASS_CODE opendate vintage >>142 ! vintage_yr >>143 vintage_yr_squared vintage_yr_cube dmaregion is_Region_missing >>is_10_Region is_20_Region is_30_Region is_40_Region is_50_Region >>delinquent_d ever_delinquent CARDMEMBER_AGE zip_region cardmember_age_cat >>is_age_miss is_age_le30 is_age_30_40 >>143 ! is_age_40_50 >>144 is_age_50_60 is_age_60_70 is_age_70_80 is_age_gt80 is_age_gt70 >>EVER_OWNED_OR_LEASED_GM_FLAG CURRENT_FLEET_LOYALTY_DESC is_defectormixed >>is_gmmixed is_gmonly is_pureconquest is_resloyalist is_unknown >>ever_owned_or_leased_gm_flag_new is_owned ; >>149 end ; >>150 run ; >> >>NOTE: 765 records were written to the file "/c:/model_current_retail.csv". >> The minimum record length was 0. >> The maximum record length was 1518. >>NOTE: There were 513 observations read from the data set >>DATA.MODEL_CURRENT_RETAIL. >>NOTE: DATA statement used (Total process time): >> real time 0.00 seconds >> cpu time 0.03 seconds >> >> >>On Mon, 29 Sep 2008 17:21:44 -0400, Hari Nath <hari_s_nath@YAHOO.COM> >>wrote: >> >>>Sorry, I was wrong here. Now am not sure what the warning supposed to mean >>>and what i should be aware of. >>> >>>On Mon, 29 Sep 2008 17:11:21 -0400, Hari Nath <hari_s_nath@YAHOO.COM> >>>wrote: >>> >>>>Hi all, >>>>Am writing out a delimited file and the first row contains the variable >>>>names. One of the variable name is 32 in length, but when writing to the >>>>flat file it puts only 28 characters, which is why i see the warning >>>>message. Is there a way to avoid the warning or make sas to write without >>>>truncating the records...sas unix, version 9.1.3 >>>> >>>>Many thanks, >>>>hari.


Back to: Top of message | Previous page | Main SAS-L page