|
Hello. Here enclosed yu may find a simple CLP that will return the name of the
program.
Simply call it and, upon return, the variabile &PGMNAME will contain the name
of the caller.
Sincerely
/* --------------------------------------------------------------- */
/* Per sapere il nome del programma corrente
*/
/* Dal programma chiamante eseguire CALL UChiSono (&NomePgm) */
/* &NomePgm contiene il nome del chiamante */
/* 10/11/2000 df
*/
/* --------------------------------------------------------------- */
PGM PARM(&PGMNAME)
DCL VAR(&PGMNAME) TYPE(*CHAR) LEN(10)
DCL VAR(&SENDER) TYPE(*CHAR) LEN(720)
DCL VAR(&PGMNMEOFST) TYPE(*DEC) LEN(3 0) VALUE(355)
DCL VAR(&PGMNMELEN) TYPE(*DEC) LEN(3 0) VALUE(10)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) TOPGMQ(*PRV)
RCVMSG PGMQ(*PRV) MSGTYPE(*NEXT) MSGKEY(*TOP) +
RMV(*YES) SENDER(&SENDER) SENDERFMT(*LONG)
CHGVAR VAR(&PGMNAME) VALUE(%SST(&SENDER &PGMNMEOFST +
&PGMNMELEN))
RETURN
ENDPGM
Domenico Finucci
Fiditalia , Milano, 02- 4301-2494
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.