ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Trying to FTP .CSV file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trying to FTP .CSV file

    Hi, this is what I am trying to do:

    Send a file with this long name "MEMXTRF_Late_Deliv_Rpt_20151119.TESTSTNREPORT S.20 151119.csv"

    to another system. I have a pgm that builds the commands on the fly then FTP RMTSYS in my CL. I am trying to rename it after I send it since the FTP doesn't like it:

    >
    cd /FTPRoot/pacepdfreports
    250 Folder changed to "/FTPRoot/pacepdfreports".
    Enter an FTP subcommand.
    > put MEMXTRF.csv
    File MEMXTRF in library QGPL not found.
    Enter an FTP subcommand.
    > rename MEMXTRF.csv MEMXTRF.
    550 MEMXTRF.csv: Requested action not taken. File unavailable (file not
    found or no access).
    Enter an FTP subcommand.
    > rename MEMXTRF.csv MEMXTRF.
    550 MEMXTRF.csv: Requested action not taken. File unavailable (file not
    found or no access).
    Enter an FTP subcommand.
    > QUIT
    What do I need to do to have it in QGPL? And am I SOL about the file name?

    Thanks.

    This is my copy command:

    CHGVAR VAR(&CSVF) VALUE(&Stn *CAT 'XTRF.csv')

    CHGVAR VAR(&CSVF2) VALUE(&Stn *CAT 'XTRF' *CAT '_Late_Deliv_Rpt_' +
    *CAT &FROMDAY *CAT '.TESTSTNREPORTS.' *CAT &FROMDAY *CAT '.csv')


    CPYTOIMPF FROMFILE(QTEMP/FLAT1000) TOSTMF(&CSVF) +
    MBROPT(*REPLACE) STMFCCSID(*PCASCII) +
    RCDDLM(*CRLF) STRDLM(*NONE)

  • #2
    Re: Trying to FTP .CSV file

    see my response in your other post

    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment

    Working...
    X