AS400 File transfer from AS400

130 pts.
Tags:
AS/400 File Transfer
CPYTOIMPF
SNDDST
I transfered the database output into excel file using CPYTOIMP command and attached the excel file using SNDDST command.But i have issue that i didn't received the excel file through email only if the file size more.Anyone kindly tell me, how to write the data into multiple sheets or kindly advise me some idea to fix the issue. Thanks in advance. R.Siva
ASKED: April 4, 2012  4:47 AM
UPDATED: April 17, 2012  7:18 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi tom,

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) +
DECPNT(*COMMA)

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.

Thank you

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • hamsinee
    kindly anyone please tell me, how to change dynamic FROM email address in the SNDDST command.I have task to change the from address in the SNDDST based on parameter user sent.I checked in the internet with option to configure TCP using WRKDIRE.But i want the dynamic from address for the particular module only.
    130 pointsBadges:
    report
  • TomLiotta
    I transfered the database output into excel file using CPYTOIMP command... The CPYTOIMPF command cannot create Excel files. It can create .CSV files that can be imported into Excel; and then Excel can put its output into an Excel file. But SNDDST cannot send Excel files through e-mail unless you have properly encoded them first. If you are really sending Excel files, what did you use for the encoding? Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following