I was recently working on a CL program that would convert spool files to physical files, then using the SNDDST command to send these files to the end users' e-mail addresses. However, I found that when trying to e-mail to a PC/Windows account, the result was gibberish. I am assuming that the problem was due to the fact that the AS/400 uses EBCDIC and the PCs use ASCII to encode data. Is this correct, and is there a way to use SNDDST to e-mail a physical file so that it is readable on a PC/Windows platform?
The following is a method that I've used successfully in the past to e-mail spool files from the AS/400. You can also use the CPYTOSTMF command to populate your folder but this command just makes it a little easier.
Try copying your spool file to your folder using this command as an example: CPYTOPCD FROMFILE(MYLIB/MYFILE) TOFLR(&FLR) TODOC(&DOC) REPLACE(*YES) TRNTBL(QASCII) You should not have to specify the translation table on the the CPYTOPCD command but I included the parameter just to be absolutely sure that the ASCII conversion is being done.
Also, when you do the SNDDST command, make sure you are using the default SNDFMT(*NOCHG).
I believe that some early versions of the Mail Server Framework had a few bugs. If you are not up to date on your PTFS, I would also recommend ordering and installing the latest cumulative PTF package.