|
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. -- [ Picked text/plain from multipart/alternative ] A simple solution is to write out an intermediate work file with a long alpha sort field. Load the sort field with the requested sort field values. CALL FMTDTA. For example, user requests sort by CUST, DATE, and INVOICE#. To load the sort field, string together the Cust + date + invoice#. Write the record to the work file. Call FMTDTA and print the report. Old, but it works. Could also use embedded SQL or OPNQRYF. To save definitions, set up a report file, one record for each report request. Have fields for report ID, title, user name, report copies, outq name, hold spool file Y/N, record selection criteria, sort order, sub-total break fields, etc, etc. -----Original Message----- From: Dan Rasch [mailto:drasch@mail.win.org] Sent: Tuesday, April 23, 2002 3:50 PM To: midrange-l@midrange.com Subject: Multiple sort option logic We have a requirement to print multiple variations of an aging report, giving users 4 different sort groups. The matrix looks like about 80 combinations. The users will have an input screen of some kind to define their sort definitions. Right away, I thought OPNQRYF using variables might do the trick. Ugly IMHO but effective. Then I wondered aloud if SQL would be a better avenue. We almost certainly have partial paths out there, so we do not start from zero, but then again it could also get ugly. Also, the ability to save at least a definition (even better, a full path) would be an attaboy. Trying to weigh the maintainability versus the performance, and looking for suggestions. TIA Dan Rasch - because if the human species concentrated on the really important things in life, there would be a shortage of fishing poles! IBM Certified twice....... but still a couple PTFs away from Nirvana. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l or email: MIDRANGE-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-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.