>>Yes, you're right. I shouldn't be using sys(3), but I'll use SUBSTR(SYS(2015),3) as Tore suggests. SYS(2015) returns a string starting with an underscore followed by a number, which is why you need to start with the third character, which is a letter.
>
>A file name can start with a digit and 3rd character in the string returned by SYS(2015) may be a digit also.
So what are you suggesting? That I don't need to use SUBSTR() at all? FWIW, the help file says this about SYS(3):
"SYS(3) returns file names that begin with numbers. If your code uses SYS(3) with commands such as CREATE TABLE, CREATE CURSOR, SELECT INTO CURSOR, the code may fail because FoxPro cursors or alias names cannot begin with numbers. You can use SYS(2015) instead."
I think this is a bit misleading because CREATE TABLE won't fail if the name starts with a number. I'm not using this name as an alias, so I suppose it doesn't really matter if it starts with a number or not.