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



Patrick,

> An OPM CLP with OVRDBF/OPNQRYF calls an ILE RPG. The results prove the
> OPNQRYF
> statement is being ignored. I see the CLP is in DAG and the RPG is in
> *NEW
> (substitute your own AG no.). I tell him to change his OVRDBF scope to
> *JOB. He does
> and gets the same results. Not understanding but still looking for a
> solution we run
> into situation no. 2.

OPNQRYF ignores all OVRDBF parameters other than TOFILE, MBR, LVLCHK,
INHWRT, or SEQONLY. That means that your OPNSCOPE is being ignored, and
treated as a call-level override because you're in the DAG.

If you prompt the OPNQRYF command, you'll see that it has it's own OPNSCOPE
parameter. That's the one that you want to set to *JOB.


> First, remove all changes made in the above scenario. Now, we convert
> OPM CLP to ILE.
> The new module is changed from a CALL to a CALLPRC. The CRTPGM binds the
> new CLLE
> module with the RPGLE module used in the previously called program.
> However, before I
> can reach the CALLPRC statement in the CL I run into another CALL to a
> program named
> DATEFUNC. It turns out my CL has the first parm to DATEFUNC defined as
> CHAR 6 where
> DATEFUNC defines its first parm as CHAR 8. My CL passes '041101' where
> DATEFUNC
> receives '041101TE'. The 'TE' causes DATEFUNC to not realize the value
> as a date and
> passes back an error like it should. My question is, "Why was this
> working before the
> conversion?"
> FYI - the new CLLE/RPGLE program uses *NEW AG where DATEFUNC is in QILE
> (I don't know
> if this matters.)

I had to read this a few times to try and understand what's happening, and
I'm still not sure that I do, but it sounds like your CL is passing a
character constant to DATEFUNC. In a CL CALL command, character constants
are passed with a minumum of 32 characters. The value is passed left
adjusted, with trailing blanks. So DATEFUNC would have been seeing '041101
' when called by your CL program. CALLPRC on the other hand, passes the
exact number of characters based upon your parameter declaration, and that's
why you're seeing what you'd expect in the second example.

John Taylor
Canada



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 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.