I used to copy to import command to transfer the database record in the qtemp into Stream director path as a .xls file.
Code as like below.
CPYTOIMPF FROMFILE(QTEMP/EDITMPPF *FIRST) +
TOSTMF(‘QDLS/STREAM/’ *TCAT &FNAME) +
MBROPT(*REPLACE) STMFCCSID(*STMF) +
STMFCODPAG(*PCASCII) STMFAUT(*FILE) +
RCDDLM(*CRLF) STRDLM(*NONE) +
RMVBLANK(*LEADING) FLDDLM(*TAB) +
Then, attached the .xls file in the stream folder into Email.Code as below
SNDDST TYPE(*DOC) TOINTNET((&TO *PRI) (&CC1 *CC) +
(&CC2 *CC) (&CC3 *CC) (&CC4 *CC) (&CC5 +
*CC) (&CC6 *CC) (&CC7 *CC) (&CC8 *CC) +
(&CC9 *CC) (&CC10 *CC)) DSTD(&SUBJ) +
MSG(&INVNO) DOC(&FNAME) FLR(STREAM)
I am practically using so many programs.I have two issue came know.
1. How to change the FROM(SENDER) address dynamically based on inpur parameter.
2. How to handle the file size while attaching into Email.Because if the file size more, it’s not attach the file & also not sending email.
Kindly tell me, you have any idea to handle the situation.