Cette page n'est pas disponible en français. Veuillez-nous en excuser.

ABIS Infor - 2011-10

REXX and SDSF

Gie Indesteege (ABIS) - 1 September 2011

Abstract

REXX is a powerful language, which can now (since z/OS 1.9) be used to access the JES spool via SDSF functions. A powerful alternative to SDSF batch. Imagine you can pinpoint your batch jobs in error without using split screen start SDSF?

History

The Restructured Extended Executor Language (REXX) has proven to be a powerful 'replacement' language for the good old 'CLIST' since the 80's. Using REXX for accessing the spool through SDSF is the latest step forward in providing nice support for system and development people on z/OS.

The concept:

The SDSF interactive panels are 'virtualised' to the REXX interface, which makes it possible to handle the information as a set of stem variables. The order of processing is an imitation of the user's interaction.

Typical scenario:

I want to show the return codes of my jobs:

  • Set-up of the REXX interface with SDSF
	RC = ISFCALLS("ON")
  • prepare host environment for sending commands
	ADDRESS SDSF
  • prepare virtual panel information (for jobs with prefix TU0* and owner "TU*")
	isfprefix = "TU0*"
	isfowner = "TU*"
	ISFEXEC H
  • retrieve info from stem variables and process the information
	do cntr = 1 to isfrows
		say "jobname" value(JNAME.cntr) "with jobid" value(JOBID.cntr) ,
		"ended with RC" RETCODE.cntr
	end
  • close the SDSF interface
	RC= ISFCALLS("OFF")

Advanced processing:

Manipulation of the 'selected' jobs is possible as well, thanks to a unique identifier TOKEN for each row. The actions are triggered through the ISFACT interface.

For example: purge all jobs with return code < 8

	if word(RETCODE.cntr,2) < 8 then 
		"isfact h TOKEN('"TOKEN.cntr"') parm(np p)"   

As a matter of fact, manipulating the Job Data Sets (JDS) is possible too, but you are welcome at ABIS to learn more about these advanced REXX possibilities.

More info on the REXX support in SDSF can be found in the IBM redbook SG24-7419 at http://www.redbooks.ibm.com/.