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 (May 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 May 2001 06:54:35 -0700
Reply-To:     Pete Lund <pete.lund@NWCSR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Pete Lund <pete.lund@NWCSR.COM>
Subject:      Re: Count the number of " - "
Comments: To: gkirton@FILCS.COM
In-Reply-To:  <80256A57.004C6EFC.00@fil-notes01.filcs.com>
Content-Type: text/plain; charset="us-ascii"

Hi Graeme- Use the COMPRESS function to squish out the dashes and compare the length before and after:

data _null_; fn = "QSM001A-01-0007-b1-50-PRECON.csv"; NumDashes = length(fn) - length(compress(fn,'-')); put NumDashes=; run;

NumDashes=5

---------------------------------------------------------------------------- --- Pete Lund Northwest Crime and Social Research 313-D Fifth Ave SE Olympia, WA 98501 (360) 528-8970 - voice (360) 280-4892 - cell (360) 570-7533 - fax pete.lund@nwcsr.com www.nwcsr.com ---------------------------------------------------------------------------- ---

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU]On Behalf Of Graeme Kirton Sent: Friday, May 25, 2001 6:55 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Count the number of " - "

Can anyone tell me if there's a quick way to count the number of " - " in the following string. Im trying to do an error check on the filename. EG if the number of " - " doesn't equal five then STOP.

The names of the filenames do change.

QSM001A-01-0007-b1-50-PRECON.csv

Cheers Graeme ____________________________________________________________________________ ________________________________

Disclaimer

This email may contain privileged/confidential information and/or copyright material. It is intended only for the use of the person(s) to whom it is addressed and any unauthorised use may be unlawful. If you receive this email by mistake, please advise the sender immediately by using the reply facility on your email software and delete the material from your computer.

Opinions, conclusions and other information in this email that do not relate to the official business of this organisation shall be understood as neither given nor endorsed by it.

If this message forms part of a quotation, the quotation is an invitation to treat only. No contract subsists until Filtronic Plc (or its subsidiary companies) accepts your order. Acceptance of your order is made subject to our standard Terms and Conditions.

Website Address http://www.filtronic.com


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