Link to home
Start Free TrialLog in
Avatar of arturosm
arturosm

asked on

Program for AS/400

Hello Experts.

I need to develop a program for uploading files from a Windows server to a AS/400 machine. I need to check the integrity of the file once it has been uploaded to the AS/400, to see it has not changed. I have to give a proposal of what to use in the AS400 side, for example a FTP server, a custom program, a web service, or whatever I think is the best solution. In the windows end I know everything I need but I have no idea what to use or develop in the AS400 side. Any advice will be welcome, I know well how to program in C or java or can have another person to program what is needed. I would use an already done FTP server but not sure if it comes with AS/400 nor how to install it. As you can guess I almost know nothing about AS/400.

Regards.
Avatar of giltjr
giltjr
Flag of United States of America image

It has been years (15+) since I worked with an AS/400 and OS/400.  But here are a few generic possibilities:

You could use PKZip.  Zip the file on Windows, ftp to AS/400, then unzip.  I'm fairly sure that OS/400 does not come with PKZip, so you would need to get it.  PKZip has its own check for file integrity.

Using an more secure FTP, either sftp or FTPS.  I don't know if they are avaibale for OS/400.

Using MD5 check sum.  And again, I don't know if OS/400 come with the MD5 check sum program by default.
Is the 400 local?  is the file huge?

if the 400 is local then you may be able to skip any security issues.
if the transfer is fast enough you could PUT the file then GET the same file back.   then compare the files on the windows side.

i have not seen a 400 in the past 15 years that did not have FTP installed.

Steve Bowdoin
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_276102
Member_2_276102

You might also have a SQL table defined to receive the data on the AS/400. Then, ODBC/JDBC becomes reasonable. Many rules can be configured in DB2 to provide much of the validation. Or a stored procedure might be used to perform validation before applying uploaded rows to a target table.

As Gary points out, the type of file will make a lot of difference. A streamfile (e.g., non-database, as in an image file or even a text file) can be handled differently than a database transfer. Also, the AS/400 operating system version/release might be important unless you're dealing with a reasonably current release. (There are old ones out there, just as there are the rare Windows 98 PCs still at some business sites.)

Tom
Avatar of arturosm

ASKER

Thanks Experts for your comments so far.

I will be uploading files of about 2 MB in size each, and there will be about 10-15 files per day. The files are ASCII text files, the idea is to put them in the AS/400 so that other already existing programs or jobs (I don´t know what they have running there) process  them. I just need to asure they get to the AS/400 without change. The windows machine and the AS/400 are in the same building and LAN. My project is mainly a windows programming task but have to upload the output files to the AS/400 after the end of the windows processing. I don´t know yet the features of the 400 machine (SO version, utility software installed, hardware resources, etc).

I will wait for your comments now that you have this info.

Thank you very much.
Well, before we can make any comments you really need to find out what capabilities the AS/400 has.

We can't help you knowing only 1/2 of the picture.

So you really need to find out what level of OS/400 is installed.  If it has PKZip or not, but as Gary has stated (and I forgot) you could use the JAR command to unzip a file.  Although most people don't know it Java application files (JAR, RAR, WAR, EAR, and so on) are nothing but zip files with file suffixes other than ".zip".
Assuming that you want to upload these ASCII stream files to the AS/400's IFS (as opposed to importing them into a DB2 table), then based on your volumes and validation requirements, then I suggest using the SSH File Transfer Protocol (SFTP) approach that I outlined above, since that will resolve both your needs for a file transfer mechanism and your validation needs, since SFTP is a reliable protocol.

- Gary Patterson
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you.