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

Command line on demand

If you ever needed a command line where it was not accessible (for example, after a long-running query displays your output, while viewing your spooled report, during a test of your new display files, or for just looking at your joblog), then use Command Line On Demand.

This can be done in two ways:

1.SETATNPGM QCMD -- Please note that this goes away after your job ends.

2.CHGUSRPRF yourprofile ATNPGM(QCMD) -- This change is permanent. Every time you need the command line, press your attention key and behold -- the Command Entry line. Want to view your joblog? Press F10!



Feedback from search400 members

From Denny Ray:
Rey's solution is a one-time event. How about an attention program? MyAtnPgm. Pgm SetAtnPgn MyAtnPgm Call QusCmdLn EndPgm

This recursive little piece of nonsense has been working fine for me for over a decade. It's simple enough to key in for contractors.

From Randy Adamski:
Using QCMD, you will get the Command Entry screen, not the Command Line Window. To get to the Command Line Window use QUSCMDLN instead.

From Kim Hunter:
Wonderful stuff! Keep 'em coming!

From Michael Fiorillo:
This was a really helpful tip!

From Lee Roberts:
Thanks for the command line tip. That will come in handy. Another command line tip: While in SEU, you can press command key 21 to get a command line. I use this frequently.

From Paul DeBrino:
To access a command-line in a small window, call system-supplied program "QUSCMDLN" in lieu of "QCMD".

From Sue Schlake:
I really appreciate the tips I have received from SEARCH400. Rey Ribo's tip for the Command Line is being used by our company. Thanks so much Rey!

From Sharon Young:
That is a serious security "gotta you." I would never give this to users other than to the few approved who already have command line.

From Sandy Beich:
Great tip!

Dig Deeper on RPG iSeries programming