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

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.

WRKMSGD MSGID(CPX2313) MSGF(QCPFMSG)

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 🙂

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits.

Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day.

Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

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

Subscribe NOW
7-day free trial

Take This Course with ALL ACCESS

Unlock your Learning Potential with instant access to every course and all new courses as they are released.
 [ For Serious Software Developers only ]

Online Learning for IBM i Software Technology Professionals

“The more that you read, the more things you will know. The more that you learn, the more places you’ll go.” – Dr. Seuss

>