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 (January 2003, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Jan 2003 11:53:49 -0800
Reply-To:     "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Subject:      Re: Add'l infor on problem with EXCEL-SAS (fwd)
Comments: To: Lisa Kriese-Anderson <lkriese@ACESAG.AUBURN.EDU>
In-Reply-To:  <Pine.WNT.4.20.0301291020160.-294453@adspc24.auburn.edu>
Content-Type: text/plain; charset="us-ascii"; format=flowed

Lisa:

I stand corrected - leaving out the Excel file name if it's already opened does work - sorry.

*But*, perhaps you should check your LRECL for when I force mine to be less than what I know is there I get your error.

Note, I'd also recommend using the COLON modifier or and ATRRIB statement to deal w/ cells widths wider than SAS' default.

1 The SAS System 11:49 Wednesday, January 29, 2003

NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to VIERGEVER & ASSOCIATES, Site 0019446002. NOTE: This session is executing on the WIN_PRO platform.

NOTE: SAS initialization used: real time 0.15 seconds cpu time 0.13 seconds

1 *=============================================================================== 2 DDE_Test_01-29-2003: 3 4 Checking something for SAs-L (1/29/2003) 5 6 *==============================================================================; 7 *-- define this program's various filename(s) and vars ; 8 %let pgm1 = DDE_Test_01-29-2003 ; 9 *==============================================================================; 10 *OPTIONS OBS=1000; 11 *-- define options & output file destinations ; 12 options nocenter ls = 177 ps = 60 noxwait errors = 2 nodate ; 13 filename tab1 dde "excel|January 2003 Data Pull!r1c1:r58c7" notab lrecl = 80 ; 14 data _null_ ; 15 call symput("fdate",trim(left(put("&sysdate9"d,worddate.)))) ; 16 run ;

NOTE: DATA statement used: real time 0.01 seconds cpu time 0.01 seconds

17 *==============================================================================; 18 *-- our standard footnotes ; 19 footnote1 "Prepared by: Viergever & Associates, Sacramento, CA" ; 20 footnote2 "[&pgm1..sas, &systime &sysday, &fdate]" ; 21 *==============================================================================; 22 *-- 1st: load the Excel file of Provider names, fiscal year ranges, and misc. provider numbers ; 23 data tmp01 (drop = dummy) ; 24 infile tab1 dlm='09'x dsd truncover firstobs = 5 ; 25 input 26 client $75. 27 provno $9. 28 dhskey2 $7. 29 dummy mmddyy10. 30 fy_beg mmddyy10. 31 fy_end mmddyy10. 32 oshpdid $9. 33 ; 34 format fy_beg fy_end mmddyy10. ; 35 run ;

NOTE: The infile TAB1 is: DDE Session, SESSION=excel|January 2003 Data Pull!r1c1:r58c7, RECFM=V,LRECL=80

2 The SAS System

ERROR: Read Access Violation In Task ( DATASTEP ] ERROR: Read Access Violation In Task ( DATASTEP ] ERROR: Read Access Violation In Task ( DATASTEP ] Exception occurred at (3030322F) Exception occurred at (3030322F) Exception occurred at (3030322F) Task Traceback Task Traceback Task Traceback

At 10:22 AM 1/29/2003 -0600, Lisa Kriese-Anderson wrote:

> SAS-L > >Attached is the LOG file from my SAS program trying to read multiple >datasets. Perhaps I do need to "flush" the DDE statement ..... how is >that accomplished? > >Thanks for the help. > > >I "know" I did this is version 6.2 > >Maybe this is a version 8. difference > > >NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. >NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) > Licensed to AUBURN UNIVERSITY OFFICE OF INFORMATION TECHNOLOGY, Site >0001972001. >NOTE: This session is executing on the WIN_98 platform. > > > >NOTE: SAS initialization used: > real time 1.31 seconds > >1 /* This program is written to analyze 2001 P2R data where EXCEL >worksheets are used */ > >2 /* It is imperative that EXCEL be opened with the appropriate >spreadsheet. Otherwise */ > >3 /* you will see a physical file not found message in the SAS >log. */ > >4 >5 options pagesize=50; >6 >7 filename dderead1 dde 'excel|August 2001!r4c1:r189c77'; >8 filename dderead2 dde 'excel|Septmeber 01!r4c1:r65c73'; >9 /* >10 filename dderead3 dde 'excel|Survey01!r3c74:r63c74'; >11 filename dderead4 dde 'excel|Survey02!r2c1:r63c92'; >12 filename dderead5 dde 'excel|Survey02!r2c93:r63c93'; >13 filename dderead6 dde 'excel|Survey02!r2c94:r63c94'; */ >14 >15 >16 data august01; >17 format owner $char40.; >18 infile dderead1 dlm='09'X dsd notab missover lrecl=512; >19 >20 input >21 altag $ >22 farmtag $ >23 owner $ >24 ownercode $ >25 bdate $ >26 csex $ >27 sbreed $ >28 sireid $ >29 dbreed $ >30 damid $ >31 shipwt >32 muscle $ >33 begprice >34 alvalue >35 lot >36 vid >37 eid >38 ontestbf >39 ontestwt >40 frame >41 middate $ >42 midwt >43 midbf >44 midadg >45 sdate $ >46 dof >47 offwt >48 stunwt >49 offwt2 >50 offadg >51 totgain >52 dmfe >53 dmfeedlbs >54 affe >55 affeedlbs >56 feed >57 hospital >58 alliance >59 processing >60 yardage >61 insurance >62 interest >63 checkoff >64 subtot >65 trucking >66 total >67 cognt >68 costgain >69 hcw >70 trimhcw >71 ohcw >72 dressing >73 orea >74 marbsc $ >75 bf >76 rea >77 yg >78 qg $ >79 kph >80 harvest $ >81 topksprice >82 oliveprice >83 livewrth >84 sbase >85 sincent >86 sprice >87 stotal >88 junk >89 gbase >90 gincent >91 gprice >92 gtotal >93 carcval >94 lprofit >95 sprofit >96 gprofit >97 diff; >98 >99 if hospital = . then hospital = 0.00; >100 >101 if csex = 'heifer' then sex = 2; >102 if csex = 'steer' then sex = 1; >103 >104 month = 'aug'; >105 year = 2001; >106 > >NOTE: The infile DDEREAD1 is: > DDE Session, > SESSION=excel|August 2001!r4c1:r189c77,RECFM=V, > LRECL=512 > >NOTE: 186 records were read from the infile DDEREAD1. > The minimum record length was 240. > The maximum record length was 465. >NOTE: The data set WORK.AUGUST01 has 186 observations and 80 variables. >NOTE: DATA statement used: > real time 0.15 seconds > > >107 proc means; >108 > >NOTE: There were 186 observations read from the data set WORK.AUGUST01. >NOTE: PROCEDURE MEANS used: > real time 0.11 seconds > > >109 data september01; >110 format owner $char40.; >111 infile dderead2 dlm='09'X dsd notab missover lrecl=450; >112 >113 input >114 altag $ >115 farmtag $ >116 owner $ >117 ownercode $ >118 bdate $ >119 csex $ >120 sbreed $ >121 sireid $ >122 dbreed $ /* September 2001 calves */ >123 damid $ >124 shipwt >125 muscle $ >126 begprice >127 alvalue >128 lot >129 vid >130 eid >131 ontestbf >132 ontestwt >133 frame >134 middate $ >135 midwt >136 midbf >137 midadg >138 sdate $ >139 dof >140 offwt >141 stunwt >142 offadg >143 totgain >144 dmfe >145 dmfeedlbs >146 affe >147 affeedlbs >148 feed >149 hospital >150 alliance >151 processing >152 yardage >153 insurance >154 interest >155 checkoff >156 subtot >157 trucking >158 total >159 cognt >160 costgain >161 hcw >162 trimhcw >163 dressing >164 bf >165 orea >166 rea >167 yg >168 qg $ >169 kph >170 harvest $ >171 topksprice >172 livewrth >173 sbase >174 sincent >175 sprice >176 stotal >177 junk >178 gbase >179 gincent >180 gprice >181 gtotal >182 carcval >183 lprofit >184 sprofit >185 gprofit >186 diff; >187 >188 if hospital = . then hospital = 0.00; >189 >190 if csex = 'heifer' then sex = 2; >191 if csex = 'steer' then sex = 1; >192 >193 month = 'sep'; >194 >195 year = 2001; >196 > >ERROR: Read Access Violation In Task ( DATASTEP ] >Exception occurred at (67E6883B) >Task Traceback > >NOTE: The SAS System stopped processing this step because of errors. >WARNING: The data set WORK.SEPTEMBER01 may be incomplete. When this step >was stopped there > were 0 observations and 76 variables. >NOTE: DATA statement used: > real time 0.04 seconds > > > >197 proc means; >198 run; > >NOTE: No observations in data set WORK.SEPTEMBER01. >NOTE: PROCEDURE MEANS used: > real time 0.06 seconds > > >199 >ERROR: Read Access Violation In Task ( DATASTEP ] >Exception occurred at (67E6883B) >Task Traceback > >NOTE: DATA statement used: > real time 0.00 seconds > >200 data all11; set august01 september01; > >NOTE: SCL source line. >201 parrea = 11 + ((hcw -600)/100)*1.2; > ------ > 180 > >ERROR 180-322: Statement is not valid or it is used out of proper order. > >202 >ERROR: Read Access Violation In Task ( PRINT ] >Exception occurred at (67E6883B) >Task Traceback > >NOTE: PROCEDURE PRINT used: > real time 0.00 seconds > >NOTE: SCL source line. >203 proc print data =all1; var rea parrea owner ownercode; > --- > 180 > > >ERROR 180-322: Statement is not valid or it is used out of proper order. > >204 run;

------------------------------------------------------------ William W. Viergever Voice : (916) 483-8398 Viergever & Associates Fax : (916) 486-1488 Sacramento, CA 95825 E-mail : wwvierg@attglobal.net ------------------------------------------------------------


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