| Date: | Tue, 29 Nov 2005 13:27:31 -0500 |
| Reply-To: | "Srna, Carol (C.)" <csrna@FORD.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
|
| From: | "Srna, Carol (C.)" <csrna@FORD.COM> |
| Subject: | Re: Shouldl I Read the File Twice |
| Content-Type: | text/plain; charset=us-ascii |
Thanks for responding. When I look at the file with hex on, it shows
4 4
0 0 where the "dots" are, leading me to believe that these are not
"dots" but "spaces".
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Venita DePuy
Sent: Tuesday, November 29, 2005 1:21 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Shouldl I Read the File Twice
Try:
if substr(test2,1,4) = '....' then delete;
(assuming no other entry in test2 starts with 4 periods).
The substr function is saying to look at the substring of variable
test2, starting at the 1st position, and looking at a length of 4.
-Venita
"Srna, Carol (C.)" <csrna@FORD.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> 11/29/2005 12:30
PM Please respond to "Srna, Carol (C.)" <csrna@FORD.COM>
To
SAS-L@LISTSERV.UGA.EDU
cc
Subject
Shouldl I Read the File Twice
Hi Everyone. I need your help. Please tell me what I am doing wrong.
I only want an observation if the observation does not have
'..........................' in the DSN field. I do not want obs.
with The SAS System, or DATASET NAME, either.
Also, do I have to code 44 '.' to delete a field that has 44 '.'? Thanks
In Advance
Input data: (external file, FBA
The SAS System
JOB
DATASET NAME NAME
ACTION
------------ ----------
------------
...........................................
...........................................
...........................................
AA.PROD.DCCVOMER.DATA AA74Q82 UPDATED
AA.PROD.DCCVOMER.DATE HSM SCRATCHED
AA.PROD.DCCVOMER.DATE HSM MIGRATED
AA.TST.DCCVOMER.DATA AA74J12 READ
AA.TST.DCCVOMER.DATA AA74J12 READ
AA.TST.PROJECTS.LIST AA74J12 READ
AACAP13.ISPPROF.V4.DATA AACAP13 UPDATED
AACAP13.ISPPROF.V4.DATA AACAP13 UPDATED
AACAP13.ISPPROF.V4.DATA AACAP13 READ
CODE:
DATA FILE01;
INFILE IN01;
INPUT @1 TEST1 $7.
@1 TEST2 $44..
@1 TEST4 $12.@;
IF TEST1 EQ 'THE SAS' THEN DELETE;
IF TEST2 EQ '.................................................' THEN
DELETE;
IF TEST4 EQ 'DATASET NAME' THEN DELETE;
INPUT @1 DSN $44.;
|