Problem solve Get help with specific problems with your technologies, process and projects.

Get more with system request

This trick allows you to run your special programs while in session with your job.

You Can View User Feedback To This Tip

This trick allows you to run your special programs while in session with your job. Create SYSREQ3 *CMD and *PGM objects. Change message ID CPX2313 of QCPFMSG as follows:

 ENDRQS     SYSREQ3    DSPMSG ....
Type SYSREQ3 over the DSPJOB command. 

Then press the system request key, type 3x where "x" is your parameter used in program.

Be aware of the possibility to call your own programs recursively.

  Command SYSREQ3:
CMD        PROMPT('SysReq 3 Extended functions')

PARM       KWD(CODE) TYPE(*CHAR) LEN(1)+
PROMPT('Action code')

CL program SYSREQ3:
START:      PGM        PARM(&CODE)
DCL    VAR(&CODE) TYPE(*CHAR) LEN(1) 
MONMSG     MSGID(CPF0000 MCH0000 RPG0000 CEE0000) +
  EXEC(GOTO CMDLBL(END))                

/* examples */

IF         COND(&CODE *EQ 'M') THEN(DO)
GO         MENU(YOURMENU)              
GOTO       CMDLBL(END)                 
ENDDO                                  

IF         COND(&CODE *EQ 'J') THEN(DO)
WRKJOB OPTION(*SPLF)
GOTO       CMDLBL(END)                 
ENDDO                                  

IF         COND(&CODE *EQ 'L') THEN(DO)
CALL       PGM(LOCKWRKSTN)             
GOTO       CMDLBL(END)                 
ENDDO                                  
.....


/* you can add any logic - check user class and decide what to do */

/* blanks or wrong parameter */
DSPJOB

END:        RETURN
            ENDPGM  

USER FEEDBACK TO THIS TIP

  • It is easier to change in the messagefile for message CPX2313 DSPJOB to WRKJOB. Then you will have ALL possiblilities. & ; Flemming Kjoelhede

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400 Featured Topic: Managing your iSeries.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.


Dig Deeper on Performance

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close