|
How are you trying to use translation tables? For example if you are trying to convert something from mixed case to upper case in an RPG program the XLATE opcode makes an excellent choice: DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords+++++++++++++++++++++++++++++ ¦ D Up C 'ABCDEFGHIJKLMNOPQRS- ¦ D 'TUVWXYZ' ¦ D Lo C 'abcdefghijklmnopqrs- ¦ 'tuvwxyz' ¦ CL0N01Factor1+++++++Opcode(E)+Factor2+++++++Result++++++++Len++D+HiLoEq.. ¦ * ¦ * In the following example, all values in STRING are translated to ¦ * uppercase. As a result, RESULT='RPG DEPT'. ¦ * ¦ C MOVE 'rpg dept' String 8 ¦ C Lo:Up XLATE String Result If you are trying to make a logical file on a physical file and want the logical file to sort on a field regardless of case you should try the parameter SRTSEQ(QSYS/QSYSTRNTBL) on the CRTLF command. The input to your program will still be a mix of upper and lower case. I use this for sorting names but still reading the names in mixed case. If you are trying to make a logical file on a physical file and want the field in the logical file to be all upper case then try the TRNTBL keyword using the QSYS/QSYSTRNTBL table. prakashsubramani@hotmail.com on 08/27/98 10:02:15 AM Please respond to MIDRANGE-L@midrange.com@Internet To: MIDRANGE-L@midrange.com@Internet cc: Subject: HOW TO USE A QASCII TRANSLATION TABLE SIR, I have got a program which reads ascii values from a database table. In the logical file, there is a field called TRNTBL, but whenever I specify QASCII here, it reports an error. I don't know how to use this TRNTBL keyword for my program. Please help me in knowing more about this keyword. Also is there method for converting uppercase letters to lowercase letters through translation tables or are there any program readily available to do so? I remember seeing QCASE256 translation table for conversion from lowercase to uppercase, but from uppercase to lowercase iam not sure, please help me My mail Id is prakashsubramani@hotmail.com Prakash ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.