How to get IBM i command line during runtime using System Request 3

  • Home
  • /
  • Blog
  • /
  • How to get IBM i command line during runtime using System Request 3

July 21, 2017

How to get IBM i command line during runtime using System Request 3

By NickLitten

July 21, 2017

IBM i, cpf, CPX2313, QCPFMSG

System Request 3

Here’s a blast from the past:

I was just testing an IBM i program that is importing data from a Windows Server, converting the data, juggling it, tweaking it and when its finished playing it finally shoves it into an IBM i Database. Fun Fun FUN! But if its running interactive and I want to quickly get the command line… I’m stuck. The green screen is input inhibited.

Luckily, we can easily get command line access by tweaking the system request functions of IBM i.

HACKEAT EMPTOR – obviously only grant this command line access if your system i is properly secured. You dont want any old Tom, Dick or Harry getting to the command line to do you?

The system request functions do a bunch of neat things during any interactive session – SysRq/2 shows a DSPJOB command. Luckily its super easy to change the command associated with all the system request functions.

Right now, lets quickly tweak the sysrq/2 function.


How to get ibm i command line during runtime using system request 3 1

This will show you the current MSGID that controls what each of the SYSRQ functions do. it’s pretty obvious from looking at them:

Qcpfmsg with sysrq functions

then you simply click ‘2’ to change the message and tweak the second entry:

Qcpfmsg change to dspjob is now wrkjob

Now – SysRQ/2 will launch the WRKJOB command instead… and… command line AHOY!

note: Obviously, changing the system message file is not the preferred solution. Changing any system stuff is generally frowned upon by us Propellor heads for many reasons – not least of which is that you will have to do it all over again the first time you upgrade y our OS to a new version. So…. If you are going to do this properly then you should create your own message file, and OVRMSGF to your personal bespoke copy during signon. But, that is a more techie approach and if you don’t know what I’m talking about then you shouldn’t be making these kind of changes anyway 🙂

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips