z/OS JES3 Customization
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


DSP Termination

z/OS JES3 Customization
SA32-1006-00

Before completing, the code in your DSP must do certain functions. The following list represents the recommended standard sequence of required tasks for the termination phase of a DSP. Use the list only as a general guide because, at times, you may omit steps or vary the sequence to reflect particular processing requirements.
  1. Issue the ACLOSE macro for all open multirecord files.
  2. Issue the JDSGET macro for the JDS. Issue the JESREAD macro for the JDAB.
  3. Update the JDS, using the JDSADD macro, for all new JDS entries. If the DSP modifies existing JDS entries, use the JDSPUT macro.
  4. Issue the JDSREL macro to release the JDS.
  5. Update the JDAB. Required accounting information, such as lines printed or cards punched, should be posted in the corresponding JDAB scheduler element fields.
  6. Issue the PUTUNIT macro to make any JES3 devices obtained using the GETUNIT macro available for allocation to other functions.
  7. Issue the LOGOUT macro to end operator communication. If a DSP has started processing, always issue the LOGOUT macro to write the JDAB, end operator communication, or both.
  8. Issue the AWRITE macro for the JDAB (if this was not done using LOGOUT). If the DSP did not update the JDAB, you can issue an ARELEASE macro instead.
  9. Free any working storage obtained by your DSP, and clean up other resources used. Your DSP must release any resources it has obtained through MVS™ or JES3 services (such as ALOAD, AGETBUF, GETMAIN, JDSGET, and so on.). Certain JES3 resources like the FCT, RQ, data CSECT, and the first DSP module that were provided on entry to the DSP are freed by JES3.
  10. Delete the JESTAE environment.
  11. Restore the contents of registers 11, 12, and 14 to what they were on entry to the DSP because JSS (job segment scheduler) depends on them. The JSS driver module, IATGRJR, then performs end-of-function processing.
  12. Return control to JSS, specifying the appropriate return code in register 15. (See Table 1 for return codes.) (This means that you should put the return code in register 15 instead of using the RC= parameter on the ARETURN macro.)
Table 1. Return Codes Passed to JSS
Code Symbol1 Meaning
0 FCTJSNRM The function is complete. The scheduler element (SE) in the JCT for this job and function is set “complete,” and this job is returned to the queue for scheduling of further functions if required.
4 FCTJSRSK The function is returned for later scheduling. The SE in the JCT for this job and function is set “not active” and “not complete,” and this job is returned to the queue in operator hold status. The operator must release the job for further processing to occur.
8 FCTJSSPR The function is returned for specialized rescheduling. For all scheduler elements except C/I, the FCT GETUNIT list for the DSP must indicate the rescheduling requirements. JSS will reschedule the DSP when the device requirements in the list can be satisfied.

The C/I scheduler element uses this return code when a dependent job control job requires the completion of another job before it can be scheduled, or when a processor is not available for a C/I catalog search (LOCATE processing). JSS reschedules the job when predecessor jobs complete, or when an eligible processor becomes available.

12 FCTJPURG The function is returned for purging. All scheduler elements in the JCT for this job for all functions except PURGE and ENABLE are set “complete,” and the job is purged from the system without any further activity.
16 FCTJSCAN The function is returned for canceling with print. The scheduler elements in the JCT for this job for all functions except ENABLE, OUTSERV, PURGE, and CBPRNT, if present, are set “complete.” This job is then returned to the queue.
20 FCTABDSP The function is returned from FAILSOFT. This occurs when FAILSOFT ends a DSP. The FCT entry for this job is removed from the FCT chain and the function is not rescheduled.
24 FCTIIRES The function is returned from the converter/interpreter (C/I) for later scheduling. This may occur when an operator decreases the C/I maximum DSP use count. The scheduler element in the JCT for this job is set “not active, not complete,” and the job is returned to the queue. JSS reschedules the DSP when a CI DSP becomes available. Only the converter/interpreter should use this return code.
1 Defined for byte FCTFLAG2 in the IATYFCT macro and for byte RQDSPRC in the IATYRSQ macro.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013