I’m putting together some education materials for new z/OS users, and would like a list of common or favourite commands (the commands your fingers know without having to think about them). If you have any more useful commands, please tell me and I’ll add them.
If there is enough interest I can make the commands into html links to the online manuals – if so please let me know.
Managing the 3270 console
- k a,ref shows areas on operator console
- k a,none – removes “out of line area” from console. You may need to do k e,d to remove the area first
- k a,14 makes the area 14 lines deep
- k a,6,6 makes two areas A and B, can then use D A,L,L=B for to display the command D A,L in window B
Some commands, eg display commands comes up in a “out of line” frame at bottom of the screen
- k d,f scroll forward, sometimes pf8 does this. Check with d pfk
- k e,d remove the bottom “out of line display” area
- k q clear the backlog of queues messages
- k e clear the scrolling messages
- k s,ref display the current settings
- k s,del=rd have message scroll off the top automatically
- k s,del=n stop messages scrolling off the top
- k e,n remove nth message from the top of the screen – useful of the messages do not scroll.
- d pfk
- k n,PFk=(001,CMD=’d a,l;d ts,l’) sets the pf key to the command strings separated by ;
- PA1 retrieve previous command
If you lose the console
Useful MVS commands
- d r,l What replies are outstanding – first point of call when things are “hanging”
- d a,l display what jobs are active
- d a,l,userid=PAICE display what jobs are active for the given userid
- d u,dasd,online display online disks
- d u,,,a80,16 display from a80 for 16
- d u,vol=a3res1 display the unit with this volume
- d ts,l what TSO users are active
- d omvs is OMVS active
- d omvs,f display mounted file systems
- d omvs,options
- d xcf,str lists the structures
- d xcf,strname=xxxx displays info about an individual structure
- d iplinfo gives IPL time as well as parameters used during IPL
- d ssi displays the configured subsystems
- cancel job
- cancel u=paice cancel the TSO userid
- s proc You start many “system” jobs via a proclib member
- p proc Stop a “system” job – if they are set up to listen to the stop command
- p jobname.id,A=1234 for example when S CICS.CICS1, and S CICS,CICS2 was issued
- d grs,res=(*) what resources you can display on
- d grs,res=(SYSDSN) for finding out enqueues etc on resources
- d grs,c to list resources with contentions
- d grs,e,c list the resource every one is waiting on
- setprog apf,add,dsn=csq.scsqauth,volume=myres1 make a library APF authorised. Used when defining subsystems.
Subsystem eg DB2, MQ
- setssi add,s=csq9,i=csq3ini,initparm=’CSQ3EPX,%CSQ9,M’
- %csq9 start qmgr %csq9 matches from previous line
- setssi add,s=dbcg,i=dsn3ini,initparm=’csqnEPX,-DBCG,M’
- -dbcg start db2
- d ssi look for your subsystem
- d ssi,sub=csq9 display the subsystem of interest
- d TCPIP what TCP stacks are available. It may give 1 TCPIP99 CS V2R3 ACTIVE,2 TCPIP CS V2R3 ACTIVE
- d TCPIP,TCPIP99,NETSTAT,CONN if more than one TCPIP, specify which one ( eg TCPIP 99)
- d TCPIP,,NETSTAT,CONN if only one TCP address space
- d tcpip,tcpip,netstat,HOME display the IP addresses used by this TCP stack
The command prefix is £ or $ depending on your system and keyboard
- $djes2 display the current activity in the JES2 address space, Outstanding I/O, Active address spaces, Active networking devices
- $di display initiators
- $Pi2-3 stop initiators 2 to 3
- $si2-3 start initiators 2 to 3
- $add prt1,unit=000e
- $sprt1 may have to issue command twice – once after it prompts about set up
- $pprt1 stop the printer
- $DU,STA what units (printers etc) are started
- $pjes2 stop jes after every thing is quiesced
- $T JOBCLASS(STC),OUTDISP=(,) where is the output of my STC going?
Commands useful when the spool has filled up
- $DSPOOL how full is the spool
- $D JOBDEF display the number of JOES ( Job Output elements = numbers of files) JOENUM can be increased dynamically using $T OUTDEF,JOENUM=xxxx. Don’t forget to change it in SYS1.PARMLIB(JESPRMxx) in order to make the change permanent.
- $DJQ,SPL=(%>1) which jobs are using more than 1% of the spool
- $DS,SPL=(%>1) which STCs are using more than 1% of the spool
- $dt,spl=(%>1) which TSO are using more than 1% of the spool
- $DJQ,DAYS>2 which jobs are more than 2 days old
- $DO JQ,JM=CCP* display all output for jobs beginning with CCP also $DO S and $do S
- $PO JQ,JM=CCP* Purge all output for jobs beginning with CCP also $PO S and $po S
- $DO JQ,AGE>4 Which output data sets are more than 4 days old
- $PO JQ,AGE>4 Purge output data sets are more than 4 days old also $PO S and $po S
- $do jq,jm=cp7*,a>7 Which output data sets belong to cp7* and are a week old also $DO S and $do S
- $po jq,jm=im7*,a>7 Purge output data sets belong to im7* and are a week old also $PO S and $po S
- D OMVS,PFS display the file systems OMVS knows about.
- f ZFS,QUERY,STATUS all releases – if they are not running under uss. See here.
- f omvs,pfs=zfs,query,status 2.2 or later if you are running ZFS in USS. See here.
- f zfs,fsinfo,all display detailed information about zFS file systems = aggregates
- f omvs,pfs=zfs,query,… eg all,dataset,iobydasd,vm. Displays stats about the ZFS
- zfsadm configquery display the values so you can change them with…
- zfsadm config…. Change the ZFS configuration
- ddlist or isrddn what are my TSO allocations – useful for looking for ISPPLIB concatentation etc
- Line commands
- B Browse the first sixteen data sets or a single data set.
- E Edit the first sixteen data sets or
- a single data set.
- V View the first sixteen data sets or a single data set.
- M Show an enhanced member list for the first sixteen data sets or a single data set.
- F Free the entire DDNAME.
- C Compress a PDS using the existing allocation.
- I Provide additional data set information.
- Q Display list of users or jobs using a data set.
- Primary commands
- Apf Browse Con CList COUnt CUstom
- DUPlicates Enq EXclude Find Locate LOAD
- LONg LPa Member MList Only Parmlib
- Reset Select SHort
- Member name (ddstring) Scan allocations for a particular member.
- Select modname Search for a loaded module without searching any allocated data sets.
- CUstom Show the values in ISPTCM and some ISPF configurations.
- Line commands
- mount filesystem(‘PAICE.ABC.ZFS’) mountpoint(‘/u/paice/abc’) type(ZFS) mode(read)
- unmount filesystem(”PAICE.ABC.ZFS’) normal
- rlist mqcmds MQPA.* AUTHUSER
- permit IRR.DIGTCERT.** class(facility) access(read) id(systask)
- SETR RACLIST(facility)REFRESH SETRacf options also SETROPTS RACLIST(STARTED) REFRESH
- RDEF MQQUEUE MQ*.* OWNER(SCENU) UACC(ALTER)
- PERMIT MQ*.* CLASS(MQQUEUE) ACCESS(ALTER)ID(USER1)
- permit ‘paice.**’ access(read) id(colin)
- ALU PAICE RESUME PASSWORD(NEW42DAY) reset the password and resume it (ALterUser)
- SEARCH CLASS(USER) mask(IBM) Display all userids beginning with IBM
- SEARCH CLASS(DATASET) NOMASK Display >all< datasets. The default is MASK(*) for your userid.
- #SET TRACE(CALLABLE(ALL|TYPE()|NOCALLABLE) Turn on RACF trace to GTF
- #SET TRACE(CALLABLE(TYPE(40)),JOBNAME(CSQ9WEB)) for SAF keyring problems.
- OWNER myuserid to see jobs that I own, regardless of prefix.
- “I use ST command almost exclusively in stead of DA, O etc..”
- SYSNAME allows you to see jobs on another connected system
- PREFIX abc displays jobs beginning with abc
- filter ? allows you to select on multiple criteria owner eq paice, jobname eq MQ*
- Sort … sort on column of data sort cpu%
- ARRange CPU% A REAL arranges the columns so the CPU% column is displayed after the REAL column
- Prefix commands
- log s display the system message log for your MVS system.
- log o displays the merged, sysplex-wide system message log
- ulog displays the output from commands you have issued
MQ using CSQUTIL or equivilant command
- alter qmgr chlauth(disabled) connauth(‘ ‘) turn off mq chinit connection security checking
- refresh security(*) type(connauth) and tell MQ to pick up the changes
- SETSMF INTVAL(01) change how often SMF drives the end of interval
- SETSMF MAXDORM(0010) how long SMF keeps data in its buffer before write it out
SMS – ISMF
- Display all options on the ISMF panel 0 ISMF Profile.0 User Mode Selection set to 2 For a Storage Administrator (SA)
- To tailor columns displayed, used view command, specify columns and save it
- Display disks and information about disks 2 Volume.1 Dasd ,
- Acquire Physical Data Y,
- Storage Group Name ” “
- CDS Name ” “
- Press enter
- Display storage group name , 6 Storage Group, 1. List
- and disks in the storage group 1. List, then line operator listvol
TASID is a “monitor” tool developed internally within IBM to monitor activity on a z/OS system. It is displayed in ISPF on TSO. It displays IPL info, storage usage, address space usage etc. Think of unix “top” function.
Note that some options may not operate correctly on all z/OS systems. Download it from IBM here.
USS Unix services
- ls -T file display file tag, ASCII, EBCDIC etc ISO8859-1 is ASCII
- chtag -p display/change file tag info
- chtag -t -c ISO8859-1 filename change the filename to be oeditable
- whence name like which name, tells you where a command came from eg whence oedit is /bin/oedit
- tar like zip
- cp copy files
- mkdir -p and the intermediate directories
- pax another way of packing files to make them portable. It keeps meta data.
- TSO OMVS command for example the ESCape NOPFSHOW
- du -ska . display summary of the size of each file below ‘.’ directory in 1KB blocks
- du -ka . display the size of each file below ‘.’ directory in 1KB blocks.
- du -ka /u/paice gives the space on the directory
- du -ka /u/paice/* gives the space on the files within the directory
- du -ka . | sort display the size of each file below ‘.’ directory in 1KB blocks sorted in ascending size.
- cksum file gives a checksum of a file, and number of bytes in the file. There is the same command on Linux. See here for commands on other platforms.