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



Vern,

>Need some help, y'all. I've made a UIM menu that runs a number of
commands.
>When I select an option, I'd like to have the command in the job log and
>the command history, the same way that, say, the IBM menu CMDCMD does.
>
>Anyone know a way with standard UIM to get the command into the job log
>and/or the F9 history?

This sample CL program shows how to do this with command string up to 32
characters long. If you want to use longer commands you may have to convert
this to another language.

PGM        PARM(&COMMAND)
DCL        VAR(&COMMAND) TYPE(*CHAR) LEN(32)
DCL        VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(32)
DCL        VAR(&KEYVAR) TYPE(*CHAR) LEN(4)

SNDPGMMSG  MSG(&COMMAND) TOPGMQ(*EXT) MSGTYPE(*RQS) +
             KEYVAR(&KEYVAR)

RCVMSG     PGMQ(*EXT) MSGTYPE(*RQS) MSGKEY(&KEYVAR) +
             RMV(*NO) /* Cause request message to be +
             an old message so that it will not be +
             processed by QCMD when the user returns +
             there. This also allows the command to be +
             retrieved to a command line. */

CALL       PGM(QSYS/QCMDEXC) PARM(&COMMAND &CMDLEN)

ENDPGM

The way you use the program, CMDXXX, is to change the ACTION attribute on
the MI tags from something like this:
    ACTION='CMD WRKSPLF'
to this:
    ACTION='CMD CALL PGM(your-lib/CMDXXX) PARM(WRKSPLF)'


Ed Fishel,
edfishel@us.ibm.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.