The limit of up to 8 chars and up to 3 chars extension applies to all folders and documents in QDLS. This is the only area of the IFS that the CPYTOPCD command will access.
You can use COPYTOSTMF to copy a database file to other areas of the IFS as an ASCII text file, where these limitations do not apply.
Patient: Doctor! It hurts when I do “this”. Can you help me?
Doctor: Sure — don’t do “this”.
That is, don’t use the /QDLS file system if its restrictions aren’t to your liking. Use a file system that allows longer names. Don’t use CPYTOPCD at all since it explicitly operates on /QDLS objects. Use CPYTOSTMF and stay away from /QDLS altogether.