If I create an AREV file that is numeric (e.g. 12345), I can edit it, but if I LIST, SELECT, etc. I get an error msg,
"File was not specified or is not available."I'm on a network, but I don't think this error has anything to do
with that. Any help?
Thanks,
Harold
The syntax goes something like this:
LIST (count) (DATA|DICT) filename (key list) ….
Parentheses indicate optional items. What is happening is that since your file name is numeric, it is slipping in to the optional count parameter. I don't have a numeric file, so I can't try it out, however, try doing something like this:
LIST 99999999 DATA 12345 etc.
Using a number that is bigger than your record count should exhaust the file nicely and fill in the optional field making the parser no longer expect a number. Add the DATA item to force 12345 to be recognized as a file name. This may be a bit of overkill but should give you something to play with.
Thanks Victor,
Your suggestion of adding the DATA statement to the LIST, … command doesn't work. But I tried the statement LIST 9999999 12345 and that worked like a charm.
Again, many thanks.
Haorld
It's a programming thing. Part of the commandment that says "Thou Shalt Not Start a Variable Name with a Numeric Value." I think there is even a rule somewhere in your manual that says as much.
The LIST statement parser identifies your numeric filename as a number (size doesn't matter) and treats it as such. Hence your FILENAME isn't there. Even if you put some alpha characters after a number, you would probably get an "Invalid Numeric" error. Although you can throw quotes around record names or selection criteria, I don't think quotes will help you here.
Fix suggestions:
1. If you generate the file (like a date or something), append an alpha in front and that would do what you want.
2. Create your own selection routine, OPENing and assigning your numeric filename to a usable program variable that you can use. You will have to do your own sorts and filters and LIST report program. An idea would be to create the LIST program, with the (X) option, that is if your AREV can do so, and replace the appropriate code with your sort and filter section.
Option 2 may be a pain. Option 1 would fix the problem rather quickly.
Much Luck,
Charles Schmidling
DATASCAN Systems, Inc.
cbms.at.juno.dot.com
Harold,
Just be certain that you will never have more than 9999999 items in the file, or you won't get them all in your list, select, etc.