The Line Feed *LF on the end of record

795 pts.
Tags:
AS/400
AS/400 FTP
Hi friends, How can I send a Physical File by e-mail not from FTP ?, I´m using Client Access but the end of record show CRLF. When I send this file by FTP to another server the end of record show LF. The problem is...My Boss requires this file in text by e-mail. Who helps me ? Thanks, PutzGrilla

Answer Wiki

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

below is what I have used to send a spool file via email.  I first extract it to a physical file, convert it to ASCII with the correct line terminators, then send it via SNDDST.  I used to utilize DLO files for this, but this works better for my purposes and I don’t have the DLO object to deal with.


CPYSPLF    FILE(QPQXPRTF) TOFILE(QTEMP/tempfile) +      


             SPLNBR(*LAST) MBROPT(*REPLACE)              


 CPYTOIMPF  FROMFILE(QTEMP/tempfile) +                  


              TOFILE(QTEMP/emailfile) MBROPT(*REPLACE) +


              RCDDLM(X’0D’) DTAFMT(*FIXED) STRDLM(*NONE) 


                                                         


                                                         


SNDDST     TYPE(*FILE) +                                 


             TOINTNET((&EMAILl1) +      


             (&EMAIL2) (&EMAIL3)) DSTD(‘DESCRIPTION ‘) + 


             DOCFILE(QTEMP/EMAILFILE) DOCTYPE(*FFT) +   


             DOCD(‘DESCRIPTION’)                         


 

Discuss This Question: 8  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
  • PutzGrilla
    When I send by ftp After this command: CPYTOIMPF FROMFILE(lib/fileTXT) TOSTMF('/qdls/folder/CUST.TXT') MBROPT(*REPLACE) RCDDLM(*LF) DTAFMT(*FIXED) That file was showid with RCDDLM(*LF). But I need to send this file on folder by e-mail. Thanks again
    795 pointsBadges:
    report
  • TomLiotta
    First, don't put it into /QDLS. Use a folder off of /root instead. But that doesn't seem directly related to your problem.   Of course, it's not clear what your problem actually is. Why can't you send that file?   Tom  
    125,585 pointsBadges:
    report
  • BigKat
    try something like this:SNDDST TYPE(*DOC) TOINTNET((name@address.com)) DSTD('customer file') MSG('here is your data') DOC(CUST.TXT) FLR(FOLDER)
    8,220 pointsBadges:
    report
  • BigKat
    oh btw: if you do use SNDDST you will want your document in a QDLS folder. depending on several factors in the setup of your system, SNDDST may or may not work.  (missing Directory Entry setups are usually the problem.)  But it can be the quickest solution for simply emailing a single file at a time. 
    8,220 pointsBadges:
    report
  • TomLiotta
    if you do use SNDDST you will want your document in a QDLS folder.   Yes, if SNDDST is a requirement, then /QDLS is needed. The original reference to "Client Access" had a different e-mail function implied. And if the infrastructure isn't already in place, it might be a lot more complicated to get it working. It would be easier to download and use something like MMAIL or even to code to the Send Mail API if problems in networking for an e-mail server arise. It might depend on existing experience.   The example CPYTOIMPF command already looks appropriate. As long as the target directory is shared out to the network, the file should already work as an attachment. It's not yet clear why it can't be used.   Tom
    125,585 pointsBadges:
    report
  • PutzGrilla
    Ok, thanks friends, I´m testing the sugestions and I respond if Ok or No.
    795 pointsBadges:
    report
  • TomLiotta
    I used to utilize DLO files for this...   The need does seem to be a good fit for sending a single-field physical file. The record lengths are apparently going to be fixed and consistent. A PF in place of a streamfile might be the best choice.   It doesn't seem like going through any spooled file would be useful, but going straight to the final PF could work well here.   Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    The need does seem to be a good fit for sending a single-field physical file... That is, if SNDDST is used. It's not yet clear if SNDDST can be used at all. 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