ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SSH from Linux to iSeries - copy csv file to library

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

  • SSH from Linux to iSeries - copy csv file to library

    Hi

    New to iseries and ibm and trying to accomplish this:

    client sftp's a csv file to an IFS directory on one of our iseries. This csv file needs to be transferred into an iseries library
    1) is there a way of SFTP'ing it directly to the required library?
    2) if not , what do I need to do to get csv files into their required libraries?
    I have tried cpy from stream to imp command but ----

  • #2
    Re: SSH from Linux to iSeries - copy csv file to library

    I would use SFTP to send to the IFS, and use a program like CPYTOIMPF to convert it to a PF. I would not attempt to send it directly to a PF for two reasons:

    1) SFTP is a Unix program, and has no knowledge of phyiscal files. Sending to one would likely cause a mess.
    2) CSV format makes more sense in a stream file rather than a physical file since it is made up of variable-length records, etc.

    CPYTOIMPF will convert the CSV into a phsical file, splitting out the fields into proper externally defined fields in the result, etc.

    Comment

    Working...
    X