How to import data from a .CSV or .XLSX file to an AS/400 file?

5 pts.
AS/400 CSV
AS/400 DB2
as400 data import
I want to import the data of a .CSV or .XLSX file to a AS400 file. How can I accomplish this? Also, the .CSV/.XLSX file has two columns that I would like to keep in the AS/400 File. Any inputs would be really appreciated.

Answer Wiki

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

Put the file on the IFS and use CPYFRMIMPF or CPYFRMSTMF to copy it to the AS/400.

If you need an example, let me know and I will see if I can find one.

Discuss This Question: 5  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.
  • TomLiotta
    CPYFRMSTMF can be used, but it expects to copy each row without any conversion of the format. CPYFRMIMPF will convert each row from .CSV format to the related database format. A .CSV file will need to be in a standard .CSV format. A .XSLT file won't be understood by any AS/400 commands since it is specific to Excel/Windows. Note that AS/400 commands aren't alone in not knowing what a .XSLT is. Open one in Wordpad from Windows and you'll get a similar result. You have two general choices. First, you can study Microsoft documentation on the .XSLT format, along with any information you can gather through the internet. Then start writing programs to read and interpret .XLST files. Or second, you can search for existing code and adapt it. This might open-source code intended for a PC, such as might be available for Open Office; or it might be specific utilities that can be downloaded and installed on your AS/400. The POI/HSSF Java functions are by far the most common. They can be implemented because ILE RPG is capable of interfacing with Java. Tom
    125,585 pointsBadges:
  • grahamkean
    But I need an XLSX example? Many thanks.
    30 pointsBadges:
  • grahamkean
    Sorry meant XLS?
    30 pointsBadges:
  • ToddN2000
    You could also try the Excel add-in for the AS/400 for importing/exporting to to the iSeries. I find it works best with CSV file formats. You may need to tweak the file a bit.
    134,845 pointsBadges:
  • azohawk
    You can also try the data upload that is part of Client Access and also in Access Client Solutions for i.
    4,055 pointsBadges:

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.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: