z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Description

z/OS MVS Programming: Authorized Assembler Services Reference SET-WTO
SA23-1375-00

The SJFREQ macro services can be used to manipulate text unit data that represents processing options for system output (sysout) data sets. The SJFREQ services described in this information include the following:
  • The SJFREQ RETRIEVE service retrieves keyword subparameter information in text unit format from output descriptors. These output descriptors can be specified either on an OUTPUT JCL statement or through dynamic output.
  • The SJFREQ SWBTU_MERGE service merges lists of scheduler work block text units (SWBTUs) and allows applications to indicate keys to be removed from a list of SWBTUs.
  • The SJFREQ VERIFY service verifies OUTDES statements, operands, and subparameters and builds text units to represent them. Your application can use these text units to dynamically define processing options for a sysout data set.
  • The SJFREQ TERMINATE service cleans up SJF's recovery and working storage environment.
z/OS MVS Programming: Authorized Assembler Services Guide describes the OUTDES statement and its operands, as well as the individual SJF services.

Environment

The requirements for the caller are:

Environmental factor Requirement
Minimum authorization: The requirements vary, depending on the service.
  • SJFREQ RETRIEVE and SJFREQ SWBTU_MERGE:

    Supervisor state, with a PSW key that matches the key of the caller's storage.

  • SJFREQ VERIFY:

    Problem state or supervisor state. For supervisor state, the caller must run in PSW key 1 and the caller's storage must be in PSW key 1. For problem state, the caller must have a PSW key that matches the key of the caller's storage.

  • SJFREQ TERMINATE:

    Problem state or supervisor state, with a PSW key that matches the key of the caller's storage.

Dispatchable unit mode: Task
Cross memory mode: PASN=HASN=SASN
AMODE: 24- or 31-bit
ASC mode: Primary
Interrupt status: Enabled for I/O and external interrupts
Locks: No locks held
Control parameters: Must be in the primary address space

Programming requirements

The application must include the CVT and IEFJESCT mapping macros. If the application codes the PARM parameter on the SJFREQ macro, the caller must also declare a 4-byte pointer, SJFPTR.

For each SJFREQ invocation, the application must initialize certain fields in an input parameter list. Fields are discussed within each service description. The following lists the parameter list name for each service.

Service Parameter List Name
RETRIEVE IEFSJREP
SWBTU_MERGE IEFSJSMP
VERIFY IEFSJVEP
TERMINATE Any of the three parameter list names above.

Restrictions

None.

Input register information

Before issuing the SJFREQ macro, the caller must ensure that the following general purpose registers (GPRs) contain the specified information:
Register
Contents
1
If PARM is not specified, the address of a word that contains the address of the input parameter list
13
The address of an 18-word save area

Output register information

When control returns to the caller, the general purpose registers (GPRs) contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14
Used as a work register by the system
15
Return code
When control returns to the caller, the ARs contain:
Register
Contents
0-1
Used as work registers by the system
2-13
Unchanged
14-15
Used as work registers by the system

Some callers depend on register contents remaining the same before and after issuing a service. If the system changes the contents of registers on which the caller depends, the caller must save them before issuing the service, and restore them after the system returns control.

Performance implications

None.

Syntax

The standard form of the SJFREQ macro is written as follows:

Syntax Description
   
   name name: Symbol. Begin name in column 1.
   
One or more blanks must precede SJFREQ
   
SJFREQ  
   
One or more blanks must follow SJFREQ
   
REQUEST=RETRIEVE  
REQUEST=SWBTU_MERGE  
REQUEST=VERIFY  
REQUEST=TERMINATE  
   
    ,PARM=addr addr: RX-type address, or registers (1) - (12).
   

Parameters

The parameters are explained as follows:

REQUEST=RETRIEVE
REQUEST=SWBTU_MERGE
REQUEST=VERIFY
REQUEST=TERMINATE
Specifies the SJF service to be called. SJF services that you can request through the SJFREQ macro are:
RETRIEVE
The SJFREQ RETRIEVE service retrieves keyword subparameter information in text unit format from output descriptors. These output descriptors can be specified either on an OUTPUT JCL statement or through dynamic output. See SJFREQ RETRIEVE service for more detailed information on using this service.
SWBTU_MERGE
Use SJFREQ SWBTU_MERGE to create a single list of SWBTUs from a base SWBTU list and a merge SWBTU list. The resulting list of SWBTUs contains all the text units in the base and merge lists. If duplicate text units exist, only one appears in the final SWBTU list. The SWBTU_MERGE service also allows an application to indicate keys to be removed from a list of SWBTUs. See SJFREQ SWBTU_MERGE service for more detailed information on using this service.
VERIFY
Use SJFREQ VERIFY to validate OUTDES statements and build text units to be used as input to dynamic output. See SJFREQ VERIFY service for more detailed information on using this service.
TERMINATE
Use SJFREQ TERMINATE after previously issuing a RETRIEVE, SWBTU_MERGE, or VERIFY request that specified the no cleanup option (SJxxNOCU). TERMINATE cleans up SJF's recovery and working storage environment. See SJFREQ TERMINATE service for more detailed information on using this service.
,PARM=addr
Specifies the address of the parameter list for the service requested. You must initialize certain parameter list fields for each service. The following list indicates where the parameter lists are described. If you omit PARM, register 1 must contain the address of a word that contains the address of the input parameter list.

Example

Invoke the VERIFY service to:
  • Validate the syntax of the statement OUTDES, the keyword operand CHARS, and the subparameter (GT10)
  • Build text units for the valid keyword operand and subparameter.
          OUTDES out1 CHARS(GT10)
Use the label out1 for the OUTDES statement in this example. The statement is to be converted into text units and used as input to OUTADD, the dynamic output macro.
***********************************************************************
*   This program segment has attributes that allow the defined        *
*   storage to be altered.                                            *
***********************************************************************
*                                                                     *
*        Set up SJVEP, VERIFY parameter list area.                    *
*                                                                     *
***********************************************************************
*
         XC    SJVEP(SJVELGTH),SJVEP  Clear the parameter list
         MVC   SJVEID,=A(SJVEPEYE) Parameter list ID
         MVI   SJVEVERS,SJVECVER   Parameter list version
         OI    SJVEFLAG,SJVENOCU   Indicate no cleanup to SJF on this
*                                   call, another call to SJF is
*                                   expected.
         LA    R4,SJVELGTH         Get parameter list length
         STH   R4,SJVELEN          Set parameter list length
*
*                                  SJVESTOR and SJVEJDVT are properly
*                                   set at zero from XC instruction.
*
***********************************************************************
*                                                                     *
*        Set up statement and operand information.                    *
*                                                                     *
***********************************************************************
*
         MVC   SJVECMND,STATMNT    Set statement name field to OUTDES
         ST    R2,SJVEOPEP         Set the operand pointer
         LR    R15,R3              Get pointer to last operand
*                                   character
         SR    R15,R2              Get difference from first operand
*                                   character
         LA    R15,1(R15)          Add 1 to get proper operand length
         STH   R15,SJVEOPEL        Set operand length
*
***********************************************************************
*                                                                     *
*        Set up subparameter information.                             *
*                                                                     *
***********************************************************************
*
         LA    R15,1               Set up for first subparameter
         STC   R15,SJVEPARM        Set subparameter number to 1
         ST    R4,SJVEPRMP         Set the subparameter pointer
         LR    R15,R5              Get pointer to last subparameter
*                                   character
         SR    R15,R4              Get difference from first
*                                   subparameter character
         LA    R15,1(R15)          Add 1 to get proper subparameter
*                                   length
         STH   R15,SJVEPRML        Set the subparameter pointer
*
***********************************************************************
*                                                                     *
*        Set up output area information.                              *
*                                                                     *
***********************************************************************
*
         LA    R15,AREASIZE        Get output work area length
         STH   R15,SJVETUBL        Set text unit output area length
         LA    R15,OUTAREA          Get address of output work area
         ST    R15,SJVETUBP         Set text unit output area size
*
***********************************************************************
*                                                                     *
*        Set up Register 1 to point to a word of storage that         *
*        contains the address of SJVEP.                               *
*                                                                     *
***********************************************************************
*
         LA    R4,SJVEP            Address of
         ST    R4,SJVEPPTR           the SJFREQ VERIFY
         LA    R1,SJVEPPTR             parameter list
*
***********************************************************************
*                                                                     *
*        Invoke SJFREQ VERIFY service.                                *
*                                                                     *
***********************************************************************
*
         SJFREQ REQUEST=VERIFY     Issue the SJF macro.
*
***********************************************************************
*                                                                     *
*        Check for a zero return code.                                *
*                                                                     *
***********************************************************************
*
         LTR   R15,R15             Check service return code
         BNZ   SJFERR              Go to nonzero return processing
*
*
*
***********************************************************************
*                                                                     *
*        In this portion of the example, a zero return and reason     *
*        code are received.  The output fields from the service       *
*        contain the following information:                           *
*                                                                     *
*        Register 15 - contains zero.                                 *
*                                                                     *
*        SJVEREAS  -  contains zero.                                  *
*                                                                     *
*        SJVEOPD   -  this field contains the operand description     *
*                     for CHARS:                                      *
*                     "CHARACTER ARRANGEMENT TABLE"                   *
*                                                                     *
*        SJVEOPDL  -  this field contains the operand description     *
*                     length - decimal 27.                            *
*                                                                     *
*        SJVETUPL  -  this field contains an address into OUTAREA     *
*                     that is the start of the text unit pointer      *
*                     list.                                           *
*                                                                     *
*        OUTAREA   -  this area contains the text unit pointer        *
*                     and the text unit that were built by VERIFY     *
*                     for the CHARS(GT10) specification.              *
***********************************************************************
*
*                                                                     *
SJFERR  DS    0H                  Label used for branch when SJFREQ
*                                   VERIFY returns with a nonzero
*                                   return code.
*
*        Code to handle SJFREQ errors
*
***********************************************************************
*                                                                     *
*        Storage definitions                                          *
*                                                                     *
***********************************************************************
*
         IEFSJVEP DSECT=NO         SJFREQ VERIFY parameter list area
*
SJVEPPTR DS    A                   Field used to contain SJVEP address
*
*
OUTAREA  DS    XL1024              Area used by SJFREQ VERIFY to build
*                                   text units for valid operands and
*                                   subparameters.
*
AREASIZE EQU   *-OUTAREA           Size of AREA
*
***********************************************************************
*                                                                     *
*        Equates and Constants                                        *
*                                                                     *
***********************************************************************
*
R0       EQU   0                   Register 0
R1       EQU   1                   Register 1
R2       EQU   2                   Register 2
R3       EQU   3                   Register 3
R4       EQU   4                   Register 4
R5       EQU   5                   Register 5
R6       EQU   6                   Register 6
R7       EQU   7                   Register 7
R8       EQU   8                   Register 8
R9       EQU   9                   Register 9
R15      EQU   15                  Register 15
*
SJVEPEYE EQU   C'SJVE'             VERIFY parameter list identifier
STATMNT  DC    CL8'OUTDES  '       Statement name
*
***********************************************************************

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014