|
I forgot to define the tempData field: D tempData S 80A That's what I get for not compiling my examples :-) Aaron Bartell -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Bartell, Aaron L. (TC) Sent: Monday, January 12, 2004 1:25 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: Copying to a Stream File Just write the entire data structure of data to the stream file and concatenate the ~ on to the end of the string. FFile IF E K Disk D myDS DS Qualified Inz D field1 20A D field2 30A D field3 30A D handle S 10I 0 D rc S 10I 0 /Free // psuedo code on the open(). . . handle = open('/myfile.txt'); Read File; Dow Not %EOF(File); // move the fields from File to myDS right here tempData = myDS + '~'; rc = write(handle: tempData: %Size(tempData)); EndDo; rc = close(handle); /End-Free Hope that helps, Aaron Bartell -----Original Message----- From: rpg400-l-bounces+albartell=taylorcorp.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+albartell=taylorcorp.com@xxxxxxxxxxxx]On Behalf Of Kara Ketcham Sent: Monday, January 12, 2004 1:09 PM To: rpg400-l@xxxxxxxxxxxx Subject: RE: Copying to a Stream File -----Original Message----- From: Kara Ketcham Sent: Monday, January 12, 2004 1:52 PM To: 'rpg400-l@xxxxxxxxxxxx' Subject: Copying to a Stream File I am trying to copy a physical file to a stream file that will be imported into another system. This other system cannot accept carriage returns or line feeds so I have created a physical file with one field that is defined as 80 characters long. The data is formatted so that it is written out to this file as one long string with a '~' separating each segment. The problem is that when the last record is written out, it does not fill the entire 80 characters of the field. I can not have anything after the last '~' - no carriage return, no line feed, no eof terminator, and not even blanks. Does anyone have a suggestion? Thank you, Kara Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. _______________________________________________ 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. _______________________________________________ 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.
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.