Date: Thu, 23 Aug 2007 08:48:03 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: multiple dlm
Content-Type: text/plain; charset="US-ASCII"
Try the code below which reads the entire line and holds it so that you can
strip out the quotes and then read the line with the comma as a dlm and
also the comma informat (as someone else has already suggested) to handle
the amounts. My test file contained the line
filename indd 'c:\park\odddlm.txt';
infile indd dlm=',' truncover ;
_infile_ = compress(_infile_,'"');
input @1 num1 num2 amount comma8.2 ;
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Please respond to
Hi I have a txt file which has a dlm of "," for most of the
variables. I then have 3 date variables on the same file that use
just a , as the dlm. After these 3 date variables I have 3 payment
variables that also use the , dlm and have a $ to begin the variable.
The file is reading in everything except the 3 date variables
(including the payment variables).
I need to know a way to read in the file using multiple dlms, I can
not use line input since it is a dlm file.
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.