Reading Flat File from AS400

JDI programmer

Member
The Client is on OneWorld Xe environment on AS400 (co-existance with World A7.3)

I wrote a UBE, which calls the C function to open a Flat File using C API (fopen) to open the file the client wants to import to OneWorld from their network drive.

Question is that when the UBE is launched on full client locally, the C function is able to locate/open the Flat File from the given path (which comes from UBE processing option..  e.g. \\wnt884\forecast\input.txt) But, when the UBE is run from the AS400 server, C function could not locate/open the Flat File.

Any idea why?  Does the flat file needs to be on the AS400 for it is work correctly?

Please advise if you know the solution or had encounter the situation before.

Thanks.
 
In a nutshell - the As/400 doesn't understand the UNC (\\servername\) stuff... If you are importing from a flat file, you cannot import from the UNC from the iSeries.

Options:
* FTP from the server to an iSeries Library - run your TC on the Server
* Run the TC (with the UNC) Local Only (I'm not sure what happens when you go to 8.11 - anyone??)

This is an issue that many of us fight...

I'm currently working on an FTP From iSeries Function - if anyone is interested. In a nutshell - it's a TC Wrapper and will FTP from the iSeries to any parameterized FTP Server (You supply the Servername, Username, Password, FileName and a Script Name - it will build the infile, Call a CLP and check the outfile for errors)...

I'm tired of having to build the same solution for each iSeries client.

(db)
 
Thanks for the info. We will try to move the file to iSeries and try runing it.
 
To use this function on OS400 systems you need to reference the file in the OS400 library format, not UNC format.

I.e. not '\\server\share\path\file', not 'c:\path\file', but: 'LIBRARY/FILE', e.g. 'PDDTA/EXPORT'
 
I would copy the file to a IFS folder in iSeries and then use a TC to get the records to a table.

use /IFSfoldername/inputfile.txt in TC.
 
Back
Top Bottom