× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Dale,

I am trying to modernize it and I am running into difficulties on
selecting (and sorting) records in CL using OPNQRYF.

If you really want to modernize it, forget about OPNQRYF which is also
legacy technology (and "stabilized" ;)) and move to embedded SQL.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von dale janus
Gesendet: Thursday, 16. July 2009 23:18
An: rpg400-l@xxxxxxxxxxxx
Betreff: sort select two fields as one.

I have a simple inventory list program. It is so simple it uses the cycle.

I am trying to modernize it and I am running into difficulties on
selecting (and sorting) records in CL using OPNQRYF. I am not opposed to
using SQL, but I have only played around with it a little bit and am not
very familiar with it.

Our product is steel pipe and we need to select on 4 fields. Outside
diameter (OD) wall, feet and inches. If I try to select a range from 2
feet 1 inch to 5 feet 11 inches, %range will grab all feet that are
between 2 and 5, and then all inches that are between 1 and 11. This is
not what I want.

I need to select lengths by treating feet and inches as one field. I
can create a logical file view with dds and concatenate the two fields
into one. But I cannot do it for od and wall because they have decimals.

I was planning on digging into the arcane rites and rituals of MAPFLD,
as well as seeing if Query Manager could create valid SQL statements for
me. (I"ve used Query Manger to create SQL statements in the past.) But
I thought I'd ask here first if there was a better way. I know I could
probably do the select in RPG, but I'm not sure about the sort part.
Plus I'm used to the old ways of getting the file the way you want it,
then print.

Any suggestions?
---Dale



IMPORTANT: This email is intended for the use of the individual
addressee(s) named above and may contain information that is
confidential, privileged or unsuitable for overly sensitive persons with
low self-esteem, no sense of humor or irrational religious beliefs. If
you are not the intended recipient, any dissemination, distribution or
copying of this email is not authorized (either explicitly or
implicitly) and constitutes an irritating social faux pas. Unless the
word absquatulation has been used in its correct context somewhere other
than in this warning, it does not have any legal or no grammatical use
and may be ignored. No animals were harmed in the transmission of this
email, although the terrier next door is living on borrowed time, let me
tell you. Those of you with an overwhelming fear of the unknown will be
gratified to learn that there is no hidden message revealed by reading
this warning backwards, so just ignore that Alert Notice from Microsoft.
However, by pouring a complete circle of salt around yourself and your
computer you can ensure that no harm befalls you and your pets. If you
have received this email in error, please add some nutmeg and egg
whites, whisk and place in a warm oven for 40 minutes.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.