Difference between revisions of "Category:Commands"

From MidrangeWiki
Jump to: navigation, search
(File Commands)
m (File Commands: Dump)
Line 81: Line 81:
 
** Like RUNQRY *N File-Name, this is a dump of the contents of the file.
 
** Like RUNQRY *N File-Name, this is a dump of the contents of the file.
 
** Unlike RUNQRY *N File-Name, this is a way to decipher the innards of packed fields.
 
** Unlike RUNQRY *N File-Name, this is a way to decipher the innards of packed fields.
 +
** If you do not specify member, it defaults to MBR(*FIRST) which is the first member created for this file, as opposed to *LAST the most recent, or use a specific member name.
 
* [[DSPLIB]]
 
* [[DSPLIB]]
 
** Use this to check on the existence of library contents
 
** Use this to check on the existence of library contents
 
* [[DSPFD]] then file name - physical or logical
 
* [[DSPFD]] then file name - physical or logical
** Use this to check on statistics about the file - # records, # members, # accesses, and so forth ... put "B" for Bottom on the control line if you want to go straight to the bottom line info
+
** Use this to check on statistics about the file - # records, # members and their names, # accesses of various kinds, amount of disk space, room for file growth, and so forth ... put "B" for Bottom on the control line if you want to go straight to the bottom line info
 
* [[DSPFFD]] then file name
 
* [[DSPFFD]] then file name
 
** Use this to check on file layout
 
** Use this to check on file layout

Revision as of 12:00, 11 June 2005

Commands available in OS/400 both come with the 400 and can be added by programmers.

Command Structure

IBM supplies over 1,500 commands native to OS/400 that are composed of 3 letter abbreviations (usually 3 letters) of a compound combination of Verb-Object-Modifier as shown by examples below.

  • DSPSFWRSC for example
    • DSP Display (verb)
    • SFW Software (object)
    • RSC Resources (modifier)
    • This refers to software from IBM that comes with OS/400

If you know part of the name of some command, you can use GO CMDxxx to get a menu of all commands which include xxx as part of the name.

  • GO CMDSCDE for Scheduler

Verb

This is not a complete list.

If you know part of a command name, but forget the whole thing, key first few letters then * asterisk wild card to get list of all commands with that prefix.

  • ADD to an object's contents
  • CHG Change
  • CLR Clear the contents of an object
  • CRT Create an object
  • DLT Delete an object
  • DSP Display
  • END
  • HLD Hold
  • RLS Release from Hold
  • STR Start
  • WRK Work with
    • Most WRK includes access to many other commands vs. same kind of objecrt, such as ADD CHG DEL

Object

After the verb comes what object type we going to do that verb to.

This is not a complete list.

  • DTAARA Data Area
  • F Files (see DB2 for structure info
    • PF Physical Files
    • LF Logical Files
    • DSPF Physical Files
  • JOBQ
  • LIB Library
  • OUTQ
  • PGM Programs
  • SPLF Spooled File
  • STS Status
  • SYSVAL System Value
  • USRPRF User Profile

Modifier

Some of the Object examples above are actually two parts

  • DSPMSG* shows that we have many commands with that prefix
    • DSPMSGF vs. Message Files (error messages and informational messages
    • DSPMSGQ vs. Message Queus
  • DSPSYSSTS is an extreme summary of WRKSYSSTS data,
    • where SYS (System) is the object and STS (Status)is the modifier
    • we also find STS in DSKSTS (Disk Status) and CFGSTS (Configuration Status)

Command Syntax

File Commands

Useful commands for navigating the layout of files, and the contents of files.

  • WRKOBJ Work with Objects
    • Use this with part of file or other object name, and wild card v.s. library list or *ALL libraries, to see where the file exists
  • RUNQRY *N File-Name
    • F4 with this and explore options like may select records, send output to screen or to report
    • Here we use Query using the External Definitions to display the contents of the file.
    • With the selection or records *YES we can explore some criteria then F12 back to the selection screen to alter our selection criteria.
    • See Query for more navigation tips.
  • DSPPFM then file name and member name
    • Like RUNQRY *N File-Name, this is a dump of the contents of the file.
    • Unlike RUNQRY *N File-Name, this is a way to decipher the innards of packed fields.
    • If you do not specify member, it defaults to MBR(*FIRST) which is the first member created for this file, as opposed to *LAST the most recent, or use a specific member name.
  • DSPLIB
    • Use this to check on the existence of library contents
  • DSPFD then file name - physical or logical
    • Use this to check on statistics about the file - # records, # members and their names, # accesses of various kinds, amount of disk space, room for file growth, and so forth ... put "B" for Bottom on the control line if you want to go straight to the bottom line info
  • DSPFFD then file name
    • Use this to check on file layout
  • DSPDBR then physical file name
    • Use this to identify all logicals that point at this physical file.
  • GO CMDF to check on other commands that have something to do with files
    • GO CMDPF physical files