ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

FTP excel file to AS400 PF

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

  • FTP excel file to AS400 PF

    Hi All,

    I tried to FTP an excel file (converted into .csv format) to a already defined PF on AS400. However, after the file transfer, the contents in the file is not readable. Need urgent assistance on this.

    Below are the details -

    The file on AS400 has the following -
    Name - EXTP0003
    Fields -
    1. EANUPC (numeric, size 13)
    2. SKN (DECIMAL , size 6)
    3. ACTTYPE (Character, size 1)

    The .csv file has the following -
    Name - EAN1.CSV
    3 fields without any header(column name). The first two columns have numeric data and the third column has 1 character data

    the commands i have used to FTP the file to AS400 is in the attachment. Also, the content in the AS400 file is attached.

    Thanks in advance.

    Regards,
    Arpita
    Attached Files

  • #2
    Re: FTP excel file to AS400 PF

    First, FTP the file to an IFS folder. Something like /development/EAN1.csv. Once this is done, you can copy the contents of the csv file into a PF of a similar structure using the CPYFRMIMPF command.

    Comment


    • #3
      Re: FTP excel file to AS400 PF

      vikramx is correct. FTP doesn't know or care about the file layout. it's a pretty simple process. it takes data from one place and deposits it in another (it will do some conversion if needed) but that's it. as far as FTP is concerned your originating is nothing more than a "blob of data".
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment


      • #4
        Re: FTP excel file to AS400 PF

        Another option would be to use Giovanni Perotti's XLPARSE routines to get the job done. We use a modified version of them here and it works like a charm. In our case, the user puts the Spread heet in a mapped IFS drive and then takes an option on the screen to upload the data. After it's been run through the XLParcer routine, we validate the data and insert into the actual files (we initially write them into a 'holding' file so that we can check the data first).

        You can find more information on it at his website here

        Hope that helps, the stuff works really well for us, hopefully it'll be of some use to you.

        Comment

        Working...
        X