| Date: | Wed, 2 Aug 2000 14:51:45 +0100 |
| Reply-To: | John Whittington <John.W@MEDISCIENCE.CO.UK> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | John Whittington <John.W@MEDISCIENCE.CO.UK> |
| Subject: | Re: replace new value to only part of a long string variable |
|
| In-Reply-To: | <E13Jy2j-00041v-00@relay1.netnames.net> |
| Content-Type: | text/plain; charset="us-ascii" |
|---|
At 07:48 02/08/00 -0500, Greg Woolridge wrote:
>Oops! I think you made a couple of mistakes. You have unbalanced quotes
>in first line and the substr should be on the left in the second line. The
>code should read:
>
> if substr(yourvar, 5, 8) = "10280005"
> then '10280079' = substr(yourvar, 5, 8) ;
>
Greg (and others) .... my apology for the typo (one of them was a double
quote, not single) which 'unbalanced' the quotes.
However, you are wrong about second assignbment statement; what I posted
was correct. If you think about the general principles of assignment
statements, when, in any computer language I know, code an assignment
statement of the form:
A = B
... then the value of B is asigned to A (which therefore has to be a
variable). One cannot 'assign a value' to '10280079' !!
Apologies again for the quote typo.
Kind Regards
John
----------------------------------------------------------------
Dr John Whittington, Voice: +44 (0) 1296 730225
Mediscience Services Fax: +44 (0) 1296 738893
Twyford Manor, Twyford, E-mail: John.W@mediscience.co.uk
Buckingham MK18 4EL, UK mediscience@compuserve.com
----------------------------------------------------------------
|