SDSF
SDSF stands for System Display and Search Facility. This is also referred as – Spool Search and Displays Facility.
What is SPOOL?
SPOOL is called as Simultaneous peripheral operations online. when you run a job, it has to be sent to a printer but before that, it has to go to staging area and in this particular staging area is called as SPOOL where the jobs will be present in Queue.
When we want to submit a JCL(JOB), we give the command ‘SUB’ or ‘SUBMIT’. Once we submit the JCL, we get a message like –
JOB012XX12 $HKJLK JOBNAME ENDED AT … MAXCC=0000 CN(INTERNAL).
If you notice, we can get MAXCC=00 or 04 or 08 or 12 or 16 etc. MAXCC is maximum condition code which is the maximum return code from any step.
Return code is the status of each step.
Various Return codes of steps
0 – SUCCESS – Normal completion of the Job. It is the case of successful completion of job
4 – WARNING. Ideally, we should check the listing for the information of the Warning
8 – ERROR. Check the listing for the kind of error.
16 – SEVERE ERROR. Check the listing for the kind of error.
Difference between Return Code and Maximum Condition Code
A RETURN CODE shows the status of each step within a job, while a Maximum Condition Code (MAXCC) is the maximum return code counted by the operating system after execution of a complete job. The maximum condition code is the maximum of one of the step.
How to see the Status of the Jobs?
Give the command ‘ST‘ in ‘SDSF PRIMARY OPTION MENU’
How to Browse/view a particular Job in SPOOL?
In the line command, type a question mark(?) against the job name which you want to browse and it
will show various areas which you can browse like –
a) JESMSGLG
b) JESJCL
c) SYSPRINT
d) SYSOUT, SYSUT2 etc
Suppose you want to select ‘JESMSGLG’ then issue a line command ‘S’ to select this.
How to see the jobs in Input Queue?
In order to check the jobs present in the Input queue, you need to give option ‘I’ in the command input as shown below-
Suppose, you want to check for all the jobs with the class A and C in Input Queue which are on hold, then you need to give the command – ‘IAC H‘ as below-
Suppose, you want to check for all the jobs with the class A in Input Queue which are not on hold in , then you need to give the command – ‘IA NH‘ as below –
How to filter a job by Owner id?
OWNER * or OWNER – Shows the jobs by all the owners
OWNER MA%%%KS – Displays all the jobs with owner starting with ‘MA’ and ending with ‘KS’
OWNER MATE* – It gives all the jobs with owner starting with ‘MATE’ followed by anything
How to sort based on a particular field in SPOOL?
If you want to sort based on a particular field, say ‘JOBID’, then you have to give the command ‘SORT JOBID’. Similarly, if you want to sort based on jobname, you can give ‘SORT JOBNAME’.
Output
This command will sort the Jobs based on ‘JobID’. By default, it will be sorted in ascending order. If you want to sort in descending order, then use ‘SORT JOBID DESC’.
How to arrange the columns in SPOOL?
If you want to arrange the columns in SPOOL. Say, you want to move ‘Prty’ before the column ‘Owner‘, then you can follow these steps.
You have to type ‘/’ or ‘//’ on the column which you want to move and you need to type ‘b’ before a column where you want the field to move. This is shown as below-
Output
You can see that ‘Prty’ is before ‘Owner’ now.
How to view a SDSF user/Owner?
Issue a line command ‘WHO‘ to get the information of the user.
How to write the content of the SPOOL (SDSF) to a dataset?
Issue a line command ‘XDC‘ against the Job you want to copy in a dataset. You need to give the name of the dataset where you want to store the information.
Give the details of the file where you want to store the spool details of the job.
The content of the file which is created
Note/suggestion/improvement:
Suppose, you do not want to capture the entire spool output of the JCL but wish to only store the information of JESYSMSG or JESJCL or JESMSGLG, then you can just give ‘XDC’ in front of JESYSMSG or JESJCL or JESMSGLG respectively.
How to filter a job by Prefix?
PRE * or PRE – Shows all the jobs
PRE JOB123* – Displays all the jobs starting with JOB123
PRE JO%%23 – It Shows all the jobs by starting with JO and ending with 23
How to run a JCL directly from SPOOL area?
Issue a line command ‘SJ‘ against the job you wish to run. You can edit the JCL here and submit it.
Please note that editing of JCL here does not save the changes in the member where your JCL is present so you cannot physically SAVE the changes but only logical editing can be done.
How to go to a particular line? In other words, how can we locate a Line number?
Suppose i want to locate a line number 111, then issue a command ‘LOCATE 111’
Filter the Jobs which has abended?
FILTER MAX AB*
Filter the Jobs which has JCL ERROR?
FILTER MAX ‘JCL ERROR’
Filter the Jobs which has a return code of 0000.
FILTER MAX EQ ‘RC 0000’ or,
FILTER MAX EQ ‘RC 0000’
Filter the Jobs which does not have a return code of 0000.
FILTER MAX NE ‘RE 0000’ or,
FILTER MAX NE ‘RE 0000’
how to switch off the filter in JCL?
FILTER OFF or,
FIL OFF