MVS and Related Tips
-=> By Dave Bechtel <=-


This HTML document is released under the Gnu Public License (GPL);
Check The GNU site for details.

Additional license info:

The GNU Copyleft
Zoom to the bottom to see the GNU Public License for "MVS and VM Tips."

To contact me with questions, updates, etc: EMail me
I am actively soliciting interesting and useful command line examples.
Please include a detailed explanation of what your command does when you submit it. :)

This page is mirrored at:
Xoom
Linux Start


/*================================================
= Sections:
=

=
================================================*/



/*= Conventions used in this document: =*\

\*========================================*/



=Console (MVS) commands

' -<DB2region> DIS THREAD(*) ' == Show active threads in DB2 region

' C U=@99999 ' == Abort TSO userid

' CF CPU(2),OFFLINE ' == Config CPU 2 offline to system

' CONFIG CHP(nn),OFFLINE ' == Set a channel path offline
' CONFIG CHP(nn),ONLINE '

' C <jobname> ' == Cancel job using MVS
' C <jobname>,DUMP ' == Cancel job with dump
' C SYNRECAL,A=0052 ' == Cancel specific job's address space if more than one is running

' D A,L ' == Display all executing jobs, tasks and TSO sessions
' D C ' == Display Consoles
' D C,B ' == Display console buffer usage
' D C,U=8C6 ' == Display console settings for hardwired address
' D C,CN=<consolename> ' == Display console by name

' D C,K,L=A ' == Display all K-commands and what they do, in A-window
' D D [,<Title>] == Display dump datasets, Title optional

' D GRS,C ' == Display sysplex contention info
' D GRS,RES=(*,<datasetname>) ' == Display what job(s) or user(s) are holding a dataset
' D GRS,DEV=281 ' == Display what is causing START PENDINGs on a device

' D IPLINFO ' == Display date/time of last IPL and DASD unit used
' D J,<ISP*> ' == Display all running ISP* jobs
' D J,L ' == Display executing jobs and tasks, without TSO ids
' D J,V1742V6 ' == Display job details - performance group, etc. (PGN=performance group, N/A if system is in Goal Mode.)

' D M=CHP(5) ' == Display Matrix of channel path 5 by device
' D M=DEV(821) ' == Display Matrix of Device 821 and chpids
+ If you get 821,INOPERATIVE PATH, do this: 1) ' D M=DEV(821) ', then 2) ' V PATH(821,xx),ONLINE '
' D M=DEV(400-41F) ' == Display matrix information for a range of devices
' D M=CPU ' == Display matrix of CPUs installed

' D OPDATA ' == Display all command prefixes
' D R,L ' == Display pending replies - ' D R,R ' is slightly shorter

' DEVSERV P,481,1 ' == Show online/offline CHPID paths
' D SMF ' == Display System Management Facility datasets, and %full
' D SMF,O ' == Shows SMF options

' D T ' == Display Time
' D TS ' == Show TSO Usermax, total # of Inits, and how many users are logged on to TSO
' D TS,@99999 ' == Display specific TSO user, if logged on
' D TS,@*,L=A ' == Show all logged-on TSO users in A-window
' D TS,L ' == Show only TSO users

' D U,,,451,1 ' == Display 1 device, shows VOLSER if DASD
' D U,,,451,4 ' == Display 4 devices starting with 451
' D U,,,ALLOC,C00 ' == Show what jobs/tasks are allocated to device
' D U,TAPE,OFFLINE,,500 ' == Display up to 500 offline tape drives
' D U,DASD,ONLINE,0100,500 ' == Display up to 500 online DASD units starting at device 0100
' D U,VOL=xxx090 ' == Display information on a DASD unit to find device number

' D XCF,PO,DEV=ALL ' == Display cross-coupling facility path out to all devices
' D CF ' == Display cross-coupling facility

' E <jobname>,PERFORM=69 ' == Put job to sleep - WRITE DOWN WHAT PERFORM GROUP WAS!!!

' F CATALOG,LIST ' == List jobs in Catalog
' F CATALOG,END(04) ' == Redrive catalog job number 4 (Cancel lookup and retry)
' F CATALOG,RESTART ' == Use with caution! Restarts Catalog system task.

' F LLA,REFRESH ' == Refresh Library Lookaside table
' F TSO,USERMAX=999 ' == Change maximum simultaneous TSO user limit - (' D TS ') to find out current setting

' F WLM,MODE=GOAL ' == Put WorkLoad Manager in Goal mode (no perf. groups)
' F WLM,MODE=COMPAT ' == Compatibility mode (perf. groups)

' FORCE <jobname> ' == Force job out of system
' FORCE <jobname>,ARM ' == Kill job if non-cancelable (Try Cancel first)
' FORCE U=xxxxx ' == Force TSO Userid

' L <comment> ' == Write comment directly to SYS1.LOGREC

' RO *ALL,D R,L ' == Display all pending replies on all systems in Plex
' RO (A,B,D),D R,L ' == Execute command on specific systems

" SE '<message>',USER=(@99999) " == Send message to TSO user
" SE '<message>',LOGON " == Send Broadcast message to all TSO users at logon
+ ' SE LIST ' == List all broadcast messages
+ ' SE 001,DELETE ' == Delete broadcast message #1

' V CN(SA01),MSCOPE=(*ALL) ' == Vary Named console to receive messages from ALL systems
' V CN(RAC2),ONLINE ' == Vary Named console online, from any connected system

' V 780,CONSOLE ' == Vary hardwired device to System Console
' V 780,CONSOLE,DROUT=(3,5) ' == Delete routes 3 and 5 from message collection
' V 780,CONSOLE,AROUT=(3,5) ' == Add routes 3 and 5 to message collection
' V 780,MSTCONS ' == Vary a specific console as MASTER for sysplex

' VARY PATH(DDD,CC),ONLINE ' == (DEVICE,CHPID)
' V PATH(DDD-DDD,CC),OFFLINE ' == Vary range of devices

' Z EOD ' == Halt system, End Of Day


=K Commands

' K A,10 ' == Set up a 10-line window
+' K D,F ' == Scroll forward
+' K D,B ' == Scroll backward (only from RCMVS)
+' K E,D ' == Erase window
+' K A,NONE ' == Get rid of window entirely

' K M ' == Display/set Master console options, such as WTO buffer limit

" K N,PFK=(13,CMD='K E,2') [,CON=Y] " == Define PFKey syntax for Master consoles; CON=Y means wait for user to hit Enter before executing. The first Underscore in the CMD positions the cursor for user input.
+" K N,PFK=13,CMD='K E,2' " == Syntax for Remote Console

' K S ' == Modify console options - roll number, segment (# of lines on screen), roll/delete, batch job displays
' K S,DEL=N ' == Hold screen
' K S,DEL=R ' == Roll messages, do not hold highlights
' K S,DEL=RD,L=01 ' == Modify another console remotely; DEL=RD means hold Highlighted messages

' K S,MFORM=(J,S,T) ' == Shows Jobs info, System, and Time on all messages
' K S,RTME=1/4,L=04 ' == Change Roll time for console 04 to 1/4 second (Use ' D C ' to find console numbers)

' K Q ' == Clear WTO BUFFER FULL error
' K Q,L=02 ' == Clear console #02's buffers

' K V,CMDSYS=RAC1 ' == Change system console to route subsequent commands to RAC1 without using ' RO ' for every command
' K V,CMDSYS=* ' == Change system console command routing back to default


=JES2 and OS/390 commands

' $AJ99999 ' == Activate job to run when inits are available
+ OS/390: ' $AJ(99999) '

' $AQ,ALL ' == Removes Q's from HOLD status
+' $AQ,C=A [BCD] ' == Activates specific Q's
+
+ OS/390: ' $TJOBCLASS(A,B,C,D / *),QHELD=N '

' $CJ99999 ' == Cancel job using JES
+ OS/390: ' $CJ(99999) '

' $DA ' == Display Active jobs and printers

' $DCKPTSPACE ' == Check BERT available ($HASP050)

' $DF ' == Display Forms for print Q.

' $DI,LONG,L=A ' == Long display of Inits with jobnames and ASIDs (Use ' K,A ' to define window)
+ OS/390: $DI(99) or $DI(90-99)

' $DJ99999,LONG ' == Display job, how much spool it's using, userid
" $D 'jobname',LONG == Same as above, with waiting hardcopy
+ OS/390: ' $DJ(99999),LONG '
+   " $DJOBQ 'jobname',LONG "

' $DJOBDEF ' == See free job number counts

' $DMEMBER(*),STATUS=ACTIVE == Display time differences between MVS images

" $DMJ99999,'message' " == Send a message to job (Usually right before cancelling it)

' $DN,Q=XEQ ' == Shows NAMES of jobs in Q
' $DN,Q=XEQO ' == Show names of jobs in class "o"
' $DN,Q=XMT ' == Show Transmit Q

' $DQ,Q=XEQ ' == Shows job input Q
' $DQ,Q=XEQJ ' == Shows input job class J
' $DQ,ALL,Q=XEQ ' == Shows Q's for all systems at once
' $DQ,ANY,Q=XEQ ' == Show all jos that have a system affiliation of ANY

' $DSPL,ALL ' == Show spool usage

' $DSPL,JOBS=001 ' == Show jobs using more than 001% of spool space
+ OS/390: ' $DJOBQ,SPOOL=PERCENT>=001 ' == Yes, that is "greater than or equal to"

' $DU,LINE187 ' == Display file-transfer line
+' $ELINE187 ' == Reset line
+' $SN,LINE187 == Start nodes on line for transmission
+
+ OS/390: $DU,LINE187
+ OS/390: $ELINE(187)
+ OS/390: $SN,LINE187

' $DU,LNES,L=A ' == Display JES2 SNA lines on this system

' $DU,RMTS ' == Display Remote printers

' $DU,RMT72 ' == Display remote printer
+ ' $SR72.PR1 ' == Start up a DRAINED printer
+ ' $DU,RMT72,SHORT ' == Determine JES line for printer

' $HJ99999;EJ99999;CJ99999 ' == Hold, Cancel, re-queue a job for execution (ONLY the first '$' is needed)
+ OS/390: $HJ(99999);EJ(99999);CJ(99999)

' $HQ,ALL ' == Hold all Q's on single system
' $HQ,C=A ' == Only hold class A
+ os/390: ' $TJOBCLASS(*),QHELD=Y
+ OS/390: ' $TJOBCLASS(A [BCD] ),QHELD=Y ' == Also see $PXEQ

' $OQ,ALL,CANCEL,A=8 ' == Cancel 8-day-old output (High spool); use ' $DJOBDEF ' to see what free counts are
+ OS/390: ' $O JQ,ALL,CANCEL,DAYS>7 '
+ OS/390: ' $CO JQ,ALL,DAYS>7 '

' $PLINE187 ' == Drain line
+' $SLINE187 ' == Start drained line
+ OS/390: $PLINE(187)
+ OS/390: $SLINE(187)

' $PJ(99999) ' == Purge output for job

' $PXEQ ' == Stops inits on specific image
' $SXEQ ' == Resumes inits

' $SN,LINE187 ' == Start nodes for line
' $SN,N=TNTJES2 ' == Start specific node
+' $D NODE(TNTJES2) ' == Display node

' $SSPL,V=SPOLx ' == Start formatted spool volume
+ OS/390: ' $SSPL(SPOLxx) '

' $TI99,C=2L ' == Change init 99 to process jobs in class 2, then L
+ OS/390: $TI(98-99),CLASS=2L '

' $TJ99999,C=2 ' == Change job to execute in class 2
' $TJ99999,P=9 == Change job's Priority to 9; higher is better.
' $TJ99999,S=-IND ' == Make job run when it has an IND status
+ OS/390: ' $TJ(99999),C=2 '
+ OS/390: ' $TJ(99999),P=9 '
+ OS/390: ' $TJ(99999),S=IND '


=MIA Commands

' @D G ALC,,500 ' == Displays tape drives in use
' @D COMMANDS ' == Shows options and synonyms in effect

' @D G 567 1 ' == Display Global view of drive 567 only
' @D G 567 5 ' == Display Global 567 and 4 more drives
' @D L 567 1 ' == Display Local 567

' @D CTC ' == Display CTC (Channel-To-Channel) lines status
' @D JOBRESERVE ' == Same as /TPCD JOB - Display drives that are reserved for specific job(s) only

' @FREE SYSx ' == Stop GRS on specified system, usually during IPL

' @GTAD G[lobal] AV[ail],,36 ' == Show which tape drives are AVailable for use

' @D G MTP ' == Display mounts pending

' @TPCD JOB[reserve] ' == Show which drives are Reserved
' @TPCD JOB 500 50 ' == Show reserves starting at unit 500, for up to 50 drives

' @TPCD LOC[alunits] ' == Different way to show tape drives

' @V 581 AVL G ' == Vary 581 available + online across all systems
' @V 581,J0B=PANVQ ' == Reserve a tape drive for specific job
' @V 581,JOB=BROKEN ' == Let other ops know that drive is busted
' @V 581 NOJOB ' == Unreserve drive (automatically implies Global)


=LMS Commands

' +D SCR POOL=* ATL=1 ' == Short version of Scratch for 1 ATL

' +ATLACT ATL=n ' == Activate disabled ATL
' +ATLINACT ATL=n ' == Inactivate ATL (WILL LOSE ANY Q'D COMMANDS IN ATL WITH THIS!)

' +ATLCHKRV ATL=n ' == Check reserve cells for tapes
' +ATLD ATL=n ' == Show ATL settings, including accessor device ID's
' +ATLI ATL=n ' == Show ATL Statistics

' +ATLM[tu] 520 <DIS[able] / ENA[ble] / INFO> == Disable, Enable, or display INFO on an ATL drive
+' +ATLM 540 ENA ' == Re-enable drive 540 after " ERP error, service required " is cleared.

' +ATLRLSE ATL=n ' == Release ATL from HOLD state
' +ATLHOLD ATL=n ' == Put ATL into HOLD state

' +CAS STATUS ATL=* ' == Obvious
' +CAS OWNER=YES ATL=* ' == Sets Owner system on CAS, depending on what system it's entered from
' +CLE 530 ' == Clean an ATL drive

' +D ACC ATL=* ' == Display which accessor arm has CAS control
' +D ATL=2 ' == Show options in effect for ATL
' +D [M]CAS ATL=* ' == Display owning system
+' +MCAS OWNER=YES ATL=3 ' == Set owner

' +D CLE * ' == Display number of Cleaning tapes loaded
' +D DEE ATL=* ' == Display Direct Entry / Exit
' +DEEL[ist] ATL=5 ' == Show amount of tapes in the DEE
' +DEEL ATL=5 NAME=<deename> COL=0F ' == Display specific column in DEE
' +DEE OWNER=YES ATL=4 ' == Set DEE owner system

' +DEFALIAS ' == Display synonyms defined
' +D EMP ATL=* ' == Display empty cells
' +D MAXALLOC ' == Show how many concurrent LMSVRFY's can run in 1 atl
' +D MCAS ATL=* ' == Show owner of MCAS
' +D MTU=541 ' == Display tape drive in ATL
' +D PRIO ATL=* ' == Display Priority
' +D Q,ATL=SULT2 ' == Display Q'd commands
' +D U ATL=* ' == Display uninitialized tapes
' +D V=999999 ' == Display tape, if inside ATL

' +EJECT 999999 ' == Eject tape
' +EJECT 999999 PORT=MCAS ' == Eject tape to Mass Cas instead of Cas
' +EJECT F=99 S=9 ROW=99 CO=99 ATL=9 ' == Eject from Cell (Frame, Side, Row, Column)

' +MCAS OWNER=YES,ATL=* ' == Change system owner
' +MODIFY VOLSER=999999 UNINIT=NO ' == If you know the tape is live but LMS thinks it's UNINIT
' +MOUNT 555,V=999999 ' == Mount tape to drive
' +MOUNT 555,SCRATCH ' == Mount scratch
' +MOUNT 555,POOL=x ' == Mount from defined tape range

' +PRIV == Display cells that are occupied
' +RET 555 ' == Return tape in drive to its cell
' +S ENT=U ATL=1 ' == Set CAS on ATL1 to UNINIT mode
' +S ENT=N ATL=1 ' == Return CAS to Normal
' +S MAXALLOC=9 ATL=1 ' == Change concurrent number of LMSVRFY's
' +S ME=U ATL=1 ' == Change Mass Cas to UNINIT
' +S PRIO=[OPT / EJECT / ENTRY / MOUNT] ATL=1 ' == Change event priority


=IOF:

When typing in filenames, '*' and '+' are wildcards.
The '/' works like the '=' in TSO; it's the Jump for IOF.

' =9.I; D.INIT ' == See a long display of Inits. ' SORT JOBNAME ' to put Inactive ones at top.
' /D.INIT == Same thing, using Jump from within IOF.
' EXT ' == Display Extended information about jobs (Use PF11)
' PCHK ' == Display why a job isn't printing
' RC ' == Display abend/return codes for job

' WHOIS userid ' == Display information about UV251, for example.
' 14-16 T DEST(LS1001N) ' == Change Printer destination for 3 jobs

' SPLIT NEW ' == Create up to 8 SPLIT screens on one ID
' SWAP LIST ' == Menu for SPLIT screens
' SWAP 9 ' == Swap to desired screen


=Netview:

' ACT node,ALL ' == Activate node and everything under it (CLIST)
+' V NET,ACT,node,SCOPE=ALL '

' AUTOWRAP 1 ' == Set scrolling speed to 1 second
' AUTOWRAP OFF ' == High-speed scrolling

' BR NCPxx ' == Browse NCP definition
' DISG node ' == Graphical display of node

' D NET,ID=node,E ' == Display node and Everything under it
' D NET,ID=node,S ' == Display Short node info

' MAINMENU '

' SENSE 9999999999 ' == Help information for Sense code
' SESS node ' == Display session connection dates/times
' STATMON ' == Big picture of network
' STATS pu-id ' == Display status info for physical unit
' STATUS PAPU2 ' == Help for status code

' V NET,ID=xxxx,ACT ' == Vary node active
' V NET,ID=xxxx,INACT,[I / F] ' == Vary node Inactive, Immediately or Forced
' V NET,ID=xxxx,LOGON=CICS ' == Logon terminal to CICS
' V NET,ACT,ID=xxxx,,LOGON=TSO1 ' == Activate and vary with logon
' V NET,ID=T99999999,NOLOGON=* ' == Remove controlling LU . Application from terminal

' V NET,ACT,ID=NCPxx,SCOPE=U ' == U is better than ALL for NCP's

XXX

MVS and VM Tips - Tips for Mainframe Operators
Copyright (C) 2000 David J Bechtel

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.