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

Use CRTDUPOBJ to create a copy of the RUNQRY command

Here you'll learn how to use CRTDUPOBJ to create a copy of the RUNQRY command.

Do you often use the RUNQRY command to look at data in a file? Do you often have to use record selection when doing so?

If so, use CRTDUPOBJ to create a copy of the RUNQRY command. RQ would be a good choice for the new command copy. It is not recommended that the copy be created in QSYS; QGPL would be a better choice. I like placing custom commands in my personal library.

After you create your copy of the command, then change the command so that it defaults to record selection.

Now, to view a file MYFILE with record selection, you may type RQ *N MYFILE and you will immediately have your record selection screen.

To create the command copy: CRTDUPOBJ OBJ(RUNQRY) FROMLIB(QSYS) OBJTYPE(*CMD) TOLIB(MYLIB) NEWOBJ(RQ)

To change the default: CHGCMDDFT MYLIB/RQ NEWDFT('RCDSLT(*YES)')


Dig Deeper on iSeries CL programming

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close