|
thanks you three for you help. and thanks jonathan for that detailed mail :) i tried something like scotts idea yesterday, too. but in a way that's worth a post on thedailywtf.com :) i defined the database field as 1b and imported my file in it. then i had an 1b field with 37 in it. then i overlayed that 1b field with an 1a field and then got an x'25' in it. the next step would be to use the qebcdic table to get the x'6c' now i'll use birgittas code. looks nice and functional. best regards Martin "HauserBirgitta" <Hauser@xxxxxxxxxxxxxxx> Gesendet von: rpg400-l-bounces@xxxxxxxxxxxx 19.10.2006 20:19 Bitte antworten an RPG programming on the AS400 / iSeries An: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Kopie: Thema: Re: How to print decimal ascii characters? Hi Martin, nice to see someone else working on DPD-Routing. To convert the Barcode-Id into EBCDIC, I wrote a simple RPG function: Prototyp for QDCXLATE D QDCXLATE PR ExtPgm('QDCXLATE') D P$LenInp 5P 0 const D P$Text 32767A Options(*VarSize) D P$ConvTab 10A Const /QPROLESRC,QDCXLATE Procedure P CvtASCII2AToEBCDIC... P B Export D CvtASCII2AToEBCDIC... D PI 1A Opdesc Konvertierter Wert D P$Alpha 2A Const ASCII numerisch D DSConvert DS D ASCIIHex 1A ASCII alpha D ASCIINum 3U 0 Overlay(ASCIIHex) ASCII numerisch *-------------------------------------------------------------------------------------------- /FREE Monitor; ASCIINum = %Int(P$Alpha); //Numer.ASCII-Wert QDCXLATE(1: ASCIIHex: 'QEBCDIC'); Return ASCIIHex; On-Error; Return *Blanks; EndMon; /END-FREE P E Mit freunlichen Grüßen / Best regards Birgitta Hauser
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.