AS/400 Command Line Commands
From Support
Caution
This article is designed to help people learn some basic commands on the IBM iSeries. Please note that not every user has the security to run all of the commands listed below. Please make sure that you have permission to make any changes to your system before doing so. RJS Software Systems does not accept any responsibilty for lost information or data due to using any of our Knowledge Base Articles.
Things To Know
- Help
Pressing <F1> while the cursor is on a message, command or a value will often bring up a help screen to give you information on that message, command or value.
- PROMPT
Pressing <F4> after typing in a command will allow you to prompt that command to see what values can be passed to it. It will display all available parameters and acceptable values for those parameters.
- SECURITY
As stated above: Please note that not every user has the security to run all of the commands listed below. Please make sure that you have permission to make any changes to your system before doing so. RJS Software Systems does not accept any responsibilty for lost information or data due to using any of our Knowledge Base Articles.
Command Line Length
Many commands are actually longer than the one or two lines typically given in the Command Line Interface.
- To display a larger command line:
CALL QCMD
- To display a full page command line:
CALL QCMD <F11>
Displaying various system values:
- If you own any RJS Software Systems product that has a library on the iSeries, you can simply run the following command to display the OS/400 operating system version, serial number, model number and partiion (LPAR) number where the product is installed:
<LIBRARY NAME>/PRDINFO
- Serial number:
DSPSYSVAL QSRLNBR
- Model number:
DSPSYSVAL QMODEL
- System name:
DSPNETA (press enter) Local system
- OS/400 version:
GO LICPGM (press enter), option 10, press F11
- AS/400 TCP/IP address:
NETSTAT (press enter); option 1
- To find system values (the long way):
WRKSYSVAL identify value you are searching for, enter 5<ENTER> value is displayed Value for the serial number is QSRLNBR
To Display System Operator Messages
DSPMSG<F4> QSYSOPR<ENTER>
Messages are displayed
To Display Session Job Log
DSPJOBLOG
When Job Log appears, press <F10> to see a detailed log and page up from the bottom to see the most current activity.
Library and Library List Commands:
- To display your current library list:
DSPLIBL
- To add a library to your library list
ADDLIBLE followed by library name
- To remove a library from your library list
RMVLIBLE followed by library name
- To see if a library is present, enter
WRKLIB <library name> <ENTER>
- To find the current version of a RJS Software Systems product library:
DSPDTAARA <F4> Data area name: VERSION Library: <LIBRARY NAME>
- To display all the objects within a library:
WRKOBJPDM <LIBRARY NAME>
Output Queue and Report Commands
- To display all output queues:
WRKOUTQ *ALL
NOTE: Helpful in checking for output queue existance
- To display a specific output queue:
WRKOUTQ <OUTPUT QUEUE NAME>
NOTE: You can see several queues with similar names by using the "*" wildcard NOTE: If you have the same output queue in multiple libraries, you may need to specify the library as well.
- To create an output queue
CRTOUTQ <LIBRARY NAME>/<OUTPUT QUEUE NAME>
NOTE: If you do not specify a library when you create the output queue, it should create it in teh QGPL library by default.
- To clear an output queue (deletes all spool files in the output queue):
CLROUTQ <LIBRARY NAME>/<OUTPUT QUEUE NAME>
NOTE: If you do not specify a library name, it will clear the first output queue with the matching name that it finds while searching your library list.
- To delete an output queue:
DLTOUTQ <LIBRARY NAME>/<OUTPUT QUEUE NAME>
NOTE: If you do not specify a library name, it will delete the first output queue with the matching name that it finds while searching your library list.
- To look at reports by owner
WRKSPLF<F4>
enter 5 by the appropriate user<ENTER>, then you can find output queue
Viewing Directories and Files on the IFS (Integrated File System)
File structure on the IFS is similar to the UNIX file system (even the commands match). All directory or file paths start with a basic / to indicate the root of the system. The rest follows basic directory structures.
- To access the root directory on the IFS:
WRKLNK "/" put a 5 on the folder to view its contents
- To access a directory called RJSTEMP in the root of the IFS:
WRKLNK "/RJSTEMP" put a 5 on the folder to view its contents
Checking a User Profile
- To look at all the user profiles:
WRKUSRPRF *ALL
- To look at a specific user profile:
WRKUSRPRF <ISERIES USER NAME>
- User settings of importance (primarily for the WinSpool products):
check STATUS (should be ENABLED) check SET PASSWORD TO EXPIRE (should be NO) check LIMIT CAPABILITIES (if *YES, we have a Notes technical document that tell them the commands they must have -- do a search on limited* to access it) check user class (*SECOFR indicates security officer level)
FTP Server Commands:
- To check on FTP server status:
NETSTAT (press enter), option 3 if FTP server is running, you will see FTP-CON as an entry in Local Port and it will have a state of LISTEN
- To start the FTP server:
STRTCPSVR *FTP
- To end the FTP server:
ENDTCPSVR *FTP
- To change FTP timeout:
CHGFTPA <F4>
NOTE: Inactivity timeout is 300 seconds (5 minutes) by default. Setting it to 0 indicates no timeout! After changing the FTP attributes, you must stop FTP server and restart
- To verify that you can log on to your AS/400 FTP Server from DOS, perform the following:
- Go to DOS prompt
- Type FTP <IP Address> and press ENTER
- You should then be asked for a user ID and password. If this fails or doesn't happen, there is a problem connecting to your AS/400 FTP server and our software will not work until this is resolved.
Categories: OS/400 | TBPR | Knowledge Base | How To
