Use SysReq to get WRKJOB

0 pts.
Tags:
Application development
AS/400
CLP
I use to create a library - MYQSYS and load it with CRTDUPOBJ OBJ(WRKJOB) FROMLIB(QSYS) OBJTYPE(*CMD) TOLIB(MYQSYS) NEWOBJ(DSPJOB). I was then able to use the cmd CHGSYSLIBL LIB(MYQSYS)To put this library ahead of QSYS and when I used SYSREQ option 3 I got a WRKJOB instead of DSPJOB (and a cmd line). In my current system (V5R3M0 L00) when I hit SYSREQ instead of just DSPJOB the system generates *SYSTEM/DSPJOB and goes to qsys/Dspjob (without a cmd line). Is ther any way to get around this? (I know about changing the QCPFMSGF CPX2313; I don't want to do that.) Thanks for any help.
ASKED: September 1, 2006  11:00 AM
UPDATED: December 15, 2009  8:58 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi

I’m afraid that the only way to do it is to change message CPX2313 to use WRKJOB.

Can I ask why you don’t want to go down that route? Accepted it’s a global change, but as long as the users in your shop are set with limited capabilities you shouldn’t find that there’s any security risk.

If that’s still a worry, an alternative to changing it to WRKJOB would be to create your own command (e.g. MYWKJB) and in the CPP for it do something like:

PGM

DCL &USER *CHAR 10

RTVJOBA USER(&USER)
IF COND(&USER *EQ ‘myprofile’) THEN(DO)
WRKJOB
ENDDO

ELSE CMD(DO)
DSPJOB
ENDDO

ENDPGM

Where you can test for specific user ID’s to have the WRKJOB capability whilst the other users still get DSPJOB. Of course this still means that you have to change CXP2313, but limits the effects to particular users.

Hope it helps

Jonathan

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • WaltZ400
    The following is an excerpt from the V5R3 memo to users regarding user defined copies of system commands. "Programs that use customized versions of IBM-supplied commands" "Some operating system functions that use IBM-supplied CL commands that are not library-qualified in this release may be changed in a future release to specify a specific library of *NLVLIBL or *SYSTEM for the library qualifier. Applications that depend on using their own version of commands instead of the IBM-supplied commands might not work as they had on earlier releases. These applications should be changed to use the retrieve command exit point (QIBM_QCA_RTV_COMMAND) or the change command exit point (QIBM_QCA_CHG_COMMAND) that allows your exit program to get control and possibly change the command that is used." I assume this is what is happening in your case. The system is ignoring your version of DSPJOB and defaulting to the system version.
    655 pointsBadges:
    report
  • Jadima
    There is another way to use WRKJOB instead of DSPJOB using the *SYSRQS. Use the QIBM_QWT_SYSREQPGMS exit point to enter a program of your choise. The params requested are PGM PARM(&SRDSPFLAG &SRUSRDTA) Declare CL variables DCL VAR(&SRDSPFLAG) TYPE(*CHAR) LEN(4) DCL VAR(&SRUSRDTA) TYPE(*CHAR) LEN(128) Information about creation exit point programs can be found in the http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?lang=en select : Exit point Name : QIBM_QWT_SYSREQPGMS Exit point Format : SREQ0100 To activate the program for only a selected group of users, you have to use the QWTSETPX API per user. I use it for a lot of things and it is very usefull. Hope this is of any help for you. Good luck.
    0 pointsBadges:
    report
  • StanZG
    Thanks for all your help. It looks like I have come up with a solution. I do not like the idea of changing CPX2313 for 2 reasons: 1) It is global and this is not something I want everyone to have. and 2) I don't like messing with IBM's QSys objects-You sneeze at the wrong time and you might have to reload the operating sysem. But here is what I did. In that new local system library I created I used CRTDUPOBJ to duplicate CPFMSGF and in this copy of the messagefile I changed msg CPX2313. When I put this into my system library list I got my command line.
    0 pointsBadges:
    report
  • astradyne
    You don't need to duplicate the whole of QCPFMSG and you don't need to put the library into the system library list for your job. What you can do is create a message file in your own library and duplicate the CPX2313 message ID which you then modify. In the initial sign-on program for your user profile, you simply add the line: OVRMSGF MSGF(QCPFMSG) TOMSGF(mylib/mymsgf) When the system attempts to send a message from the QCPFMSG message file it will check the overriding file first and if it doesn't find the message it reverts back to the original QCPFMSG. That way you only need your version of CPX2313 with the WRKJOB in it. All the best Jonathan
    370 pointsBadges:
    report
  • Yorkshireman
    Or just create a proxy command
    5,520 pointsBadges:
    report
  • TomLiotta
    Or just use QSYS/QUSCMDLN as your Attention program and skip all the messing with stuff. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following