Você está na página 1de 6

Useful AS400 Commands

WRKOUTQ
Can be used on its own to display every outq on the box and the
number they currently have in it.
Can also be used to display one outq by adding the outq name after
it i.e. WRKOUTQ HELP_DESK.
You can also view your own outq in JDE by tying in 43 and pressing
Enter.

DSPMSG
Can be used on its own to view any messages to your profile.
Can be used to view other people’s messages by adding details of
their user profiles after the command i.e. DSPMSG FSSECURITY.
It can also be used to see the messages sent to a session by adding
the session name after the command i.e. DSPMSG FSC005S1.
It can be prompted to alter where the message queue starts, either
at the top or bottom.
i.e. DSPMSG QSYSOPR Press F4 Press F10 and the following screen
appears:

The ‘Messages to display first’ defaults to *LAST, by changing this to


*FIRST and pressing enter the message queue QSYSOPR starts at
the top.

WRKACTJOB
This is very useful if you want to see all the jobs running on the
machine at any one time.

Document: Useful AS400 Commands.doc Page 1 of 6 Date26/11/18 Time 11/26/2018


Author:Kim Toon Revision:1 26/11/18
Created: 26/11/18 Last revised by: Kim Toon
If you have any problems with the clarity, understanding or general presentation of this document,
please contact either the author, the last revised by or the UK IT Help Desk with your comments either
by phone or in writing. A copy of the document with the suggested changes would be useful.
Can also be accessed through JDE by typing in 44 and pressing
Enter.

WRKJOBQ
Can be used on its own to display every jobq on the box and the
number of jobs currently waiting to be processed by it.
Can also be used to display one jobq by adding the jobq name after
it i.e. WRKJOBQ LGJOBQ.
42 in JDE displays the jobq that your profile is assigned to.

WRKUSRJOB
Using this command as it is just displays everything that you
currently have open under your user ID.
To display another person’s job you will have to add their user id to
the end of it i.e. WRKUSRJOB K_TOON.

MNTUSR
If a user rings up and says that they have forgotten their AS400
password; or they require a menu option adding; or they need to
move company/department then add their user id to the end of the
command i.e. mntusr k_toon and press enter.

WRKSPLF
This can be used if you want to find all the prints on the system
generated by a particular user. Just add their user name to the end
of the command.

WRKCFGSTS
If a user has problems getting on to their session the most common
cause is that they have varied off. To vary back on or to see what is
happening with their session use the following command:
WRKCFGSTS *DEV DPC013S1*

Communications lines can also be viewed in a similar way with the


following command:
WRKCFGSTS *LIN IBM*

WRKOBJLCK
You may get messages to QSYSOPR to say that a job can not run
because the file is already in use. To find out which people are
locking it you can use the above command and prompt it (F4). This
will bring up the following screen:

Document: Useful AS400 Commands.doc Page 2 of 6 Date26/11/18 Time 11/26/2018


Author:Kim Toon Revision:1 26/11/18
Created: 26/11/18 Last revised by: Kim Toon
If you have any problems with the clarity, understanding or general presentation of this document,
please contact either the author, the last revised by or the UK IT Help Desk with your comments either
by phone or in writing. A copy of the document with the suggested changes would be useful.
The object and library details can be found on the error from
QSYSOPR. Press Enter when they have been added and then F6 –
this will display the users who are locking it.

It can also be used to see who is locking QSYSOPR msgq.


For this use the command WRKOBJLCK and prompt it.
Type in QSYSOPR on the object line and *MSQG for the object type.
Leave the library as it is and press Enter.
It will then display who has it locked. Ask them to release it.

MENU
If you need to see what options a user has or if you need to get to
an option and do not want to add it to your menu you can use the
MENU command.
If you just use the command on its own then it will display your own
menu.
If you add an User ID after it, it will display that persons menu
i.e. menu k_toon.

CC
LINPAC Plastics is split into different companies on the AS400
depending on their location. This puts the users into different
libraries for different information.
Each library is given an ID, a location and a workstation ID.
To view the entire company list type in CC on a command line and
press Enter.
You will get a screen similar to this:

Document: Useful AS400 Commands.doc Page 3 of 6 Date26/11/18 Time 11/26/2018


Author:Kim Toon Revision:1 26/11/18
Created: 26/11/18 Last revised by: Kim Toon
If you have any problems with the clarity, understanding or general presentation of this document,
please contact either the author, the last revised by or the UK IT Help Desk with your comments either
by phone or in writing. A copy of the document with the suggested changes would be useful.
It is possible to do a cc and the company letters i.e. cc dp will reset
your library list back to the IT libraries.

Be aware that cc FS takes you into the WRONG company and cc LG


may not take you to the right part of Logistics.
It is vital to make sure that you are in the right company before
running any updates.

UPDDTA
NOT TO BE USED BY OUT OF HOURS STAFF UNLESS ADVISED.
Occasionally we may need to change part of a record in a file. By
using the UPDDTA command followed by the file name you will be
given a screen in which you can enter data to narrow down the
required record.

RUNQRY
NOT TO BE USED BY OUT OF HOURS STAFF UNLESS ADVISED.
LINPAC files are very large and can contain millions of records. We
regularly have to search files for data to help solve problems for
users. We do this by ‘query’.
RUNQRY displays records that meet a certain criteria on screen. We
use the following command:
RUNQRY *N LIBRARY/FILE RCDSLT(*YES)

Document: Useful AS400 Commands.doc Page 4 of 6 Date26/11/18 Time 11/26/2018


Author:Kim Toon Revision:1 26/11/18
Created: 26/11/18 Last revised by: Kim Toon
If you have any problems with the clarity, understanding or general presentation of this document,
please contact either the author, the last revised by or the UK IT Help Desk with your comments either
by phone or in writing. A copy of the document with the suggested changes would be useful.
WRKQRY
NOT TO BE USED BY OUT OF HOURS STAFF UNLESS ADVISED.
This is similar to RUNQRY but enables us to produce a report of the
chosen records that can be printed or sent to a file.
We can keep WRKQRYs in our libraries to use again.

CRTOUTQ
NOT TO BE USED BY OUT OF HOURS STAFF UNLESS ADVISED.
Users can either have their profile set up so that their prints default
to either a printer or their own outq.
We can create the outq using this command. This is explained more
in the document GBRFS04 \ IT \ HELPDESK \ GENERAL AS400 \ How
to create an AS400 user profile.doc.

DSPDTAARA
This command helps us to see what is in data areas that programs
use. The most common use will be to check what time a transaction
last passed to FLARE.
Use this command UPDDTA FLARE/FLARE.

STRPRTWTR
Users have options on their menus to start the printers that they
use. We can start them from a command line using this command
followed by the printer name:
STRPRTWTR FSP001
After Enter has been pressed the printer should start.
This only works for ‘fixed’ printers not the Client Access Printers i.e.
DPC013P1.

ENDWTR
Users also have options on their menus to end the printer writers
that they use. Again we can do this from a command line.
There are two ways to end it either *IMMED to end immediately or
*CNTRLD for controlled end i.e. stop when it has finished printing
the document the current document.
Type in on a command line ENDWTR <PRINTERNAME>, prompt it
(F4) and change the *CNTRLD to *IMMED and press Enter.

EDTLIBL
NOT TO BE USED BY OUT OF HOURS STAFF UNLESS ADVISED.
We may have to rearrange our library lists depending on the work
we are doing. If, for instance, we are wanting to look at the archived
JDE data we would need to put the library LGJFDTH at the top of our
library list. We do this by typing on the command line EDTLIBL and
press Enter. This brings up a screen with our current library list:

Document: Useful AS400 Commands.doc Page 5 of 6 Date26/11/18 Time 11/26/2018


Author:Kim Toon Revision:1 26/11/18
Created: 26/11/18 Last revised by: Kim Toon
If you have any problems with the clarity, understanding or general presentation of this document,
please contact either the author, the last revised by or the UK IT Help Desk with your comments either
by phone or in writing. A copy of the document with the suggested changes would be useful.
We would then add library LGJFDTH to the empty line at the side of
position 0 and press Enter.
For other occasions we may add different libraries to the BOTTOM of
our list – it depends on the work we are doing.
To remove the library after we have finished using it we would enter
the command again and press Enter and the blank out the library
before pressing Enter again.

Retrieving Commands
If you have already typed in a command on a session there is no
need to type it in again. F9 will take you through all the commands
that have been used on the current session since you signed on.
Keep pressing F9 until you get to the command that you want and
then press Enter to execute the command.

Document: Useful AS400 Commands.doc Page 6 of 6 Date26/11/18 Time 11/26/2018


Author:Kim Toon Revision:1 26/11/18
Created: 26/11/18 Last revised by: Kim Toon
If you have any problems with the clarity, understanding or general presentation of this document,
please contact either the author, the last revised by or the UK IT Help Desk with your comments either
by phone or in writing. A copy of the document with the suggested changes would be useful.