ftp a file - IBM AS400

This is a discussion on ftp a file - IBM AS400 ; Question, I have a spool file I need to do a CPYSPLF on and then transfer the file to the PC in ASCII. If I just drag and drop the file from the spool file (using iseries navigator) it has ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: ftp a file

  1. ftp a file

    Question,

    I have a spool file I need to do a CPYSPLF on and then transfer the
    file to the PC in ASCII.

    If I just drag and drop the file from the spool file (using iseries
    navigator) it has some characters in it for each space so that doesn't
    work. If I do a CPYSPLF and then transfer the file using iseries
    access transfer function (I say translate 65535 and also do not
    truncate spaces to end of record) it works fine.

    I'm wondering if I could use ftp and achieve the same results? And
    wouldn't that be considerably faster? The file will be fairly large,
    say 4000 spooled pages. Can I write the FTP into my C/L? I've used
    ftp a little bit and assume it will translate it to ascii and keep
    each record the same length and not drop spaces??

    Is there a better way to do this than what I am thinking?

    Thanks for any suggestions.
    ga
    nospam@nospam.fmctc.com

  2. Re: ftp a file

    On Apr 30, 12:01*pm, ga wrote:
    > Question,
    >
    > I have a spool file I need to do a CPYSPLF on and then transfer the
    > file to the PC in ASCII. *
    >
    > If I just drag and drop the file from the spool file (using iseries
    > navigator) it has some characters in it for each space so that doesn't
    > work. *If I do a CPYSPLF and then transfer the file using iseries
    > access transfer function (I say translate 65535 and also do not
    > truncate spaces to end of record) it works fine.
    >
    > I'm wondering if I could use ftp and achieve the same results? *And
    > wouldn't that be considerably faster? *The file will be fairly large,
    > say 4000 spooled pages. *Can I write the FTP into my C/L? *I've used
    > ftp a little bit and assume it will translate it to ascii and keep
    > each record the same length and not drop spaces??
    >
    > Is there a better way to do this than what I am thinking?
    >
    > Thanks for any suggestions.
    > ga
    > nos...@nospam.fmctc.com


    What are you trying to do with the spooled file report?? Do you need
    it in PDF or TXT or ??

  3. Re: ftp a file

    On Apr 30, 5:01*pm, ga wrote:
    > Question,
    >
    > I have a spool file I need to do a CPYSPLF on and then transfer the
    > file to the PC in ASCII. *
    >
    > If I just drag and drop the file from the spool file (using iseries
    > navigator) it has some characters in it for each space so that doesn't
    > work. *If I do a CPYSPLF and then transfer the file using iseries
    > access transfer function (I say translate 65535 and also do not
    > truncate spaces to end of record) it works fine.
    >
    > I'm wondering if I could use ftp and achieve the same results? *And
    > wouldn't that be considerably faster? *The file will be fairly large,
    > say 4000 spooled pages. *Can I write the FTP into my C/L? *I've used
    > ftp a little bit and assume it will translate it to ascii and keep
    > each record the same length and not drop spaces??
    >
    > Is there a better way to do this than what I am thinking?
    >
    > Thanks for any suggestions.
    > ga
    > nos...@nospam.fmctc.com


    I dont see why you cant use FTP once you have your splf in a pf. You
    will need to OVRDBF on 2 files, INPUT & OUTPUT to give ftp
    instructions to the ftp command & a location for its output which is
    normally displayed on the console which you can subsequently parse to
    detect error conditions. You need to put a userid & password in the
    1st line of the input file & obviously run an ftp server on your
    target pc.

    Jonathan

  4. Re: ftp a file

    When using CPYSPLF, I usually do it in System/36 mode, which adds 10 bytes
    to the fromt of each record, holding PageNumber, LineNumber and RecordNumber
    in binary. The System/36 procedure COPYPRT gives the file layout.

    Peter Kinsman

    "Jonathan Bailey" wrote in message
    news:93bee084-83c8-423b-a11e-eca6d62b93e6@w74g2000hsh.googlegroups.com...
    On Apr 30, 5:01 pm, ga wrote:
    > Question,
    >
    > I have a spool file I need to do a CPYSPLF on and then transfer the
    > file to the PC in ASCII.
    >
    > If I just drag and drop the file from the spool file (using iseries
    > navigator) it has some characters in it for each space so that doesn't
    > work. If I do a CPYSPLF and then transfer the file using iseries
    > access transfer function (I say translate 65535 and also do not
    > truncate spaces to end of record) it works fine.
    >
    > I'm wondering if I could use ftp and achieve the same results? And
    > wouldn't that be considerably faster? The file will be fairly large,
    > say 4000 spooled pages. Can I write the FTP into my C/L? I've used
    > ftp a little bit and assume it will translate it to ascii and keep
    > each record the same length and not drop spaces??
    >
    > Is there a better way to do this than what I am thinking?
    >
    > Thanks for any suggestions.
    > ga
    > nos...@nospam.fmctc.com


    I dont see why you cant use FTP once you have your splf in a pf. You
    will need to OVRDBF on 2 files, INPUT & OUTPUT to give ftp
    instructions to the ftp command & a location for its output which is
    normally displayed on the console which you can subsequently parse to
    detect error conditions. You need to put a userid & password in the
    1st line of the input file & obviously run an ftp server on your
    target pc.

    Jonathan



  5. Re: ftp a file

    COPYPRT = CPYSPLF *S36FMT



  6. Re: ftp a file

    Sorry. What I meant to say was that in the
    System/36 Environment Reference Manual
    there is a full description of the file.

    Peter

    "Emile" wrote in message
    news:4819d0e7$0$17907$e4fe514c@dreader12.news.xs4a ll.nl...
    > COPYPRT = CPYSPLF *S36FMT
    >
    >




  7. Re: ftp a file

    If you're open to commercial options, we have a product called WinSpool/400
    for downloading reports from the iSeries.

    We also have a native product called Batch Report Server/400 that can
    automate the process of sending a report from the iSeries to any FTP site in
    PDF, RTF, ASCII or HTML format.

    For more info and a FREE demo check out our web site or feel free to contact
    me directly.

    Regards,
    Richard Schoen
    RJS Software Systems Inc.
    "Get the information you need. Now!"
    Email: richard@rjssoftware.com
    Web Site: http://www.rjssoftware.com
    Tel: (952) 898-3038
    Fax: (952) 898-1781
    Toll Free: (888) RJSSOFT

    "ga" wrote in message
    newsl5h14lvmvibrte4j1pmhe50840u6oed47@4ax.com...
    > Question,
    >
    > I have a spool file I need to do a CPYSPLF on and then transfer the
    > file to the PC in ASCII.
    >
    > If I just drag and drop the file from the spool file (using iseries
    > navigator) it has some characters in it for each space so that doesn't
    > work. If I do a CPYSPLF and then transfer the file using iseries
    > access transfer function (I say translate 65535 and also do not
    > truncate spaces to end of record) it works fine.
    >
    > I'm wondering if I could use ftp and achieve the same results? And
    > wouldn't that be considerably faster? The file will be fairly large,
    > say 4000 spooled pages. Can I write the FTP into my C/L? I've used
    > ftp a little bit and assume it will translate it to ascii and keep
    > each record the same length and not drop spaces??
    >
    > Is there a better way to do this than what I am thinking?
    >
    > Thanks for any suggestions.
    > ga
    > nospam@nospam.fmctc.com




+ Reply to Thread