|
Hi, Kevin. I would hope trimr isn't remove any data, but I will plan on this as the next step (looking at the hex values before and after the trim and adding the parens and single quote). For now I'm try it by first writing (, then the pure data itself (which I know works when writing a plain text file), then another write for the } ' at the end. Brad On Fri, 3 Nov 2006 08:11:01 +1100 Kevin Wright <Kevin.Wright@xxxxxxxxxxxx> wrote:
Hi Brad, The CCSIDs look OK, particularly as you say just sending the DBCS not enclosed in the brackets seems to work. Is it possible that the %trimr is removing the closing shiftin byte? Look at the value of Data in hex both before and after adding the brackets. Also could the DBCS in question contain the apostrophe character in one of its bytes? Regards, Kevin Wright.-----Original Message----- From: Brad Stone [mailto:brad@xxxxxxxxxxxx] Sent: Thursday, 2 November 2006 5:53 PM To: RPG programming on the AS400 / iSeries Subject: Re: More Stream File and DBCS issues...From is 935, to is 1381.Works fine when writing to a .txt file, in other words,thetext as is. The only difference in this case is I'm writing thatsametext with parens around it and a single quote at theend ofthe string So: This is a string <double byte stuff here> workes fine, but: (This is a string <double byte stuff here>) ' Errors out with this error. I thought maybe because {,}or ' were not invarient characters, but they should befine.On Thu, 2 Nov 2006 14:16:21 +1100 Kevin Wright <Kevin.Wright@xxxxxxxxxxxx> wrote:Hi Brad, FWIW text for CPE3490 is Conversion error. One ormorecharacters could not be converted from the source CCSID to the targetCCSID.What is the from CCSID? What is the to CCSID? Aretheyboth DBCS (or more probably mixed)? Regards, Kevin Wright.-----Original Message----- From: Brad Stone [mailto:brad@xxxxxxxxxxxx] Sent: Thursday, 2 November 2006 2:36 PM To: RPG programming on the AS400 / iSeries Subject: Re: More Stream File and DBCS issues... Even more information. EVERY time it writes DBCS data it returns 3490.. Areturncode perhaps? :) Brad On Wed, 01 Nov 2006 21:43:30 -0500 "Brad Stone" <brad@xxxxxxxxxxxx> wrote:I found more information on this doing a debug.Itmayor may not relate to my socket CCSID issue I amhaving.On the call to the write() API, I'm writing out128bytes. The return code after the call is saying itwrote3490bytes. There are probably 10 DBCS character inthisdata.. the rest is SBCS. But every write after this,evencontaining SBCS is corrupted. And the RC forSBCSdatawrite() calls shows the same amount of byteswrittenas Itold it to write. It's almost like it's totally messing up mypointerposition as I am using %addr() for the data parmonthewrite() API. Any ideas, I'm open ... off to scour the docsnow..Brad On Tue, 31 Oct 2006 22:32:16 -0500 "Brad Stone" <brad@xxxxxxxxxxxx> wrote:Ok, this one really is weird. I am converting files to different formats.Thedatacontains DBCS data and SBCS data. We got past the point of making a plain text or.docfileworking (.doc being basically a plain text withCRLFforthe lines). Now we're doing PDF. Which technically shouldmakezerodifference. We read the data in (a line of text), thenwrite itoutto a stream file using the write() API. When it hits the line with the DBCS data in it,itjustfreaks out and starts writing garbage to thefile.The ONLY difference in the text we're writingoutis itis enclosed in ( and ) ends with a single quote. I checked the data right before the Write(),checkedthelength it was passing in, and everything isfine!Itwrites 12 lines before this one just fine, butonceithits the DBCS data, boom. Makes no sense to me. It is PDF data, but it'sreally"just plain text". And all data after it, evenstraighSBCS data is also garbage. The only thing I could find was the hex valuefortheline that it starting bombing out on, instead ofwritingthereal data, it was x'FEFE' The only thing I can think of here is a bug intheOSwith the write() API. Anyone else seen anything like this, or haveanyideas?So: eval Data = 'This is DBCS Data' if I write just Data, it is fine, even the DBCSdata.If I do: eval Data = '(' + %trimr(Data) + ') ''' It starts writing just garbage.. and not eventhesamelength of string garbage. :) Argh [pulling hair out] Thanks in advance! -- 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 listoptions,visit:http://lists.midrange.com/mailman/listinfo/rpg400-lor email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to reviewthearchives at http://archive.midrange.com/rpg400-l.Bradley V. Stone BVS.Tools www.bvstools.com -- 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 listoptions,visit:http://lists.midrange.com/mailman/listinfo/rpg400-lor email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to reviewthearchives at http://archive.midrange.com/rpg400-l.Bradley V. Stone BVS.Tools www.bvstools.com -- 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-lor email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review thearchivesat 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.Bradley V. Stone BVS.Tools www.bvstools.com -- 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-lor email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review thearchivesat 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.
Bradley V. Stone BVS.Tools www.bvstools.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.