× 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.



Al,

I often stick a CPYFRMQRYF right after the OPNQRYF, for debugging purposes.
That way I have a copy of the result set available for analysis and further
testing.


John Taylor
Canada

----- Original Message -----
From: <MacWheel99@aol.com>
To: "AS400 & family discussion group" <MIDRANGE-L@midrange.com>
Sent: Wednesday, May 23, 2001 10:03
Subject: OPNQRYF Observation


> I am a bit behind the times, learning how to use things for the first time
> about the time everyone else who ever learned it is moving on to other
> technologies.
>
> Suffice it to say that last nite I wrote my first CL that had an OPNQRYF
in
> it.
> I thought the difficulty was that you cannot concatenate a numeric
variable,
> but I needed to *EQ a numeric value with a numeric field, and you can't
> compare alpha to numeric, then when I finally got the darn thing to
compile &
> run without any errors, it came up with zero data.  Come to find our hours
> later my choice of test data was in fact empty ... occasionally AL MAKES A
> MISTAKE.
>
> Since the OPNQRYF selection of data was new software &
> since the RPG program the data was being fed to was also a new program &
> since I did not realize that there was in fact no data that met the
original
> test conditions
>
> something that would have been very useful to me while trying different
test
> conditions would have been some piece of code between the OPNQRYF
statement
> and the CALL RPG statement
> to SNDPGMMSG or something that identified the number of records found by
> OPNQRYF
> and I mean to a log that I can read after I have exited the program, not
just
> on bottom of screen while it is running.
> I was doing tests with CHGJOB cranked up to LOG(*YES) and seeing tons of
> other stuff cluttering the picture.
>
> This is now an academic question since by the end of the evening my new
> software was working satisfactorily.  It is not as elegant as I would have
> liked, but it works.
>


+---
| 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 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.