×
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.
Detlef,
SNDSTSMSG is a home grown command that does a SNDPGMMSG. It just makes
it easier if the CL program leaves the OS/400 world. I can create a
SNDSTSMSG in REXX or any other language I want to accomplish the same
goal. (like the CL would actually migrate somewhere else)
Yes, the FWDPGMMSG had no parameters. It determines the caller and
pushes the messages up the stack.
Personally, any time I find myself cloning too much code I like to see
if I can reduce it to a single call or command.
I also do the same thing in RPG through /COPY members that are
subroutines. In the mainline code you will not find a CHAIN or READ
opcode. They are in a subroutine in the /COPY. Once SQL can perform
record level gets at the same performance level as a CHAIN I can replace
the contents of the /COPY without changing a single line of mainline
program code.
Or I can decide that all gets should be handled by a service program and
again I just change the contents of the /COPY subroutine from having a
CHAIN to having a CALLP.
Here is the CL for SNDSTSMSG. The command has a single 70 character
parameter for whatever text you want to show on the status line.
/* ------------------------------------------------------------------*/
/* SNDSTSMSG Send a status message to the screen */
/* ------------------------------------------------------------------*/
SNDSTSMSG: PGM PARM(&MSGDTA)
DCL &MSGDTA *CHAR 70 /* Status message text */
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGDTA) +
TOPGMQ(*EXT) MSGTYPE(*STATUS)
MONMSG MSGID(CPF0000)
ENDPGM /* End of program specifications */
/* ------------------------------------------------------------------*/
Detlef Fallisch wrote:
James,
that is a good example what I am looking for. I like the idea to code the
sending of messages into another program so that you can really reuse the code.
Two questions remain:
1. Is the command SNDSTSMSG really an OS/400 command?
2. If you CALL program FWDPGMMSG are there no parameter passed to the programm?
or is this because both programs run in the same stack that you can read the
messages of the calling program?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.