I'm not sure how you could do this without a lot of "trickery"...lol
The COBOL data name standards are limited to certain characters of
the alphabet. Even though the compiler allows the copying of a file
layout using auto-replacement of key characters (ddr-, ddrs-, etc.)
the actual SELECT filename appears to be limited to the COBOL standard.
You *may* be able to contruct a jobstream that renames the physical
file "on the fly", runs your program and then renames the file back
to its original name. Of course, you would have to do the same thing
whenever you compiled your program...
If the @COLORS file is small in size and not being updated, you could
simply replicate its contents into another work file but I'm sure you
have already thought of that ;-)
From: COBOL400-L [mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Basil Zangare via COBOL400-L
Sent: Wednesday, October 24, 2018 10:54 PM
Cc: Basil Zangare
Subject: [EXTERNAL] [COBOL400-L] File names with special charaters in COBOL program
Is there a way to use a file name containing a special character in a COBOL program. When I try to use a file named @COLORS in the program I get a syntax error. I even tried using the name without the @ in the program and then override the file. Still not working.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.