The System Display and Search Facility (SDSF), is a panel driven interface that is commonly used to perform actions like viewing system activity and resources, entering z/OS system commands, and viewing input, execution, and output job queues.
Enter the ISPF navigation shortcut =SD to jump directly to the SDSF Primary Option Menu. See the COMMAND INPUT ===> prompt at the top? This is the SDSF primary command prompt.
Enter the SDSF primary command DA to open the "display active jobs" panel, and then enter the primary command SET DISPLAY ON .
Observe that the display filter values for PREFIX, DEST, OWNER, and SYSNAME are now showing near the top. You can control what data is displayed by manipulating these filters.
To clear all the filters, enter the following SDSF primary commands:
To only display your jobs, enter the following SDSF primary commands:
- OWNER CC#####
The DA command should display a single entry: your contest ID for the active TSO session because OWNER is set to CC#####.
To view the z/OS System Log, enter LOG.
Enter the command COLS to view system log columns. Columns 2 through 57 contain metadata about the log message and starting in column 58 is either a system message or system command. To the right of any system messages you will find a brief log message. Full descriptions of log messages can be located on the internet by performing a search on the system message.
Enter the following SDSF commands while in the System Log:
- RIGHT 26
Use the F8, F7, F10, and F11 keys to scroll around, just like in the ISPF editor.
Next, let's explore the z/OS display commands. These are useful for gaining valuable data about the running system. Enter / in the ISPF primary command input to open the System Command Extension panel. This is similar to the =6 TSO command input in ISPF, only commands entered into this panel will be executed as z/OS system commands.
Many z/OS system commands exist and each has a rich set of command operands. Enter each of the following commands, one at a time, in the System Command Extension panel:
- D TS,L
- D TCPIP,,NETSTAT,HOME
- D TCPIP,,NETSTAT,BYTE
- D T
- D A,L
- D M=CPU
Next, enter the following SDSF commands while in the log:
- LEFT MAX
- RIGHT 37
Use F7 to page up, watching in column 57 for your user ID. Once located, observe the output to the right - you will see the commands you just entered and the response given.
SDSF is also used to view the output of JCL execution.
JCL consists of statements that tell z/OS which program name to execute followed by program inputs and outputs. Filename references are coded into z/OS programs; however, these filenames are abstract names without any association to a real resource. The purpose of JCL is to associate program filenames to physical system resources.
This association is achieved using JCL DD statements.
JCL statements begin with // in columns 1 and 2, followed by an internal name, then the statement type, EXEC or DD. For example, to execute the SORT program, the following JCL could be used:
//S1 EXEC PGM=SORT //SORTIN DD DSN=&SYSUID..DATA(HESF),DISP=SHR
Assuming that the SORT program includes the statement "OPEN SORTIN", the JCL DD statement is used to associate the real resource with SORTIN.
The format of a JCL DD statement follows:
SORTIN is a Data Definiton Name (DDNAME) and must match the SORT program internal filename reference. Resource describes the real resource such as a PDS. See DSN=&SYSUID..DATA(HESF) in the example above. Submitting JCL for system interpretation and execution can be accomplished in many different ways, some of which will be explored now.
Take the described actions to submit JCL jobs JOB01, JOB02, JOB03, and JOB04 using 4 separate ways:
From any SDSF or ISPF panel, enter the following primary command:
TSO SUBMIT JCL(JOB01)
Next, use the ISPF Command Shell (=6) panel to submit another JCL job:
Next, from the data set directory list (=3.4), browse into your CC#####.JCL PDS.
Enter SUBMIT to the left of member JOB03.
Finally, submit JCL from ISPF editor Browse, View, or Edit mode. Open your CC#####.JCL(JOB04) member in Browse, View, or Edit mode:
Enter SUBMIT in the primary command line.
There are many more submit options, but these are enough for now!
Have you noticed that after each submit an unsolicited message was displayed? This message contains information like the JCL jobname (JOBnn) and a uniquely defined JOB number JOB#####.
Let's take a look at the output from the JCL jobs you have just submitted. Return to the SDSF Primary Option menu (=SD) and enter the following SDSF primary command to reset your filters:
Next, enter the following commands to filter jobs owned by you, and only display their status:
- OWNER CC#####
SDSF STATUS DISPLAY ALL CLASSES COMMAND INPUT ===> NP JOBNAME JobID Owner Prty Queue TEST008 TSU07324 TEST008 15 EXECUTION JOB01 JOB07343 TEST008 1 PRINT JOB02 JOB07344 TEST008 1 PRINT JOB03 JOB07345 TEST008 1 PRINT JOB04 JOB07346 TEST008 1 PRINT
Notice the characters NP? The NP column to the left of each JOBNAME is used to issue actions against specific jobs. Some of the commands that can be issued are:
- S : Selects the entire output for browsing.
- ? : Allows you to select individual JCL DDNAMEs for browsing. Use S against the DDNAME to view individual output.
- P : Purges (deletes) the job output.
- SJ : Selects JCL that was used to submit the job.
At this time, enter SJ to the left of JOB01.
While viewing the JCL of JOB01 enter HILITE JCL on the primary command line. This will highlight the JCL reserved words: JOB and EXEC. The JCL JOB statement is primarily used to give the JCL JOB a name, in this case the jobname is JOB01. The JCL EXEC statement is used to tell z/OS to execute a something, here we are executing the program IEFBR14. IEFBR14 is a simple program that starts execution and immediately returns (exits). There are no virtual filenames inside the source code of IEFBR14, therefore no DDNAMEs are required here.
Press F3 to return to the SDSF status display panel and enter S to the left of JOB01. The entire job output is displayed, including system messages.
Press F3 and enter ? to the left of JOB01. Now the JCL job DDNAMEs are displayed. Hold up! We just told you that there were no abstract filename statements inside the IEFBR14 code, and you clearly saw that JOB01 had no DD statements coded. But here are 3 DDNAMEs. What gives?
The reason these DDNAMEs exist is that z/OS dynamically creates these 3 DDNAMEs for every job that gets submitted. They are used to hold the job log summary, JCL interpretation output and various system messages.
Enter S to the left of each DDNAME and view their contents, then press F3 to return to the SDSF status display panel.
Select JOB02's output. Notice that the EXEC statement here includes an optional STEPNAME, namely "STEP1" before the EXEC statement. A STEPNAME is used to identify blocks of JCL and is used in more advanced JCL techniques.
Select JOB03's output. Notice that JOB03 has multiple EXEC statements. It should be clear now that JCL jobs can execute more than one program, with each program being contained within a step. Multiple EXEC steps are executed in order. STEP1 must finish before STEP2 can begin, and so on.
Select JOB04's output. Notice that JOB04 failed to execute due to a JCL error. At the bottom of the output is the error message IEFC605I indicating that something is wrong on JCL statement number 3.
Press F3 then enter SJ on JOB04. SJ permits you to alter the JCL directly in the output queue. Enter HILITE JCL on the command line to help identify the error.
All JCL must be UPPERCASE with a few exceptions. Correct the error and enter SUBMITon the command line to re-submit the JCL for interpretation and execution.
F3 will return to SDSF queue.
Observe another JOB04 entries exist. Recall that the highest JOB##### job number is the most recently executed.
Once JOB04 successfully executes, enter ? on the successful job output and select the JESJCL DDNAME. Observe that the program executed in step 3 is SORT. Next, look closely at line 5, where the input to the SORT program is defined:
//SORTIN DD DSN=ZOS.PUBLIC.DATA(HESF),DISP=SHR
Note line 6 contains the SORTOUT DD statement. This is where SORT will be writing it's output to:
//SORTOUT DD DSN=&SYSUID..P2.OUTPUT(#05),DISP=SHR
The line immediately after 6 indicates that z/OS substituted something in the previous statement. This is where &SYSUID gets resolved to CC#####.
//SYSPRINT and //SYSOUT on lines 7 and 8 are coded to DD SYSOUT=*. SYSOUT=* is the job log.
Finally on line 9, //SYSIN DDNAME references the physical resource "*", where * indicates whatever follows is stored in the input queue and passed to executing program.
Press F3and return back to JOB04 DDNAME list and enter INPUT ON on the SDSF primary command line. Observe that more system generated DDNAMEs are now being displayed.
Select SYSIN STEP3.
SDSF OUTPUT DISPLAY JOB04 JOB07363 DSID COMMAND INPUT ===> ********************************* TOP OF DATA * SORT FIELDS=(20,2,CH,A) ******************************** BOTTOM OF DATA
What you are viewing is the non-JCL data that followed the //SYSIN DD * in the JCL stream. This data was stored in the queue for the system to access when the SORT program executed and describes the fields that the SORT program should evaluate and how they should be sorted.
The actual data input and output for JOB04 SORT is a college campus survey of hair color, eye color, and sex combination frequency. The output of SORT was written to P2.OUTPUT(#05) as described in the //SORTOUT DD DSN statement and will be used to evaluate successful completion this challenge.
Feel free to check your P2.OUTPUT data set for the output, then move on to the next challenge!.