z/OS MVS Using the Subsystem Interface
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Processing Flow for Single Data Set Requests

z/OS MVS Using the Subsystem Interface
SA38-0679-00

Your external writer can process single data set requests by:
  • (JES2 and JES3) Processing one data set at a time.
  • (JES3 only) Processing all data sets together (update request).

Processing One Data Set at a Time (JES2 and JES3): Your external writer can use the following steps for proper selection, allocation, retrieval, and unallocation of an individual SYSOUT data set:

  1. Build the appropriate SSOB and SSSO control blocks for the request according to the individual selection criteria desired.
  2. Issue the IEFSSREQ macro asking JES for the name of a data set.

    This step includes setting the SSSOUFLG flag byte to X'00', and the SSSOCTRL bit to 0.

    Upon return the name of the data set is in the SSSODSN field.

  3. Allocate the data set through dynamic allocation (DYNALLOC macro).

    Your external writer can use the following text units:

    • DALDSNAM

      Used with the returned name from the SSSODSN field.

    • DALSSREQ

      Indicates a request that JES needs to handle. The parameter value in this text unit is the name of the subsystem that processed the IEFSSREQ macro.

    • DALRTDDN

      Indicates the DDNAME associated with the allocation be returned to the caller of DYNALLOC. Your external writer then places this DDNAME in the DCB macro that needs to open the SYSOUT data set as input for your reads. Prime the parameter in this text unit with blank (X'40') characters before issuing the DYNALLOC macro. This text unit is returned from DYNALLOC with the correct DDNAME.

      Your external writer will also use this DDNAME in the dynamic unallocation of the data set when performing unallocation processing.

  4. Open the program-supplied DCB.

    Move the returned DDNAME from the DALRTDDN field as the DCB's DDNAME before issuing the OPEN.

    The following is an example of a DCB that may be used to obtain the records:
    INDCB    DCB   DSORG=PS,MACRF=GL,BUFNO=1,                              X
    
                   SYNAD=some-routine,EODAD=some-routine
    Note: Multiple QSAM buffers here do not improve performance. IBM® recommends BUFNO=1.

    Your program can issue BSAM and QSAM macros in 31-bit mode. See z/OS DFSMS Macro Instructions for Data Sets.

  5. Optionally open any other devices that the program requires.
  6. Access the records in the SYSOUT data set.
  7. Upon EODAD, close the input DCB and issue the FREEPOOL macro unless you coded RMODES31=BUFF on the DCBE macro.
  8. Unallocate the data set through dynamic allocation (DYNALLOC).

    Optionally, you can perform disposition processing to change the attributes of the returned data set.

    The specific text units to be used are:

    • DUNDDNAM

      This text unit indicates an unallocation by DDNAME. The DDNAME the external writer must use is the same one used for the data set allocation.

    • DUNOVDSP

      This text unit indicates a disposition override. You must specify one of the following:

      • Keep the data set on the spool. For JES2, when you specify keep as the disposition, JES2 assumes that the external writer has failed and treats the next PSO request as if you had set the SSSOCTRL bit.
      • Delete the data set from the spool.

      If you are performing immediate disposition and wish to delete the data set, use the X'04' value as the disposition flag. Otherwise, you can use the X'08' value to keep the data set on the spool.

    Optionally you may use any of the following text units to modify the queue, change the destination, or change the SYSOUT class of the data set during unallocation.

    In JES3, the only queue modification you can make is moving the data set from the HOLD queue to the WRITER queue.

    • DUNOVSNH

      For JES2, the data set selected is already on the output queue with a disposition of WRITE or KEEP, and this text unit is not specifiable.

      For JES3, this text unit removes the data set from the HOLD queue, and puts it on the WRITER queue.

    • DUNOVCLS

      For JES3, this text unit changes the SYSOUT class of the data set on the HOLD queue.

    • DUNOVSUS

      For JES3, this text unit overrides the destination of the SYSOUT data set, and can be used to route SYSOUT to another destination.

  9. Either issue the IEFSSREQ macro again for another data set, or issue the IEFSSREQ macro for a final call (the SSSOCTRL bit is set), to disassociate the program from JES.

Processing All Data Sets Together (JES3 only - update request): Your external writer performs the actions specified in the SSSO control block in all data sets matching the selection criteria in the SSSO control block, when the IEFSSREQ macro is issued with a non-zero SSSOUFLG flag byte. Individual data set names are not returned in this case.

The SSSODSN field can be zero if more than one data set matching the other selection criteria is modified. Any previously allocated single data sets must be unallocated, however, before this update request is made.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014