Date: Sat, 7 Nov 2009 17:51:14 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Problem with RENAME statement
Content-Type: text/plain; charset=ISO-8859-1
I doubt if it is the length of the statements, or stray characters, as Doug
sent me a copy of his code and it works fine, without any errors, on 9.1.3
running in a windows 2003 server environment.
On Sat, 7 Nov 2009 15:45:22 -0600, Doug Cacialli <doug.cacialli@GMAIL.COM>
>I'm running SAS 9.2 in both virtualized XP Pro (Virtual PC on Win 7)
>and Vista Ultimate environments. The error occurs in both OS's.
>I'm renaming a few hundred variables, so if length could be an issue
>I've most likely hit the point where it will be an issue. Some of the
>reliability variables are tweaked slightly, so renaming groups of
>variables (e.g., RENAME var1-var100 = rvar1-rvar100) won't work. I'll
>try your suggestion, see what happens, and let you know the result.
>I searched the archives, but nothing jumped out at me. I'll take
>another look there too. Thanks SO much.
>Douglas Cacialli, M.A. - Doctoral candidate
>Clinical Psychology Training Program
>University of Nebraska-Lincoln
>Lincoln, Nebraska 68588-0308
>On Sat, Nov 7, 2009 at 3:36 PM, Joe Matise <email@example.com> wrote:
>> That's been a problem posted on the list before... I don't recall
>> what you do, but I think it's related to the length of the program or
>> something else.
>> Are you using 9.1.3? The version would help, it's possible it's been
>> in a newer version.
>> Anyhow, if it's length related, try taking half of the program or so and
>> putting it in a second file, and either just running both programs
>> separately one after the other, or using %include to run the second half
>> from the first half. I'm not sure, but my vague memory tells me that
>> be the solution that was found before.
>> On Sat, Nov 7, 2009 at 1:05 PM, Doug Cacialli <firstname.lastname@example.org>
>>> Greetings SAS-L,
>>> I've encountered a troublesome little niggle that's led me to re-join
>>> the SAS-L listserv after being gone for a couple years.
>>> I'm working with a data set that's been passed on from
>>> person-to-person for the past few years. Half of the data set
>>> contains reliability data (data coded by a second rater) structured
>>> such that there's one observation per ID, and the second coder's data
>>> is contained in variables with an "r" prefix. The other half of the
>>> data set contains reliability data structured such that the second
>>> coder's data comprises a second observation with the same ID. I'm
>>> trying to write a script that will: (1) separate out any observations
>>> with duplicate ID's, and; (2) rename the variables with an "r" prefix,
>>> so that they can then be merged back in, resulting in a homogeneously
>>> structured data set.
>>> Everything works as I except it to, except the RENAME statement. I'm
>>> encountering the following error in the log:
>>> 2215 savryevaluator = revaluat
>>> 2216 savry1 = rsavry1
>>> 2217 savry1crit = ??? �??? rsavry1c;
>>> - -
>>> 22 200
>>> ERROR 22-322: Expecting a name.
>>> ERROR 200-322: The symbol is not recognized and will be ignored.
>>> ERROR 24-322: Variable name is not valid.
>>> 2217! savry1crit = ??? �??? rsavry1c;
>>> ERROR 22-322: Syntax error, expecting one of the following: a name, -,
>>> 2218 * savry2crit = rsavry2c
>>> ERROR: Missing numeric suffix on a numbered variable list (�-rsavry1c).
>>> ERROR: Old and new variable name specifications for RENAME must be of
>>> the same type. Statement
>>> is ignored.
>>> 2219 savry3 = rsavry3
>>> 2220 savry3crit = rsavry3c
>>> 2221 savry4 = rsavry4
>>> That jumbled sequence of characters in line 2217 doesn't appear in my
>>> script. I tried re-writing that line and the lines surrounding it and
>>> it reappears in the log when I run the script. I've tried looking at
>>> the file in notepad, but it looks the same in the enhanced editor.
>>> Does anyone have any suggestions here? I'd be happy to learn either
>>> what's going on to generate the error, or another way to accomplish
>>> the task. Any help would be appreciated.
>>> Thanks everyone.
>>> Douglas Cacialli, M.A. - Doctoral candidate
>>> Clinical Psychology Training Program
>>> University of Nebraska-Lincoln
>>> Lincoln, Nebraska 68588-0308