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



James,

Chuck's method works fine, and it's what I used to do. However, I
eventually wrote a procedure called DSPLY2 which accepts a single parameter
(just like DSPLY), but you can set defaults at the beginning to deterine
how the output should be...er...output.

So instead of this:

DSPLY 'Life is good';

you'd have this:

DSPLY2('Life is good');

and optionally at the begining of the program you could have the following:

DSPLY2_OPT('intoutq=*ext bchoutq=*defer');

which would (in this instance), 'defer' any DSPLY2 calls (i.e. ignore them)
when running in batch. I have various options available, such as
automatically prepending (is that a word?) the job, program or timestamp to
any message.

The main reason I prefer it is that you don't have the 52-character DSPLY
limit (I was never sure why they never increased that, as I can't see that
it would affect backwards-compatibility).

Rory


On Wed, Jan 16, 2013 at 10:05 AM, CRPence <CRPbottle@xxxxxxxxx> wrote:

On 16 Jan 2013 09:18, James H. H. Lampert wrote:
As I recall, when a DSPLY statement is run in a batch job, the
message normally goes to the QSYSOPR message queue.

Can this be suppressed, in a way that affects the entire job?

Why not just code the DPLY with the desired message queue; e.g.
'*EXT' for the so-called "output-queue" argument [or Factor 2] so that
"The message is sent to the external message queue" of the job?

Note that the output-queue can be specified as a variable which can
be assigned as blank for the default behavior, or changed to *SYSOPR or
*EXT, or changed to a 10-byte message queue name that should be in the
library list; though any value other than a special value or QSYSOPR
would increase the chances for error and thus a need to "handle DSPLY
exceptions (program status code 333), either the operation code extender
'E' ...". Changing each use of DSPLY in a program to name that variable
and assigning that variable once to define the behavior is probably the
clearest means to effect the desired.

http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c092508302.htm#ToC_811

Depending on how the run-time is coded to effect the send message
activity, there is possibly a way to get the message to go to a
different queue named QSYSOPR for the job, but only by opening a
potential for usage error; i.e. there is no support by the OS for an
alternate message queue named QSYSOPR, and any use of such would be
considered a usage error, esp. if for example there were any negative
side effects.

--
Regards, Chuck
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.