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



If I understand correctly what you are aiming for, the simplest thing to do would be for the CL to check if it is running in batch or interactive and react accordingly.

RTVJOBA TYPE(&BATCH)

IF COND(&BATCH *ER '1') THEN(DO)
/* action in batch mode */
ENDDO

You also could pass this value to the RPG program and use it to condition the DSPLY


Denis Robitaille
Chef de service TI - Solution d'entreprise
Infrastructure et opérations

CASCADES CENTRE DES TECHNOLOGIES
412 Marie Victorin
Kingsey falls(Québec) Canada J0A 1B0
Tél : 819 363 6100 Poste :52130
Cell : 819 352 9362



-----Message d'origine-----
De : MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de James H. H. Lampert
Envoyé : 15 mars 2017 13:32
À : Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Objet : Multi program application -- single output target?

I've got an application that consists of a CL program that calls nine different RPG programs, one of them anywhere from zero to 55 times, the others once each.

Currently, I've got the RPG programs just doing DSPLY statements when they have something to tell the user. But I'd like to be able to run this thing in batch, without sending all of that to the QSYSOPR message queue.

I *could* do output to a spool file, or I *could* send it to STDOUT, using C runtime calls. I've done both before. But I can't recall doing it with a bunch of RPG programs.

What I don't want is to have it open a new spool file with each new RPG program invocation (for the spool file option) or ask the user to hit a key, if running in a terminal session (for the STDOUT option).

Advice?

--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD

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.