Get into PDM and execute the CL from command entry(F10) which will
show you the "log" for that event and all prior entries. This will
show most, if not all messages opnqryf generates. To make sure, 
recompile the clp to "log" and BEFORE you run the job, chgjob and
make sure you are logging all messages. This should produce a very
detailed log. To get it all in writing, sign off, sign on, run the
job and when you signoff, press F4 and specify LIST which will produce
a joblog in detail in qezjoblog......

A much better way to debug opnqryf is to run it interactively and you
get a little better handle on the results. How many selections are you
using ??? Are you certain the records you are looking for really exist
??

To check yourself, run a CPYF using the same selections and see what 
you get..... This will at least prove if the data combinations exist.




MacWheel99@aol.com wrote:
> 
> 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.
> 
> MacWheel99@aol.com (Alister Wm Macintyre) (Al Mac)
> AS/400 Data Manager & Programmer for BPCS 405 CD Rel-02 mixed mode (twinax
> interactive & batch) @ http://www.cen-elec.com Central Industries of
> Indiana--->Quality manufacturer of wire harnesses and electrical
> sub-assemblies - fax # 812-424-6838
> 
> +---
> | 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 thread ...

Follow-Ups:
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.