|
>Hi All ! > >Would anyone please tell us how to convert FMTDTA to OPNQRYF if the data is >sorted with data type "D" i.e digit portion of character. This is the equivalent of *ABSVAL in OPNQRYF. The FND says just use the digit portion of the field to sort. A number contains a zone and digit portion. For a zoned decimal field, the number 1 has a zone of 'F' and a digit of '1', e.g. X'F1'. A -1 has a zone of 'D' and a digit of '1', e.g. X'D1'. If you use FND, it sorts both 1's together, ignoring the sign. In OPNQRYF, use KEYFLD((FIELD *ASCEND *ABSVAL)). There are other advanced uses of FND and FNZ, e.g. sorting a packed MMDDYY format field properly. >Also how to take >care of the data type "P" i.e packed and what should be the data type in >OPNQRYF. FNP means the field is packed. OPNQRYF could care less about whether a field is zoned or packed decimal. Just use the the field name in the KEYFLD parameter, e.g. KEYFLD(FIELD1 FIELD2 FIELD3). > >Thanks in advance, >Suresh K.N. Charlie Massoglia, Massoglia Technical Consulting, Inc. PO Box 1065, Okemos, MI 48854, USA 517-676-9700 Fax: 517-676-1006 EMAIL: cmassoglia@voyager.net +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@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-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.