|
Thanks for the reply Marty. I did end up having them place the file on the IFS and then using CPYFRMSTMF to grab the files and place them in to a wrapped file on the native AS400 DB. The only way to list the files in an IFS directory, that I found, was DSPLNK to print output and then copy that spool file to a real file to be read. Not exactly pretty, but there did not seem to be any sort of 'DSPFD to outfile' type of option available for the IFS. It does seem to work fine, just not as 'pretty' as I'd like. 'Go-Live' is in about an hour so the true proof will come out then :-) Thanks again, Brian -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Urbanek, Marty Sent: Wednesday, February 18, 2004 11:54 AM To: 'midrange-l@xxxxxxxxxxxx' Subject: RE: FTP Receive Question Brian, A few ideas that might get you started: 1 - If you use a binary type transmission, it will wrap the data into the file like you want. However, if the sending system was not EBCDIC, you will then need to translate the data. You could do this with a simple program or maybe even from CL using the QDCXLATE API. 2 - Perhaps you could FTP the data into an IFS stream file and then use one of the CPYFRMSTMF or CPYFRMIMPF commands to get the data into your fixed record length file. I'm not sure of the exact options or capabilities, but you could play around with it. You could even kick off this command using QUOTE RCMD from the FTP client side. 3 - Try the WRKLNK command, like WRKLNK '/XYZ/TX*' Just some things for you to try. Not finished product. -Marty ---------------------------------------------------------------------- date: Tue, 17 Feb 2004 16:00:01 -0500 from: "Brian J. Eckenrod" <beckenrod@xxxxxxxxxxxxxxx> subject: FTP Receive Question I have a problem I am trying to solve with something clever and not a big change. Someone is trying to send a large stream of data to our AS400 via FTP. This data is EDI data and not wrapped (one long string of chars). Problem is, with the record size limit on the DB2 side of the AS400, there would be the possibility of truncating the data, if it is written as one long string of data. Of course I built my processes expecting the data to be dropped on the DB2 side of things and would rather not change to receive the data from the IFS. So, I am looking for a way, if there is one, to 'put' a stream of data in to a fixed width file on the AS400. My plan would be for the FTP initiator to create a PF on the 400 with a remote command and then put the data in to it and have it somehow 'magically' wrapped :) If that is not possible, is there a DSPFD equivalent on the IFS that I could create a list of similar files in an IFS folder. Like show me all files that begin with TX* in folder XYZ? Thanks everyone, Brian _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.