- HubPages»
- Technology»
- Computers & Software»
- Computer Science & Programming
SDSF-Listing Job Status Rexx Script
What is REXX?
REXX (Restructured Extended Executor) is an interpreted programming language developed at IBM used to process data and text and generating reports. It is also used as an internal macro language in other software such as KEDIT and ZOC terminal emulator. REXX interfaces with GUIs, databases and web server tools. It is as powerful as Perl. It was chosen by IBM as the procedures language for SAA (Systems Applicaiton Architecture) and is bunded with all IBM mainframes and can interact with TSO, ISPF, and SDSF.
What is SDSF?
SDSF - System Display and Search Facility is a utility that allows you to monitor, control, and view the output of jobs in the system. After submitting JCL (job), it is the utility that allows you to monitor/view the output held in the JES spool area. It allows you to edit/print the output or rerun the job. SDSF allows you to view system logs, controlling job processing, monitor jobs, dsiplay job output, control order of jobs being processed, control the order in which output is printed and controlling printers and intiators.
The need for Rexx scripting
The need to have REXX scripting can be of many uses. When one process jobs on a daily basis, the SDSF listing of jobs in output queue can be long if you are using different job names. The example shows you how to interact with SDSF via REXX and obtain a list of jobs and their return status providing parameter of jobname. The benefits is that you don't have to page down log, but rather ping system to view the results of eahc run.
REXX Example
/* REXX */ ARG JOBNM IF JOBNM=="" THEN DO SAY "NO PARMS SENT" EXIT 16 END RC=ISFCALLS('ON') ISFACTIONS="ON" ISFOWNER="*" ISFPREFIX=JOBNM ADDRESS SDSF "ISFEXEC ST" NUMROWS=ISFROWS SAY NUMROWS "FOUND" SAY "+------------------------------------------+" SAY "| SEARCHING JOB...:" JOBNM SAY "+------------------------------------------+" DO I=1 TO NUMROWS SAY JNAME.I JOBID.I RETCODE.I END RC=ISFCALLS('OFF')