You might try:
QSH CMD(‘tr ”~” ”\n” < /inputfile.txt > /outputfile.txt’)
This command will translate all ~ characters in /inputfile.txt to line feeds while copying the data from inputfile.txt to /outputfile.txt. The various CPY commands you have been trying should then be able to handle the file. If /outputfile.txt does not already exist, this command will create it with a default CCSID appropriate for your job (which may or may not be what you want). If you want the CCSID to be the same as that used for /inputfile.txt you will want to create /outputfile.txt in advance.
Alternatively, you could also write directly to the physical file if you move from DDS and simply go with program described. This could be done with:
CRTPF SOMELIB/MYFILE RCDLEN(1024)
QSH CMD(‘tr ”~” ”\n” < /inputfile.txt > /qsys.lib/somelib.lib/myfile.file/myfile.mbr’)
Hope this helps,