Discussion:
ERROR: The value 205DAI is not a valid SAS name
(too old to reply)
s***@hotmail.com
2005-05-18 15:55:26 UTC
Permalink
Hi,

I received several SAS transport V6(.v6x) files, most of them are named
begin with numbers. When I use the following codes to import to SAS
v8.2, I got error message as the title. Any comments are appreciated!
(I get those files weekly, and would ranther not to change names
manually every time)

libname test 'c:\temp';
filename tranfile "c:\temp\205dai.v6x";
proc cimport library=test infile=tranfile;
run;


Thanks!

Helen
s***@hotmail.com
2005-05-18 16:04:26 UTC
Permalink
Sorry, I think it is a problem of variable name '205DAI'. Because I
changed the file name and still got this error.

I tried 'options validvarname=v6;' or any, still it is not working. Any
ideas?

Helen
Ace
2005-05-18 16:09:47 UTC
Permalink
Post by s***@hotmail.com
Sorry, I think it is a problem of variable name '205DAI'. Because I
changed the file name and still got this error.
I tried 'options validvarname=v6;' or any, still it is not working. Any
ideas?
SAS names starting with numerics are only allowed under the V7 naming
convention, although how this could be written into a V6 transport
file I'm not sure...
--
Ace in Basel - brucedotrogers a.t rochedotcom
Fehd, Ronald J
2005-05-18 16:08:07 UTC
Permalink
Post by s***@hotmail.com
Sorry, I think it is a problem of variable name '205DAI'.
Because I changed the file name and still got this error.
I tried 'options validvarname=v6;' or any, still it is not
working. Any ideas?
SAS names can begin with only letters or underscore
so either of:
_205DAI
D205DAI
would correct your error.

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov
s***@hotmail.com
2005-05-18 17:37:51 UTC
Permalink
Thanks for the responses. But I still don't know how to read in SAS.

I tried to change file names including extension ones, still no luck. I
don't know whether those files are generated by Proc Cport or Xport, I
got them from a zip file and some of them I did successfully import to
SAS.

According to the file specification document, there are no variable
names begin with a number for 205dai.v6x and other files. I across
checked those SAS datasets I successfully imported, their variables are
exactly macth with the document. So I suppose all variables of 205dai
should be correct. I just don't know where 'ERROR: The value 205DAI is
not a valid SAS name.' stuff could possibly come from. I am not very
familiar with transport files. Maybe I missed something?

Helen
s***@hotmail.com
2005-05-18 18:39:25 UTC
Permalink
I believe that the error is caused by SAS dataset name begins with a
number. Is there a way that I can import v6 SAS datasets whose names
begin with numbers inot SAS8.2? I tried LIBNAME TEST V6 'C:\TEMP'; it
isn't working. Any help?
Thanks!
Gerhard Hellriegel
2005-05-18 16:38:38 UTC
Permalink
What I do not understand: what is the extension ".v6x" ? Is that a file
which is created with PROC CPORT? There is no special extension you need to
use with CPORT for the transportfiles. Or is that something which is created
via the XPORT - engine? I think it is not possible, that the 205dai from the
physical filename could be the reason! In V6 it was not possible to use SAS
names starting with numerics, nor is it possible in 8 or 9. Maybe in V7
(?)... So I think, the error message is misleading! Could you try to rename
one file to 205dai.xxx instead of 205dai.v6x ? Maybe SAS tries to make
something with that v6x ??
Post by s***@hotmail.com
Hi,
I received several SAS transport V6(.v6x) files, most of them are named
begin with numbers. When I use the following codes to import to SAS
v8.2, I got error message as the title. Any comments are appreciated!
(I get those files weekly, and would ranther not to change names
manually every time)
libname test 'c:\temp';
filename tranfile "c:\temp\205dai.v6x";
proc cimport library=test infile=tranfile;
run;
Thanks!
Helen
David L. Cassell
2005-05-18 18:49:37 UTC
Permalink
Post by s***@hotmail.com
I believe that the error is caused by SAS dataset name begins with a
number.
I agree.
Post by s***@hotmail.com
Is there a way that I can import v6 SAS datasets whose names
begin with numbers inot SAS8.2? I tried LIBNAME TEST V6 'C:\TEMP'; it
isn't working. Any help?
The key point is that this is NOT really a SAS V6 data set, since
SAS V6 could NOT use data sets with names starting with a number.
The only legal data set names in SAS V6 all have the form

[a-zA-Z_]\w{,7}

which means:

first letter:
a to z, or A to Z, or an underscore
then 0 to 7 more characters, which could be any of:
a to z, A to Z, 0 to 9, or an underscore

Your "205DAI" is not a legal SAS V6 name, either for data sets or for
variables. Are you sure this was the original name of a SAS data set,
or could this have been created in some other program and converted to
a transport format by some intermediate program like DBMSCopy?

Try renaming the data set. Change the '2' to a 'T' and see if you
can read it in.

HTH,
David
--
David Cassell, CSC
***@epa.gov
Senior computing specialist
mathematical statistician
s***@hotmail.com
2005-05-18 19:33:16 UTC
Permalink
I tried to open '205DAI.v6x' in UltraEdit-32, here it is the biginning
part:

LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI VAR COUNT 11 REC COUNT 13 ...........

I tried rename '205DAI' to 'T05DAI' and save it, this time I got error
message:

ERROR: The character variable SITENO has too long a value for the TEST
library.

still, I couldn't import it to SAS. I don't know other way to rename
dataset because I can't see it in SAS at all. And modifying a file
using UltraEdit doesn't work out. Any other ideas? I really appreciate
it.

Helen
Choate,
2005-05-18 19:14:51 UTC
Permalink
That should be...

Rename '205DAI'n=v205DAI;

hth

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of Choate,
***@DDS
Sent: Wednesday, May 18, 2005 12:03 PM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: ERROR: The value 205DAI is not a valid SAS name

Helen -

I think these may be legal names if VALIDVARNAME=ANY is turned on.

Try "options VALIDVARNAME=ANY;" before your import.

If it works you can use rename to clean up the names.

Rename '205DAI'='v205DAI';

Then you can reset VALIDVARNAME=V7.

hth

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
***@HOTMAIL.COM
Sent: Wednesday, May 18, 2005 11:39 AM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: ERROR: The value 205DAI is not a valid SAS name

I believe that the error is caused by SAS dataset name begins with a
number. Is there a way that I can import v6 SAS datasets whose names
begin with numbers inot SAS8.2? I tried LIBNAME TEST V6 'C:\TEMP'; it
isn't working. Any help?
Thanks!
Choate,
2005-05-18 19:03:11 UTC
Permalink
Helen -

I think these may be legal names if VALIDVARNAME=ANY is turned on.

Try "options VALIDVARNAME=ANY;" before your import.

If it works you can use rename to clean up the names.

Rename '205DAI'='v205DAI';

Then you can reset VALIDVARNAME=V7.

hth

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
***@HOTMAIL.COM
Sent: Wednesday, May 18, 2005 11:39 AM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: ERROR: The value 205DAI is not a valid SAS name

I believe that the error is caused by SAS dataset name begins with a
number. Is there a way that I can import v6 SAS datasets whose names
begin with numbers inot SAS8.2? I tried LIBNAME TEST V6 'C:\TEMP'; it
isn't working. Any help?
Thanks!
David L. Cassell
2005-05-18 21:40:34 UTC
Permalink
Post by s***@hotmail.com
I tried to open '205DAI.v6x' in UltraEdit-32, here it is the biginning
LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI VAR COUNT 11 REC COUNT 13 ...........
I tried rename '205DAI' to 'T05DAI' and save it, this time I got error
ERROR: The character variable SITENO has too long a value for the TEST
library.
still, I couldn't import it to SAS. I don't know other way to rename
dataset because I can't see it in SAS at all. And modifying a file
using UltraEdit doesn't work out. Any other ideas? I really appreciate
it.
First off, opening binary files in a text editor and saving them
can cause all manner of problems. Did you make sure that you saved it
as a binary file, rather than as a text file, which would introduce
all kinds of headaches?

Don't open the file to rename it. Use Windows Explorer and rename
it with a right-click.

HTH,
David
--
David Cassell, CSC
***@epa.gov
Senior computing specialist
mathematical statistician
s***@hotmail.com
2005-05-19 12:02:04 UTC
Permalink
Here it is my log file:


1 options VALIDVARNAME=ANY;
WARNING: Only the Base product and the SAS/STAT product have been
tested for use with
VALIDVARNAME=ANY. Other use of this option is considered
experimental and
may cause undetected errors.
2 libname test v6 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V6
Physical Name: c:\temp
3 filename tranfile "c:\temp\T05DAI.v6x";
4 proc cimport library=test infile=tranfile; run;

ERROR: The value '205DAI'n is not a valid SAS name.
WARNING: Skipping data set due to error.
NOTE: PROCEDURE CIMPORT used:
real time 0.00 seconds
cpu time 0.00 seconds

I tried everything, still got this annoying ERROR. Can I get further
help? Many thanks!

Helen
Howard Schreier <hs AT dc-sug DOT org>
2005-05-19 02:20:43 UTC
Permalink
Unfortunately, renaming the file (that is, the entity known to the host OS)
won't do a bit of good. It's just fine as it is, because there is no need
for it to conform to SAS name rules.

It's the SAS data set name embedded in the file which has to be SAS-legal.

I think David's earlier speculation about DBMS/COPY (or some other third-
party tool) being involved is dead on. I was able to replicate Helen's
problem using DBMS/COPY. Here is the code:

compute;
in=c:\temp\people.xls7
out=c:\temp\123bad.sasport;
run;

This copied a source table (which happened to be Excel; that's incidental)
to a SAS transport file. The output file name (123BAD) is used in two
places: to name the file being created and stored in the host file system,
and embedded within the file as the name of the SAS data set being
transported. DBMS/COPY uses the same name in both contexts, and fails to
enforce SAS name rules.

So it seems that patching the file, to make the embedded name conform to
SAS rules, is necessary. As David points out, it's also treacherous. If I
were Helen I would make every effort to communicate upstream to the data
supplier and get the practice changed.

On Wed, 18 May 2005 14:40:34 -0700, David L. Cassell
Post by David L. Cassell
Post by s***@hotmail.com
I tried to open '205DAI.v6x' in UltraEdit-32, here it is the biginning
LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI VAR COUNT 11 REC COUNT 13 ...........
I tried rename '205DAI' to 'T05DAI' and save it, this time I got error
ERROR: The character variable SITENO has too long a value for the TEST
library.
still, I couldn't import it to SAS. I don't know other way to rename
dataset because I can't see it in SAS at all. And modifying a file
using UltraEdit doesn't work out. Any other ideas? I really appreciate
it.
First off, opening binary files in a text editor and saving them
can cause all manner of problems. Did you make sure that you saved it
as a binary file, rather than as a text file, which would introduce
all kinds of headaches?
Don't open the file to rename it. Use Windows Explorer and rename
it with a right-click.
HTH,
David
--
David Cassell, CSC
Senior computing specialist
mathematical statistician
Hi,
I received several SAS transport V6(.v6x) files, most of them are named
begin with numbers. When I use the following codes to import to SAS
v8.2, I got error message as the title. Any comments are appreciated!
(I get those files weekly, and would ranther not to change names
manually every time)
libname test 'c:\temp';
filename tranfile "c:\temp\205dai.v6x";
proc cimport library=test infile=tranfile;
run;
Thanks!
Helen
Gerhard Hellriegel
2005-05-19 09:06:00 UTC
Permalink
David, unfortunately I think that will not help at all: the problem is NOT
the external (physical) name of the dataset! It is a SAS-internal name where
the problem is located. That is a MS-DOS / SAS V6.03 dataset! Question is:
is that really a transport file? I'm not sure, if there was a PROC CPORT in
V6.03? Did you try to access that thing with

libname a XPORT "C:\....."; ??

That is really many years ago, that I sometimes had to do something with V6.
03. You should try to contact SAS Institutes hotline. They might have some
old documentation for the old DOS version. There must be a trick to get the
numeric-starting names into V8, because in V6.12 for Windows that names also
were not legal and there must have been a opportunity to get the data in.

What I think is: that is a original V6.03 SAS dataset!

So please try the following:

assign a libname with the V604 engine, like:

LIBNAME a V604 "C:\"; Only with the path! Without datset-name and
extension! Then open that liubname with the LIB command and have a look what
you see. Maybe that's the solution. Really use V604, not V603! Only V604 is
valid!





On Wed, 18 May 2005 14:40:34 -0700, David L. Cassell
Post by David L. Cassell
Post by s***@hotmail.com
I tried to open '205DAI.v6x' in UltraEdit-32, here it is the biginning
LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI VAR COUNT 11 REC COUNT 13 ...........
I tried rename '205DAI' to 'T05DAI' and save it, this time I got error
ERROR: The character variable SITENO has too long a value for the TEST
library.
still, I couldn't import it to SAS. I don't know other way to rename
dataset because I can't see it in SAS at all. And modifying a file
using UltraEdit doesn't work out. Any other ideas? I really appreciate
it.
First off, opening binary files in a text editor and saving them
can cause all manner of problems. Did you make sure that you saved it
as a binary file, rather than as a text file, which would introduce
all kinds of headaches?
Don't open the file to rename it. Use Windows Explorer and rename
it with a right-click.
HTH,
David
--
David Cassell, CSC
Senior computing specialist
mathematical statistician
Gerhard Hellriegel
2005-05-19 09:12:27 UTC
Permalink
Right, that has nothing to do with the external name! I think also, renaming
the file will not lead to a solution, if that is not a transport file at
all! Maybe it is a original V603 (a very old version for MS-DOS!!!) file? Or
a file which was created by the LIBNAME - XPORT engine?
Sure is: it has nothing to do with V7 !!!!



On Wed, 18 May 2005 22:20:43 -0400, Howard Schreier <hs AT dc-sug DOT org>
Post by Howard Schreier <hs AT dc-sug DOT org>
Unfortunately, renaming the file (that is, the entity known to the host OS)
won't do a bit of good. It's just fine as it is, because there is no need
for it to conform to SAS name rules.
It's the SAS data set name embedded in the file which has to be SAS-legal.
I think David's earlier speculation about DBMS/COPY (or some other third-
party tool) being involved is dead on. I was able to replicate Helen's
compute;
in=c:\temp\people.xls7
out=c:\temp\123bad.sasport;
run;
This copied a source table (which happened to be Excel; that's incidental)
to a SAS transport file. The output file name (123BAD) is used in two
places: to name the file being created and stored in the host file system,
and embedded within the file as the name of the SAS data set being
transported. DBMS/COPY uses the same name in both contexts, and fails to
enforce SAS name rules.
So it seems that patching the file, to make the embedded name conform to
SAS rules, is necessary. As David points out, it's also treacherous. If I
were Helen I would make every effort to communicate upstream to the data
supplier and get the practice changed.
On Wed, 18 May 2005 14:40:34 -0700, David L. Cassell
Post by David L. Cassell
Post by s***@hotmail.com
I tried to open '205DAI.v6x' in UltraEdit-32, here it is the biginning
LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI VAR COUNT 11 REC COUNT 13 ...........
I tried rename '205DAI' to 'T05DAI' and save it, this time I got error
ERROR: The character variable SITENO has too long a value for the TEST
library.
still, I couldn't import it to SAS. I don't know other way to rename
dataset because I can't see it in SAS at all. And modifying a file
using UltraEdit doesn't work out. Any other ideas? I really appreciate
it.
First off, opening binary files in a text editor and saving them
can cause all manner of problems. Did you make sure that you saved it
as a binary file, rather than as a text file, which would introduce
all kinds of headaches?
Don't open the file to rename it. Use Windows Explorer and rename
it with a right-click.
HTH,
David
--
David Cassell, CSC
Senior computing specialist
mathematical statistician
Hi,
I received several SAS transport V6(.v6x) files, most of them are named
begin with numbers. When I use the following codes to import to SAS
v8.2, I got error message as the title. Any comments are appreciated!
(I get those files weekly, and would ranther not to change names
manually every time)
libname test 'c:\temp';
filename tranfile "c:\temp\205dai.v6x";
proc cimport library=test infile=tranfile;
run;
Thanks!
Helen
Howard Schreier <hs AT dc-sug DOT org>
2005-05-19 12:17:21 UTC
Permalink
I don't see many options.

Can you get the party or parties supplying the data to use valid SAS names?

If not, I think you are faced with the necessity of pre-processing each
file (perhaps with SAS; perhaps with something else) to replace the
embedded invalid names with valid ones, without corrupting anything else.
Post by s***@hotmail.com
1 options VALIDVARNAME=ANY;
WARNING: Only the Base product and the SAS/STAT product have been
tested for use with
VALIDVARNAME=ANY. Other use of this option is considered
experimental and
may cause undetected errors.
2 libname test v6 'c:\temp';
Engine: V6
Physical Name: c:\temp
3 filename tranfile "c:\temp\T05DAI.v6x";
4 proc cimport library=test infile=tranfile; run;
ERROR: The value '205DAI'n is not a valid SAS name.
WARNING: Skipping data set due to error.
real time 0.00 seconds
cpu time 0.00 seconds
I tried everything, still got this annoying ERROR. Can I get further
help? Many thanks!
Helen
Howard Schreier <hs AT dc-sug DOT org>
2005-05-19 12:09:46 UTC
Permalink
I should have mentioned that when I used a valid SAS name in the DBMS/COPY
code (eg, _123GOOD rather than 123BAD), it generated a file which was
processed successfully by PROC CIMPORT. That seems to isolate the problem.
Post by Gerhard Hellriegel
Right, that has nothing to do with the external name! I think also,
renaming
Post by Gerhard Hellriegel
the file will not lead to a solution, if that is not a transport file at
all! Maybe it is a original V603 (a very old version for MS-DOS!!!) file?
Or
Post by Gerhard Hellriegel
a file which was created by the LIBNAME - XPORT engine?
Sure is: it has nothing to do with V7 !!!!
On Wed, 18 May 2005 22:20:43 -0400, Howard Schreier <hs AT dc-sug DOT org>
Post by Howard Schreier <hs AT dc-sug DOT org>
Unfortunately, renaming the file (that is, the entity known to the host
OS)
Post by Gerhard Hellriegel
Post by Howard Schreier <hs AT dc-sug DOT org>
won't do a bit of good. It's just fine as it is, because there is no need
for it to conform to SAS name rules.
It's the SAS data set name embedded in the file which has to be SAS-legal.
I think David's earlier speculation about DBMS/COPY (or some other third-
party tool) being involved is dead on. I was able to replicate Helen's
compute;
in=c:\temp\people.xls7
out=c:\temp\123bad.sasport;
run;
This copied a source table (which happened to be Excel; that's incidental)
to a SAS transport file. The output file name (123BAD) is used in two
places: to name the file being created and stored in the host file system,
and embedded within the file as the name of the SAS data set being
transported. DBMS/COPY uses the same name in both contexts, and fails to
enforce SAS name rules.
So it seems that patching the file, to make the embedded name conform to
SAS rules, is necessary. As David points out, it's also treacherous. If I
were Helen I would make every effort to communicate upstream to the data
supplier and get the practice changed.
On Wed, 18 May 2005 14:40:34 -0700, David L. Cassell
Post by David L. Cassell
Post by s***@hotmail.com
I tried to open '205DAI.v6x' in UltraEdit-32, here it is the biginning
LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI VAR COUNT 11 REC COUNT 13 ...........
I tried rename '205DAI' to 'T05DAI' and save it, this time I got error
ERROR: The character variable SITENO has too long a value for the TEST
library.
still, I couldn't import it to SAS. I don't know other way to rename
dataset because I can't see it in SAS at all. And modifying a file
using UltraEdit doesn't work out. Any other ideas? I really appreciate
it.
First off, opening binary files in a text editor and saving them
can cause all manner of problems. Did you make sure that you saved it
as a binary file, rather than as a text file, which would introduce
all kinds of headaches?
Don't open the file to rename it. Use Windows Explorer and rename
it with a right-click.
HTH,
David
--
David Cassell, CSC
Senior computing specialist
mathematical statistician
Hi,
I received several SAS transport V6(.v6x) files, most of them are named
begin with numbers. When I use the following codes to import to SAS
v8.2, I got error message as the title. Any comments are appreciated!
(I get those files weekly, and would ranther not to change names
manually every time)
libname test 'c:\temp';
filename tranfile "c:\temp\205dai.v6x";
proc cimport library=test infile=tranfile;
run;
Thanks!
Helen
s***@hotmail.com
2005-05-19 13:28:26 UTC
Permalink
Thanks for all your efforts. I tried engine v604, got same error.
I don't know whether the party who gave me the file uses DBMS/COPY or
other method to generated the transport file. I suppose the last option
is to ask them to rename those datasets. Thanks again!

Helen
Gerhard Hellriegel
2005-05-19 12:55:02 UTC
Permalink
wrong engine! The right one is V604. I really don't remember, if there where
numeric-starting names in SAS 6.03 for DOS, but maybe?
What are the results with the V604 engine?
Unfortunately the V604 allows no file creation, therefor I cannot test if a
123abc - name is possible.


On Thu, 19 May 2005 08:17:21 -0400, Howard Schreier <hs AT dc-sug DOT org>
Post by Howard Schreier <hs AT dc-sug DOT org>
I don't see many options.
Can you get the party or parties supplying the data to use valid SAS names?
If not, I think you are faced with the necessity of pre-processing each
file (perhaps with SAS; perhaps with something else) to replace the
embedded invalid names with valid ones, without corrupting anything else.
Post by s***@hotmail.com
1 options VALIDVARNAME=ANY;
WARNING: Only the Base product and the SAS/STAT product have been
tested for use with
VALIDVARNAME=ANY. Other use of this option is considered
experimental and
may cause undetected errors.
2 libname test v6 'c:\temp';
Engine: V6
Physical Name: c:\temp
3 filename tranfile "c:\temp\T05DAI.v6x";
4 proc cimport library=test infile=tranfile; run;
ERROR: The value '205DAI'n is not a valid SAS name.
WARNING: Skipping data set due to error.
real time 0.00 seconds
cpu time 0.00 seconds
I tried everything, still got this annoying ERROR. Can I get further
help? Many thanks!
Helen
Gerhard Hellriegel
2005-05-19 13:04:43 UTC
Permalink
Helen, did you try:

libname a v604 "c:\temp\";
data sasuser.test;
set a.205DAI;
run;

???? what are the results???

Once again: YOU HAVE A V604 File, not V6 !!!!!! V604 is the engine for the
very old MS-DOS version, V6 is for V 6.11 / 6.12 Version for Windows!!!
That's a difference!

The other thin is: I do NOT think, that this is a CPORT-file! As far as I
remember, there was no CPORT proc in SAS v 6.03!!!
So if the idea above is not successful, try the XPORT engine with the whole
filename.

libname a xport "c:\temp\205DAI.v6x";
proc copy in=a out=work;
run;

what brings this?
Post by s***@hotmail.com
1 options VALIDVARNAME=ANY;
WARNING: Only the Base product and the SAS/STAT product have been
tested for use with
VALIDVARNAME=ANY. Other use of this option is considered
experimental and
may cause undetected errors.
2 libname test v6 'c:\temp';
Engine: V6
Physical Name: c:\temp
3 filename tranfile "c:\temp\T05DAI.v6x";
4 proc cimport library=test infile=tranfile; run;
ERROR: The value '205DAI'n is not a valid SAS name.
WARNING: Skipping data set due to error.
real time 0.00 seconds
cpu time 0.00 seconds
I tried everything, still got this annoying ERROR. Can I get further
help? Many thanks!
Helen
s***@hotmail.com
2005-05-19 16:44:16 UTC
Permalink
Hi,

Here's the try using Gerhard's codes:


1 options VALIDVARNAME=ANY;
WARNING: Only the Base product and the SAS/STAT product have been
tested for use with
VALIDVARNAME=ANY. Other use of this option is considered
experimental and
may cause undetected errors.
2 libname test v604 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V604
Physical Name: c:\temp
3 filename tranfile "c:\temp\205DAI.v6x";
4 proc cimport library=test infile=tranfile; run;

ERROR: The value '205DAI'n is not a valid SAS name.
WARNING: Skipping data set due to error.
NOTE: PROCEDURE CIMPORT used:
real time 0.00 seconds
cpu time 0.00 seconds


5
6 libname a v604 "c:\temp\";
NOTE: Libref A was successfully assigned as follows:
Engine: V604
Physical Name: c:\temp
7 data sasuser.test;
NOTE: SCL source line.
8 set a.205DAI;
--------
22 202
ERROR: File WORK.DAI.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a
quoted string,
;, END, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_,
_NULL_.

ERROR 202-322: The option or parameter is not recognized and will be
ignored.

9 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set SASUSER.TEST may be incomplete. When this step
was stopped
there were 0 observations and 0 variables.
WARNING: Data set SASUSER.TEST was not replaced because this step was
stopped.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds


10
11 libname a xport "c:\temp\205DAI.v6x";
NOTE: Libref A was successfully assigned as follows:
Engine: XPORT
Physical Name: c:\temp\205DAI.v6x
12 proc copy in=a out=work;
13 run;

NOTE: Input library A is sequential.
ERROR: File is probably a cport file. XPORT engine unable to read file
created by
proc cport. Please use proc cimport to convert this file to
native format.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY used:
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.
Gerhard Hellriegel
2005-05-19 13:39:27 UTC
Permalink
Post by s***@hotmail.com
Thanks for all your efforts. I tried engine v604, got same error.
I don't know whether the party who gave me the file uses DBMS/COPY or
other method to generated the transport file. I suppose the last option
is to ask them to rename those datasets. Thanks again!
Helen
...did you also try the XPORT engine?
Choate,
2005-05-19 17:58:36 UTC
Permalink
Hi again Helen -

How about opening the file in notepad and posting the first few lines and
the last few lines? This may help indicate the problem.

Are you sure you don't have an export file? These are different from a
cport files. Read here: http://xrl.us/f523

You might also do the same in hex. Something like this could be useful if
you don't have a hex editor:
data bytes (keep= position hexbyte);
infile 'c:\temp\205DAI.v6x' recfm=n;
input byte $char1. @;
position+1;
hexbyte=put(byte,$hex2.);
put _all_;
run;


Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
***@HOTMAIL.COM
Sent: Thursday, May 19, 2005 9:44 AM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: ERROR: The value 205DAI is not a valid SAS name

Hi,

Here's the try using Gerhard's codes:


1 options VALIDVARNAME=ANY;
WARNING: Only the Base product and the SAS/STAT product have been
tested for use with
VALIDVARNAME=ANY. Other use of this option is considered
experimental and
may cause undetected errors.
2 libname test v604 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V604
Physical Name: c:\temp
3 filename tranfile "c:\temp\205DAI.v6x";
4 proc cimport library=test infile=tranfile; run;

ERROR: The value '205DAI'n is not a valid SAS name.
WARNING: Skipping data set due to error.
NOTE: PROCEDURE CIMPORT used:
real time 0.00 seconds
cpu time 0.00 seconds


5
6 libname a v604 "c:\temp\";
NOTE: Libref A was successfully assigned as follows:
Engine: V604
Physical Name: c:\temp
7 data sasuser.test;
NOTE: SCL source line.
8 set a.205DAI;
--------
22 202
ERROR: File WORK.DAI.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a
quoted string,
;, END, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_,
_NULL_.

ERROR 202-322: The option or parameter is not recognized and will be
ignored.

9 run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set SASUSER.TEST may be incomplete. When this step
was stopped
there were 0 observations and 0 variables.
WARNING: Data set SASUSER.TEST was not replaced because this step was
stopped.
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds


10
11 libname a xport "c:\temp\205DAI.v6x";
NOTE: Libref A was successfully assigned as follows:
Engine: XPORT
Physical Name: c:\temp\205DAI.v6x
12 proc copy in=a out=work;
13 run;

NOTE: Input library A is sequential.
ERROR: File is probably a cport file. XPORT engine unable to read file
created by
proc cport. Please use proc cimport to convert this file to
native format.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY used:
real time 0.00 seconds
cpu time 0.00 seconds

NOTE: The SAS System stopped processing this step because of errors.
s***@hotmail.com
2005-05-19 20:02:35 UTC
Permalink
I used UltraEdit to open it in hex, beginning part is as follows:

LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI


end part:

22MAR200511111 End of Data

any hints?

Helen
David L. Cassell
2005-05-19 18:28:47 UTC
Permalink
Post by Gerhard Hellriegel
wrong engine! The right one is V604. I really don't remember, if there
where
Post by Gerhard Hellriegel
numeric-starting names in SAS 6.03 for DOS, but maybe?
I don't think you could ever start a SAS data set with a number.
Of course, I didn't start mucking with SAS before 1978 or so,
so I could be mistaken.

David
--
David Cassell, CSC
***@epa.gov
Senior computing specialist
mathematical statistician
Choate,
2005-05-19 22:17:48 UTC
Permalink
Helen -

Just to double check - you have tried the v6 engines, haven't you?

libname test v6 'c:\temp'; and
libname test v604 'c:\temp';

I'm as stumped as everyone else on this one. Looks like an old PC DOS
SAS603 file to me, but I don't know why the variable/dataset name is funny.
It is not in the form of a CPORT or XPORT file as I have seen them
documented.

If your data are character then you can fairly easily read the SAS file in
as text and parse out the data. You have to know the field lengths, etc.
but it's doable. The SAS PDV is in fixed blocks with occasional header and
other garbage strewn about, but once you figure out the row length in the
SAS file it's not too hard to strip out the data. Numeric data are more of
a headache, they are stored in hexidecimal values of some sort. Others on
SAS-L probably can tell you more.

For example I just wrote this to take the data out of a SAS7 file with row
length 134:

data test;
infile "test.sas7bdat" recfm=n obs=max ;
if n=525 then stop;
n+1;
if n= 1 then input @1329 line $char134. @@;
else if n< 71 then input line $char134. @@;
else if n= 71 then input +2628 line $char134. @@;
else if n<162 then input line $char134. @@;
else if n=162 then input +94 line $char134. @@;
else if n<253 then input line $char134. @@;
else if n=253 then input +94 line $char134. @@;
else if n<344 then input line $char134. @@;
else if n=344 then input +94 line $char134. @@;
else if n<435 then input line $char134. @@;
else if n=435 then input +94 line $char134. @@;
else if n<526 then input line $char134. @@;
run;

It gave me 525 lines of raw text that I could then input, or dump into Excel
and parse using "text to columns". The only puzzle was that there were some
repeated observations.

Have you contacted SI?

:-(

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of
***@HOTMAIL.COM
Sent: Thursday, May 19, 2005 1:03 PM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: ERROR: The value 205DAI is not a valid SAS name

I used UltraEdit to open it in hex, beginning part is as follows:

LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI


end part:

22MAR200511111 End of Data

any hints?

Helen
Howard Schreier <hs AT dc-sug DOT org>
2005-05-20 03:24:36 UTC
Permalink
Helen's dump resembles output from PROC CPORT with the NOCOMPRESS option in
effect. To see that, run

filename t 'c:\temp\class.v6x';

proc cport data=sashelp.class file=t nocompress;
run;

data _null_;
infile t lrecl=10000;
input;
put _infile_;
run;

Helen's dump also resmebles what DBMS/COPY claims to be a V. 6 transport
file. Moreover, when I use DBMS/COPY to generate such a file with a valid
SAS name specified, PROC CIMPORT has no trouble with it.

Now here's a possible solution to the problem. Tested code:

filename tranfile "c:\temp\205dai.v6x" ;
filename fixed "c:\temp\205dai-fixed.v6x";

data _null_;
length dsname $ 8;
retain dsname;
infile tranfile recfm=n;
file fixed recfm=n;
input byte $char1.;
if 93<=_n_<=100 then do;
substr(dsname,_n_-92,1) = byte;
byte = '_';
if _n_=100 then call symput('dsname',dsname);
end;
put byte $char1.;
run;

proc cimport library=work infile=fixed;
run;

proc datasets;
change ________ = _&dsname;
quit;

The DATA step makes a copy of the problem file, changing only bytes 93
through 100, which hold the embedded SAS data set name, to underscores.
Eight underscores form a valid SAS name. THe original, possibly invalid,
name is parked in a macro variable.

Then PROC CIMPORT extracts the SAS data set and PROC DATASETS restores the
original name, prefixed with a single underscore.
Post by Choate,
Helen -
Just to double check - you have tried the v6 engines, haven't you?
libname test v6 'c:\temp'; and
libname test v604 'c:\temp';
I'm as stumped as everyone else on this one. Looks like an old PC DOS
SAS603 file to me, but I don't know why the variable/dataset name is funny.
It is not in the form of a CPORT or XPORT file as I have seen them
documented.
If your data are character then you can fairly easily read the SAS file in
as text and parse out the data. You have to know the field lengths, etc.
but it's doable. The SAS PDV is in fixed blocks with occasional header and
other garbage strewn about, but once you figure out the row length in the
SAS file it's not too hard to strip out the data. Numeric data are more of
a headache, they are stored in hexidecimal values of some sort. Others on
SAS-L probably can tell you more.
For example I just wrote this to take the data out of a SAS7 file with row
data test;
infile "test.sas7bdat" recfm=n obs=max ;
if n=525 then stop;
n+1;
run;
It gave me 525 lines of raw text that I could then input, or dump into
Excel
Post by Choate,
and parse using "text to columns". The only puzzle was that there were some
repeated observations.
Have you contacted SI?
:-(
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
Sent: Thursday, May 19, 2005 1:03 PM
Subject: Re: ERROR: The value 205DAI is not a valid SAS name
LIB CONTROL PC DOS 314 SAS6.03
D603WORK 205DAI
22MAR200511111 End of Data
any hints?
Helen
s***@hotmail.com
2005-05-20 12:05:13 UTC
Permalink
Wow! Thank you so much, Howard! The magic worked! Here it is the log:

1 filename tranfile "c:\temp\205dai.v6x" ;
2 filename fixed "c:\temp\205dai-fixed.v6x";
3
4
5 data _null_;
6 length dsname $ 8;
7 retain dsname;
8 infile tranfile recfm=n;
9 file fixed recfm=n;
10 input byte $char1.;
11 if 93<=_n_<=100 then do;
12 substr(dsname,_n_-92,1) = byte;
13 byte = '_';
14 if _n_=100 then call symput('dsname',dsname);
15 end;
16 put byte $char1.;
17 run;

NOTE: UNBUFFERED is the default with RECFM=N.
NOTE: The infile TRANFILE is:
File Name=c:\temp\205dai.v6x,
RECFM=N,LRECL=256

NOTE: UNBUFFERED is the default with RECFM=N.
NOTE: The file FIXED is:
File Name=c:\temp\205dai-fixed.v6x,
RECFM=N,LRECL=256

NOTE: DATA statement used:
real time 0.09 seconds
cpu time 0.01 seconds


18
19
20 proc cimport library=work infile=fixed;
21 run;

NOTE: Proc CIMPORT begins to create/update data set WORK.________
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64

NOTE: PROCEDURE CIMPORT used:
real time 0.00 seconds
cpu time 0.00 seconds


22
23
24 proc datasets;
-----Directory-----

Libref: WORK
Engine: V8
Physical Name: C:\DOCUME~1\helen\LOCALS~1\Temp\SAS Temporary
Files\_TD1976
File Name: C:\DOCUME~1\helen\LOCALS~1\Temp\SAS Temporary
Files\_TD1976


File
# Name Memtype Size Last Modified

ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
1 ________ DATA 9216 20MAY2005:08:00:56
25 change ________ = _&dsname;
26 quit;

NOTE: Changing the name WORK.________ to WORK._205DAI (memtype=DATA).
NOTE: PROCEDURE DATASETS used:
real time 0.06 seconds
cpu time 0.01 seconds

Again, Thank you all! I greatly appreciate it!

Helen
s***@hotmail.com
2005-05-20 12:27:26 UTC
Permalink
Sorry I forgot to mention that '205dai.v6x' is a binary file, not text
data one.

And I did contact SAS Support, the process is a little bit late than
here. They haven't come up a solution yet.

Also I talked to my manager, she contacted the party who gave me the
file (actually there are quite a bunch of this kind of file zipped in a
file) to ask them whether they can rename those SAS datasets. The
answer is the programmer refused to do any changing until we have the
related document modified and signed by all related parties first! What
a pain! I am just thinking: should they test those transport files to
make sure they can be imported to SAS before they gave them to us?
Anyway, I am so glad you guys gave me such huge helps. I really love
this group!

Helen
s***@hotmail.com
2005-05-24 12:02:54 UTC
Permalink
Hi,

Just let you know that I got answer from SAS support representive that
I was told the file can be read in 6.12. Unfornately I don't have that
version software so I couldn't test it by myself. If any of you have
6.12 and want to have a try, I am happy to send this data file to you.

Thanks again.

Helen
Howard Schreier <hs AT dc-sug DOT org>
2005-05-25 01:18:33 UTC
Permalink
Unfortunately I do not have 6.12 either. I'd be interested in knowing the
results.

The claim is that PROC CIMPORT in Version 6.12 supported invalid data set
names. I can't imagine why it would have (unless PROC CPORT also supported
use of such names). Also, if the functionality *was* there, I wonder why it
was withdrawn in Versions 7+.
Post by s***@hotmail.com
Hi,
Just let you know that I got answer from SAS support representive that
I was told the file can be read in 6.12. Unfornately I don't have that
version software so I couldn't test it by myself. If any of you have
6.12 and want to have a try, I am happy to send this data file to you.
Thanks again.
Helen
s***@hotmail.com
2005-05-25 15:39:02 UTC
Permalink
I got 6.12 finally. It did support invalid data set names using proc
cimport! Also I tried Proc Cport, it works also for option
'library=<libname>' but not supports 'data=<library.dataset name' if
the name of dataset begins with a number.
(please see the following log).

Helen

1 libname test 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;

NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.

NOTE: The PROCEDURE CIMPORT used 0.06 seconds.


5
6 filename tranfile "c:\temp\205diary.v6x";
7 proc cimport library=test infile=tranfile; run;

NOTE: Proc CIMPORT begins to create/update data set TEST.205DIARY
NOTE: Data set contains 12 variables and 28 observations.
Logical record length is 58.

NOTE: The PROCEDURE CIMPORT used 0.06 seconds.


8
9
10 filename tranfile "c:\temp\test.xpt";
11 proc cport library=test file=tranfile memtype=data;
12 run;


NOTE: Proc CPORT begins to transport data set TEST.205DAI
NOTE: The data set contains 11 variables and 13 observations.
Logical record length is 64.


NOTE: Proc CPORT begins to transport data set TEST.205DIARY
NOTE: The data set contains 12 variables and 28 observations.
Logical record length is 58.

NOTE: The PROCEDURE CPORT used 0.32 seconds.

13
14 filename tranfile "c:\temp\fail.xpt";
15 proc cport data=test.205dai file=tranfile;
---
202
16 run;

ERROR 202-322: The option or parameter is not recognized.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE CPORT used 0.01 seconds.
Kevin Myers
2005-05-25 15:45:49 UTC
Permalink
I wonder if this ability to deal with "invalid" dataset names has anything
to do with support for n-literals, which allow the use of what would
otherwise be invalid names in many contexts. Furthermore, I wonder if using
an n-literal would have solved this problem in the first place, without all
of the extra effort. Unfortunately, no time to research this myself at the
moment...

s/KAM
Post by s***@hotmail.com
I got 6.12 finally. It did support invalid data set names using proc
cimport! Also I tried Proc Cport, it works also for option
'library=<libname>' but not supports 'data=<library.dataset name' if
the name of dataset begins with a number.
(please see the following log).
Helen
1 libname test 'c:\temp';
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
5
6 filename tranfile "c:\temp\205diary.v6x";
7 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DIARY
NOTE: Data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
8
9
10 filename tranfile "c:\temp\test.xpt";
11 proc cport library=test file=tranfile memtype=data;
12 run;
NOTE: Proc CPORT begins to transport data set TEST.205DAI
NOTE: The data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: Proc CPORT begins to transport data set TEST.205DIARY
NOTE: The data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CPORT used 0.32 seconds.
13
14 filename tranfile "c:\temp\fail.xpt";
15 proc cport data=test.205dai file=tranfile;
---
202
16 run;
ERROR 202-322: The option or parameter is not recognized.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE CPORT used 0.01 seconds.
Howard Schreier <hs AT dc-sug DOT org>
2005-05-25 16:19:11 UTC
Permalink
My new theory: This "support" for invalid names in V. 6 PROC CIMPORT was
unintentional, seen as a bug, and fixed (ie, removed) in later versions.

My new question for Helen: Can you do anything with the data sets extracted
by CIMPORT? For example, what happens when you run

proc print data=TEST.205DAI; run;
Post by s***@hotmail.com
I got 6.12 finally. It did support invalid data set names using proc
cimport! Also I tried Proc Cport, it works also for option
'library=<libname>' but not supports 'data=<library.dataset name' if
the name of dataset begins with a number.
(please see the following log).
Helen
1 libname test 'c:\temp';
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
5
6 filename tranfile "c:\temp\205diary.v6x";
7 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DIARY
NOTE: Data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
8
9
10 filename tranfile "c:\temp\test.xpt";
11 proc cport library=test file=tranfile memtype=data;
12 run;
NOTE: Proc CPORT begins to transport data set TEST.205DAI
NOTE: The data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: Proc CPORT begins to transport data set TEST.205DIARY
NOTE: The data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CPORT used 0.32 seconds.
13
14 filename tranfile "c:\temp\fail.xpt";
15 proc cport data=test.205dai file=tranfile;
---
202
16 run;
ERROR 202-322: The option or parameter is not recognized.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE CPORT used 0.01 seconds.
Choate,
2005-05-25 16:10:04 UTC
Permalink
Kevin -

Helen posted that she tried "options VALIDVARNAME=ANY;" and it didn't work.

regards

Paul Choate
DDS Data Extraction
(916) 654-2160

-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-***@LISTSERV.UGA.EDU] On Behalf Of Kevin
Myers
Sent: Wednesday, May 25, 2005 8:46 AM
To: SAS-***@LISTSERV.UGA.EDU
Subject: Re: ERROR: The value 205DAI is not a valid SAS name

I wonder if this ability to deal with "invalid" dataset names has anything
to do with support for n-literals, which allow the use of what would
otherwise be invalid names in many contexts. Furthermore, I wonder if using
an n-literal would have solved this problem in the first place, without all
of the extra effort. Unfortunately, no time to research this myself at the
moment...

s/KAM
Post by s***@hotmail.com
I got 6.12 finally. It did support invalid data set names using proc
cimport! Also I tried Proc Cport, it works also for option
'library=<libname>' but not supports 'data=<library.dataset name' if
the name of dataset begins with a number.
(please see the following log).
Helen
1 libname test 'c:\temp';
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
5
6 filename tranfile "c:\temp\205diary.v6x";
7 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DIARY
NOTE: Data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
8
9
10 filename tranfile "c:\temp\test.xpt";
11 proc cport library=test file=tranfile memtype=data;
12 run;
NOTE: Proc CPORT begins to transport data set TEST.205DAI
NOTE: The data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: Proc CPORT begins to transport data set TEST.205DIARY
NOTE: The data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CPORT used 0.32 seconds.
13
14 filename tranfile "c:\temp\fail.xpt";
15 proc cport data=test.205dai file=tranfile;
---
202
16 run;
ERROR 202-322: The option or parameter is not recognized.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE CPORT used 0.01 seconds.
s***@hotmail.com
2005-05-25 17:58:29 UTC
Permalink
Hi Howard, here it is the try:


1 libname test 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;

NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.

NOTE: The PROCEDURE CIMPORT used 0.26 seconds.


5
6 proc print data=TEST.205DAI; run;
6 proc print data=TEST.205DAI; run;
---
202
ERROR: Invalid data set name TEST.205.

ERROR 202-322: The option or parameter is not recognized.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE PRINT used 0.07 seconds.
s***@hotmail.com
2005-05-25 18:09:15 UTC
Permalink
But, 'PROC PRINT; RUN;' works OK.

7 proc print; run;

NOTE: The PROCEDURE PRINT used 0.07 seconds.

D P P D D S R
C
T G R T T T C
D A
S _ A O _ _ L T
T L
I S D S C P P F B
_ L
T U A C T R S X L
I E
O E B I O S O S S D
V R
B N N C R C C I C S
R I
S O O L E R T V R C
S D

1 11 11501 22JAN2005 2 2 20JAN2005 22MAR2005 0 0
22MAR2005 11111
2 11 11503 13APR2005 3 3 13APR2005 18APR2005 1
18APR2005 11111
3 11 11504 0 3
14JUN2004 11111
4 11 11504 1 3 27SEP2004 27SEP2004 2 2
27SEP2004 11111
5 11 11505 2 9 0 1
14JUN2004 11111
6 11 11505 2 1
14JUN2004 11111
7 11 11505 0 1
14JUN2004
8 11 11505 0 9 0 2
14JUN2004 11111
9 11 11505 2 2 13JUN2004 15JUN2004 0 1
15JUN2004 11111
10 11 11511 19MAR2005 3 2 19MAR2005 24MAR2005 7 2
24MAR2005 11111
11 11 11512 06MAY2004 0 3 07MAY2004 18MAR2005 0 2
18MAR2005 11111
12 11 11512 09MAR2005 3 1 3
21MAR2005 11111
13 11 11512 21JAN2005 1 0 0
22MAR2005 11111
Kevin Myers
2005-05-25 23:41:16 UTC
Permalink
Hi Paul,

Option VALIDVARNAME=ANY does *not* imply automatic n-literal handling.
N-literals are still required for non-standard names that do not meet SAS
syntax requirements (e.g. begin with a number).

Therefore, following up on Howard's suggestion, I would like to see Helen
try:

proc print data=test."205DAI"n; run;

I'm not certain this will work in V6.12, but I'm betting that it has a good
chance in V8.x or V9.x with the appropriate engine.

Regards,
s/KAM


----- Original Message -----
From: "Choate, ***@DDS" <***@DDS.CA.GOV>
To: <SAS-***@LISTSERV.UGA.EDU>
Sent: Wednesday, May 25, 2005 11:10 AM
Subject: Re: ERROR: The value 205DAI is not a valid SAS name
Post by Choate,
Kevin -
Helen posted that she tried "options VALIDVARNAME=ANY;" and it didn't
work.
Post by Choate,
regards
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
Myers
Sent: Wednesday, May 25, 2005 8:46 AM
Subject: Re: ERROR: The value 205DAI is not a valid SAS name
I wonder if this ability to deal with "invalid" dataset names has anything
to do with support for n-literals, which allow the use of what would
otherwise be invalid names in many contexts. Furthermore, I wonder if
using
Post by Choate,
an n-literal would have solved this problem in the first place, without
all
Post by Choate,
of the extra effort. Unfortunately, no time to research this myself at
the
Post by Choate,
moment...
s/KAM
Post by s***@hotmail.com
I got 6.12 finally. It did support invalid data set names using proc
cimport! Also I tried Proc Cport, it works also for option
'library=<libname>' but not supports 'data=<library.dataset name' if
the name of dataset begins with a number.
(please see the following log).
Helen
1 libname test 'c:\temp';
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
5
6 filename tranfile "c:\temp\205diary.v6x";
7 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DIARY
NOTE: Data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.
8
9
10 filename tranfile "c:\temp\test.xpt";
11 proc cport library=test file=tranfile memtype=data;
12 run;
NOTE: Proc CPORT begins to transport data set TEST.205DAI
NOTE: The data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: Proc CPORT begins to transport data set TEST.205DIARY
NOTE: The data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CPORT used 0.32 seconds.
13
14 filename tranfile "c:\temp\fail.xpt";
15 proc cport data=test.205dai file=tranfile;
---
202
16 run;
ERROR 202-322: The option or parameter is not recognized.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE CPORT used 0.01 seconds.
s***@hotmail.com
2005-05-27 12:23:41 UTC
Permalink
Hi Kevin,

I tried your suggestion both in V6.12 and V8.02, I still got error
message:

*************LOG OF V6.12 **************

1 libname test 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V612
Physical Name: c:\temp
2 proc print data=test."205DAI"n; run;
2 proc print data=test."205DAI"n; run;
--------
200
ERROR: Invalid data set name TEST..
ERROR: There is not a default input data set (_LAST_ is _NULL_).

ERROR 200-322: The symbol is not recognized.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE PRINT used 0.07 seconds.

****************LOG OF V8.02 ****************
1 libname test 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V6
Physical Name: c:\temp

2 proc print data=test."205DAI"n; run;
ERROR: The value 205DAI is not a valid SAS name.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
cpu time 0.00 seconds



3 libname test v8 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V8
Physical Name: c:\temp
4 proc print data=test."205DAI"n; run;
ERROR: The value 205DAI is not a valid SAS name.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used:
real time 0.00 seconds
cpu time 0.00 seconds
Ian Whitlock
2005-05-26 01:38:34 UTC
Permalink
Helen,

Your log shows that SAS can convert to SAS data sets. Now you
can use the operating system to rename the data sets to legal
names. If it needs to be done in SAS then use the X statement
to issue the host command for renaming.

I agree with Howard's guess that 6.12 has a bug that inconveniently got fixed.
Hopefully the bug that allowed the creation of such data set names in the first
place also got fixed.

Ian Whitlock
==================
Date: Wed, 25 May 2005 08:39:02 -0700
Reply-To: ***@HOTMAIL.COM
Sender: "SAS(r) Discussion"
From: ***@HOTMAIL.COM
Organization: http://groups.google.com
Subject: Re: ERROR: The value 205DAI is not a valid SAS name
Comments: To: sas-***@uga.edu
Content-Type: text/plain; charset="iso-8859-1"
I got 6.12 finally. It did support invalid data set names using
proc
cimport! Also I tried Proc Cport, it works also for option
'library=<libname>' but not supports 'data=<library.dataset name'
if
the name of dataset begins with a number.
(please see the following log).
Helen
1 libname test 'c:\temp';
NOTE: Libref TEST was successfully assigned as follows:
Engine: V612
Physical Name: c:\temp
2
3 filename tranfile "c:\temp\205dai.v6x";
4 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DAI
NOTE: Data set contains 11 variables and 13 observations.
Logical record length is 64.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.

5
6 filename tranfile "c:\temp\205diary.v6x";
7 proc cimport library=test infile=tranfile; run;
NOTE: Proc CIMPORT begins to create/update data set TEST.205DIARY
NOTE: Data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CIMPORT used 0.06 seconds.

8
9
10 filename tranfile "c:\temp\test.xpt";
11 proc cport library=test file=tranfile memtype=data;
12 run;

NOTE: Proc CPORT begins to transport data set TEST.205DAI
NOTE: The data set contains 11 variables and 13 observations.
Logical record length is 64.

NOTE: Proc CPORT begins to transport data set TEST.205DIARY
NOTE: The data set contains 12 variables and 28 observations.
Logical record length is 58.
NOTE: The PROCEDURE CPORT used 0.32 seconds.
13
14 filename tranfile "c:\temp\fail.xpt";
15 proc cport data=test.205dai file=tranfile;
---
202
16 run;
ERROR 202-322: The option or parameter is not recognized.
NOTE: The SAS System stopped processing this step because of
errors.
NOTE: The PROCEDURE CPORT used 0.01 seconds.
Howard Schreier <hs AT dc-sug DOT org>
2005-05-27 16:30:04 UTC
Permalink
You discovered that you can reference data sets like test.205DAI implicitly
via the _LAST_ mechanism.

You might experiment to see whether this works in PROC DATASETS, so that
you can change the name to a valid one. I suspect that it won't work.

But you can transcribe via a DATA step placed immediately after the PROC
CIMPORT. The code would be something like:

data mylib._205DAI; set; run;

If you also need to move to a later engine, that will make three
transcriptions in all (one by CIMPORT, one to make the name valid, and one
to change the engine).

You might want to instead use the code I posted earlier to patch the
transport files before running PROC CIMPORT.
Post by s***@hotmail.com
Hi Kevin,
I tried your suggestion both in V6.12 and V8.02, I still got error
*************LOG OF V6.12 **************
1 libname test 'c:\temp';
Engine: V612
Physical Name: c:\temp
2 proc print data=test."205DAI"n; run;
2 proc print data=test."205DAI"n; run;
--------
200
ERROR: Invalid data set name TEST..
ERROR: There is not a default input data set (_LAST_ is _NULL_).
ERROR 200-322: The symbol is not recognized.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: The PROCEDURE PRINT used 0.07 seconds.
****************LOG OF V8.02 ****************
1 libname test 'c:\temp';
Engine: V6
Physical Name: c:\temp
2 proc print data=test."205DAI"n; run;
ERROR: The value 205DAI is not a valid SAS name.
NOTE: The SAS System stopped processing this step because of errors.
real time 0.00 seconds
cpu time 0.00 seconds
3 libname test v8 'c:\temp';
Engine: V8
Physical Name: c:\temp
4 proc print data=test."205DAI"n; run;
ERROR: The value 205DAI is not a valid SAS name.
NOTE: The SAS System stopped processing this step because of errors.
real time 0.00 seconds
cpu time 0.00 seconds
Loading...