|
you can also use QDCXLATE that will tanslate a field with with a table. You can create your own table, and for each char (from 00 to FF) change the correspondance, i use it for non diplayable char. it work's fine and is fast. here is tha table i use for that and a sample of call. you have 32 char by line, it gives for example 00--> 5F 5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F 5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F 404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F 606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F 808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9F A0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF C0C1C2C3C4C5C6C7C8C9CACBCCCDCECFD0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF CALL 'QDCXLATE' PARM 10000 LENGTHi 5 0 PARM Ds_data PARM 'QEBCDIC' TABLE 10 PARM 'OUTILS' TblLibrary 10 Endif hope this help. ----- Original Message ----- From: "Gauri Kulkarni" <gauri.kulkarni@xxxxxxxxx> To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx> Sent: Wednesday, August 17, 2005 12:23 PM Subject: RE: Checking for field with Garbage Value in RPG. > Exactly .... what I wanted to know was 'Set of chars that are garbage' (to > define it as a named const). > > I did the same thing in a reverse way. > Defining VALID chars as a named constant and used CHECK, since i din't know > what all characters I can have as a garbage. It was just like - I know what > valid chars are and anything else is garbage. > > Thanks a lot for your help. > > > -----Original Message----- > From: rpg400-l-bounces@xxxxxxxxxxxx > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of > Peter.Colpaert@xxxxxxxxxx > Sent: Wednesday, August 17, 2005 3:15 PM > To: RPG programming on the AS400 / iSeries > Subject: RE: Checking for field with Garbage Value in RPG. > > > Gauri, > > you need to create a named constant that contains all the invalid > characters, and one that contains as many blanks; for instance: > > d garbage c '%µ£ù=+-_^' > d blanks c ' ' > > /free > Field = %xlate(garbage:blanks:Field); > /end-free > > Hope this helps. > > Peter Colpaert > Application Developer > Massive - Kontich, Belgium > ----- > Yoda of Borg are we. Futile is resistance, assimilated will you be. > ----- > > > > > "Gauri Kulkarni" <gauri.kulkarni@xxxxxxxxx> > Sent by: rpg400-l-bounces@xxxxxxxxxxxx > 17/08/2005 11:27 > Please respond to RPG programming on the AS400 / iSeries > > > To: "'RPG programming on the AS400 / iSeries'" > <rpg400-l@xxxxxxxxxxxx> > cc: > Subject: RE: Checking for field with Garbage Value in RPG. > > > XLATE might work in case if I know what exactly the <garbage> is. So that > BLANKS can be replaced with those invalid characters. > Is there any way to define garbage as well ? > Please let me know .. > > -- > 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. > >
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.