|
FTP is a great tool with a few limitations. One of its strengths is that it's file agnostic. On the iSeries the ftp client has great help text. On the command line you can enter help cmdname and find out what the command does or just enter help and get the complete help file. I learned almost everything I know about ftp from the help. The following assumes you're transferring files from one iSeries to another: First, packed fields in database files don't work well in FTP. If the file contains packed fields you need to work around it. I think the easiest way would be to use cpytoimpf to a delimited file in the ifs and send the file you've created. The receiver will need to convert it to the required format. The receiver of the file has to know the file layout and supply you the name of the destination file if you want to do a direct transfer. If you're sending a text file it doesn't matter. It's going to be a text file on the other end. If you're transferring files from an iSeries to different type of system: Database files all have a proprietary underlying format. Unless the sending system and the receiving system use the same database file format **conversion is necessary**. Text files are a lot more forgiving. All you need to pay attention to is the end of line character. Under certain circumstances you'll need to do a binary transfer. Usually it's not necessary for data. > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rituparna > buragohain > Sent: Thursday, April 28, 2005 8:27 PM > To: RPG programming on the AS400 / iSeries > Subject: RE: Sending file data using TCP/IP > > Suresh, > Thanks for your response. The record length is not fixed. > Also, it may have any number of records. In fact, it can even > be a text file (ASCII file). I need to send the data in the > text file or the physical file across to the server using > TCP/IP. How do I do it? > > Regards, > Ritu > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Suresh > Moda (EAI - JD Edwards) > Sent: Thursday, April 28, 2005 6:01 PM > To: 'RPG programming on the AS400 / iSeries' > Subject: RE: Sending file data using TCP/IP > > Hello Ritu, > > Do you know the Record Format Length? > > If you know the length of the record which you are going to > receive you can define the Physical File > > using command > > CRTPF FILE(QTEMP/FTPRECIVE) RCDLEN(RECORD LENGTH) > > I think this may help you. > > Regards, > > Suresh > > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of rituparna > buragohain > Sent: Thursday, April 28, 2005 5:41 PM > To: RPG programming on the AS400 / iSeries > Subject: Sending file data using TCP/IP > > > Hi, > My requirement is to transfer the data from File1 (it can > have any number of fields) from the client to the server > using TCP/IP and the data received by the server has to be > written on to File2 in the same format. > How do I go about with this? > > I have done the same in Java using StringBuffer(). > > I am new to RPG and need your help! > > Thanks, > Ritu > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > http://www.patni.com > World-Wide Partnerships. World-Class Solutions. > _____________________________________________________________________ > > This e-mail message may contain proprietary, confidential or > legally privileged information for the sole use of the person > or entity to whom this message was originally addressed. Any > review, e-transmission dissemination or other use of or > taking of any action in reliance upon this information by > persons or entities other than the intended recipient is > prohibited. If you have received this e-mail in error kindly > delete this e-mail from your records. If it appears that > this mail has been forwarded to you without proper authority, > please notify us immediately at netadmin@xxxxxxxxx and delete > this mail. > _____________________________________________________________________ > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) > mailing list To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > ***************************** NOTICE: All e-mail sent to or from this e-mail address will be received or otherwise recorded by The Sharper Image corporate e-mail system and is subject to archival, monitoring, and review by and/or disclosure to Sharper Image security and other management. This message is intended only for the use of the addressee and may contain information that is privileged and confidential. The contents of this message may contain personal views which are not the views of The Sharper Image. If you are not the intended recipient, dissemination of this communication is prohibited. *****************************
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.