In Unix systems you can have all those characters except /

You may have trouble referring to them in the shell ... quotes and various
escapes are needed.

On Fri, Sep 8, 2017 at 11:48 AM, Dan <dan27649@xxxxxxxxx> wrote:

I have a program that will use CPYTOIMPF to create a .CSV file on the IFS.
Said .CSV file will then be opened in Excel.

The name of the file is generated via three key values in the data from
which it is generated. One of the values comes directly from our clients,
ergo, we have very little control over the contents (special characters) of
this value.

Before I generate the file name, I want to ensure the name is valid in
terms of actually being able to create the file and also to being able to
open it in Excel. I tested the following characters, but realized that I
have seen characters in our client's data before that do not exist on most
normal keyboards.

Characters in file name that won't work:
* (file created, but cannot be opened [specified path does not exist])
\ (file not created; "No such path or directory.")
| (file created, but cannot be opened [specified path does not exist])
: (file created, but cannot be opened [file not found by Excel])
' (file not created. "matching quote not found")
" (file not created. "matching quote not found")
< (file created, but cannot be opened [specified path does not exist])
> (file created, but cannot be opened [specified path does not exist])
/ (file not created; "No such path or directory.")
? (file not created; "No such path or directory.")

I was somewhat surprised at the characters that did work: ! + =

I'm thinking of just creating a constant in my RPG program consisting of
valid characters, and replacing any in the client's value that don't match
with an underscore. Is there an official list of valid characters for file
names that can be created in the IFS *and* can be opened in Excel?

FWIW, v7r1, and this application will always and only ever be used in the
U.S., due to the nature of our business, so I want to avoid having to deal
with any CCSID issues, if that applies to this situation.

- Dan
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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 [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.