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 (March 1999, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Mar 1999 11:33:03 +1000
Reply-To:     Support <support@INTRAWARES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Support <support@INTRAWARES.COM>
Organization: Intrawares
Subject:      Re: Text file output problem
Content-Type: text/plain; charset=us-ascii

Hi John You cant use functions in put statments you need to do somthing like this. Regards Jon

data _null_; * Allows you to use a datastep but not make a dataset; set in.combined; file makeapr; length tempvar; tempvar=left(SUBSTR(dx1code,1,3)); put @1 jencntr $8. @14 jencntr $17. @66 admdate mmddyy8. @76 dischdte mmddyy8. @86 los 4. @100 age 3. @106 sex $1. @119 tempvar $3.; ... run;

John Welton wrote: > > Could someone advise me on the error code in line 28 - I'm sure its > something very basic I'm doing wrong but can't figure it out. > > Thanks, John > > 1 The SAS System > 12:58 Wednesday, March 24, 1999 > > NOTE: Copyright (c) 1989-1996 by SAS Institute Inc., Cary, NC, USA. > NOTE: SAS (r) Proprietary Software Release 6.12 TS055 > Licensed to UNIVERSITY OF NORTH CAROLINA, Site 0005540021. > > SAS 6.12 on the UNC-Chapel Hill ATN Statistical Server (statapps.unc.edu). > > If you encounter any problems, please report them to the ATN Technical > Assistance Center at 962-5261 or send e-mail to help@unc.edu. > > NOTE: AUTOEXEC processing beginning; file is /opt2/sas612/autoexec.sas. > > NOTE: USING LARGE FILE IMPLEMENTATION. > NOTE: SAS initialization used: > real time 0.930 seconds > cpu time 0.078 seconds > > NOTE: AUTOEXEC processing completed. > > 1 *---------------------------------------------------------------; > 2 * TITLE : Makes APR-DRG text file ; > 3 * FILENAME : make_APR.sas ; > 4 * DESCRIPTION : Setup for /sos1/welton ; > 5 * DATE : Mar, 99 ; > 6 *---------------------------------------------------------------; > 7 > 8 * Note: dcdata is converted hifx4 file from original UB82 dataset > 9 * Outputs new file aprdrg4.txt > 10 > 11 * FOOTNOTES, OPTIONS, AND FILEREFS; > 12 options nocenter obs=2000; > 13 libname in '/sos1/welton'; > NOTE: Libref IN was successfully assigned as follows: > Engine: V612 > Physical Name: /sos1/welton > 14 libname out '/afs/isis.unc.edu/home/w/e/welton'; > NOTE: Libref OUT was successfully assigned as follows: > Engine: V612 > Physical Name: /afs/isis.unc.edu/home/w/e/welton > 15 > 16 Proc Format; > 17 value died 1='Died in hospital' > 18 2='Discharged alive' > 19 other='Miscoded'; > NOTE: Format DIED has been output. > 20 > 21 * DATASTEP; > 22 filename makeapr 'makeapr4.txt' LRECL=258; > > NOTE: PROCEDURE FORMAT used: > real time 1.700 seconds > cpu time 0.041 seconds > > 2 The SAS System > 12:58 Wednesday, March 24, 1999 > > 23 data; > 24 set in.combined; > 25 file makeapr; > 26 put @1 jencntr $8. @14 jencntr $17. @66 admdate mmddyy8. > 27 @76 dischdte mmddyy8. @86 los 4. @100 age 3. @106 sex $1. > 28 @119 SUBSTR(dx1code,1,3) > _ > _ > _ > 22 > 22 > 22 > 29 @122 SUBSTR(dx1code,5,1) > 30 @123 " " > 31 @199 SUBSTR(procode,1,2) > 32 @201 SUBSTR(procode,5,1) > 33 @202 " " > 34 @255 SUBSTR(prcode15,1,2) > 35 @258 " " > 36 ; > 37 > 38 run; > > ERROR 22-322: Expecting one of the following: [, {. The statement is being > ignored. > ERROR 22-322: Expecting one of the following: [, {. The statement is being > ignored. > ERROR 22-322: Expecting one of the following: [, {. The statement is being > ignored. > > NOTE: The SAS System stopped processing this step because of errors. > NOTE: SAS set option OBS=0 and will continue to check statements. This may > cause NOTE: No observations in data set. > WARNING: The data set WORK.DATA1 may be incomplete. When this step was > stopped there were 0 observations and 125 variables. > NOTE: DATA statement used: > real time 0.840 seconds > cpu time 0.030 seconds > > 39 > > ERROR: Errors printed on page 2. > ERROR: Errors printed on page 2. > ERROR: Errors printed on page 2. > > NOTE: The SAS System used: > real time 4.070 seconds > cpu time 0.176 seconds > > NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414

-- ______________________________ :-)Intrawares ...leading edge data tools ...world class SAS consultants ______________________________ www.intrawares.com sales@intrawares.com support@intrawares.com ph 02 94279406 fax 02 94200967


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