|
Thank you but when we tried that we found it lost data! "Peter Dow" <pcdow@yahoo.com>@midrange.com on 27/09/2000 17:36:22 Please respond to RPG400-L@midrange.com Sent by: owner-rpg400-l@midrange.com To: <RPG400-L@midrange.com> cc: Subject: Re: Extraordinarily Long record length Have you tried just creating an 80-byte physical file CRTPF lib/file RCDLEN(80) then FTPing directly into it? Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax ----- Original Message ----- From: <Martin.Cubitt@keymed.co.uk> To: <RPG400-L@midrange.com> Sent: Wednesday, September 27, 2000 2:51 AM Subject: Extraordinarily Long record length > > One of our business partners are sending us data which arrives as one long > stream of data. We need to download this using FTP to our AS/400 and then > process it. However, the stream they send is of variable length and often > larger than the AS/400's maximum 32766 record length. > > Does anyone know how to read a variable length record and split it into 80 > column records? > > For now we upload to a PC, split into 80 column records using a PC program > and then FTP to our AS/400. > > The program I wrote on the PC reads the input file byte by byte and simply > outputs to a new file, adding control codes 13 and 10 when it reaches 80 > characters. I need to be able to do similar in RPG.. or any other means! > > The BASIC code is: > > open f$ for binary as #1 > open n$ for binary as #2 > > fread: > get$ #1, 80, C$ > put$ #2, C$ > put$ #2, chr$(13) > put$ #2, chr$(10) > > if not (eof(1)) then goto fread > close #1 > close #2 > > HELP!!! Please!! > > > This message has been virus checked with appropriate software used by > KeyMed (Medical & Industrial Equipment) Ltd., but neither it nor any > attachments can be guaranteed free from viruses or other defects and the > recipient accepts sole responsibility for any consequences arising from > opening this message or any attachments. The comments contained in this > message are personal to the sender, who accepts sole responsibility for > them. They should not be taken to represent the company's views or > position, which may differ in whole or in part from those expressed by the > sender. > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- This message has been virus checked with appropriate software used by KeyMed (Medical & Industrial Equipment) Ltd., but neither it nor any attachments can be guaranteed free from viruses or other defects and the recipient accepts sole responsibility for any consequences arising from opening this message or any attachments. The comments contained in this message are personal to the sender, who accepts sole responsibility for them. They should not be taken to represent the company's views or position, which may differ in whole or in part from those expressed by the sender. +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.