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



You need to change the InqMsgRpy for the job.

Try the following....

Use the MRGMSGF command to merge the message QRY2293 from message file QQRYMSG
to your own message file (say USRQRYA). (Not sure about the message in QCPFMSG,
this is the one I used to change)

Change the text of the message to something like "Sorry, but that would hurt" -
do not change the default reply etc.

CL program woul look something like this (not on 400 - working from memory)

----------------------------------------------------------------------------
Dcl &InqMsgRpy    *Char    10
Dcl &NbrofSeconds    *Dec  (5 0)  60

RtvJoba InqMsgRpy(&InqMsgRpy)

ChgJob InqMsgRpy(*DFT)
ChgQryA QryTimLmt(&NbrOfSeconds)

OvrMsgf Msgf(QQRYMSGF) ToMsgf(UsrQryA)

QSYS/WrkQry

ChgJob  InqMsgRpy(&InqMsgRpy)
ChgQryA QryTimLmt(*SysVal)
---------------------------------------------------------------------------

HTH

Paul Tuohy

jmoreno@militarycars.com wrote:

> Hello everyone
>
> I have the following challenge/opportunity/problem ....
>
> I have created a new command WRKQRY in a Library named: MyLib,
> This command has its own CPP (MyPgm in library: MyLib)
>
> This CPP is a CL program that has these two key statements
>
> (1) CHGQRYA QRYTIMLMT(&NbrOfSeconds)
>
> I have a copy of the *MSGF QCPFMSG in library: MyLib
>
> I am trying to do the following - I do not want the user to receive the
> message ID CPA4259 at all
>
> (2) OVRMSGF QCPFMSG to MyLib/QCPFMSG
>
> Here is the actual description of the CPA4259 message description
>
>  Message ID . . . . . . . . . :   CPA4259
>
>  Message file . . . . . . . . :   QCPFMSG
>    Library  . . . . . . . . . :     MYLIB
>  Message . . . . :   Estimated query processing time &1 exceeds limit &2
>  Cause . . . . . :   The database query time limit attribute has been
> specified
>    by the CHGQRYA CL command.  The query time limit specified is &2
> seconds. A
>    database query was about to be started which was estimated to require a
>    longer time to run than that allowed by the query time limit attribute.
> The
>    estimated time is &1 seconds.
>  Recovery  . . . :   Type a C to cancel processing of this query, or type
> an I
>    to continue processing the query.
>  Possible choices for replying to message . . . . . . . . . . . . . . . :
>    C -- Cancel the running of the query.
>    I -- Ignore the query time limit and run the query.
>  Technical description . . . . . . . . :   The following information
> explains
>    the type of access plan used by the query. This information is similar
> to
>
> More...
>
> etc ... etc .. etc
>
> I have modified the Message CPA4259 in library MyLib and removed the reply
> options/values/defaults
>
> If the resulting number of seconds from the Query Estimator is *LE than the
> &NbrOfSeconds ... let it execute
> without user intervention ...
> Otherwise
> Send a Display/Panel (MyDsiplay)  to the user informing that the query will
> not run due to query time limitations
>
> The problem is ... I still get the *INQUIRY message ...
>
> How can I get around this ?
>
> If I introduce the CHGJOB command with the DFTRPY(*YES) parameter, the
> default in QSYS is Cancel the run ...
>
> Any other ideas ?
>
> Just a query brain teaser ....
>
> _______________________________________________
> 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 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.