Controlling output destination in a JES2 network

In a network, you can route sysout data sets from any node or work station to any node or work station.

Unless overridden by the operator or directed by a destination parameter, a sysout data set is printed or punched at the submitting location. To route a sysout data set to another location, use the following:
WRITER parameter on OUTPUT JCL statement
Specifies an external writer for the sysout data set being defined.
WRITER-NAME subparameter on DD SYSOUT statement
Specifies an external writer for the sysout data set being defined.
Note: The WRITER-NAME subparameter on a DD statement overrides an OUTPUT JCL WRITER parameter.
Electronic mail and external writer processing
Processing for the WRITER ID parameter and USERID parameter for sysout data sets is different with version 4 JES2. Destination userids are not external writer IDs. Processes which select output based on WRITER ID (such as external writer programs) will use the value specified on the WRITER ID parameter when selecting sysout. Processes which select output based on DESTINATION USERID (such as TSO/E RECEIVE) will use the value specified on the DEST parameter when selecting sysout.
  • A TSO/E user can issue the TSO/E command RECEIVE and obtain electronic mail if:
    • Sysout userid matches TSO/E userid and the sysout WRITER ID is not specified.
    • Sysout userid and sysout WRITER ID match TSO/E userid.
    • Sysout userid Matches TSO/E userid and sysout WRITER ID does not match his TSO/E userid.
  • A TSO/E user cannot issue the TSO/E command RECEIVE and obtain electronic mail if:
    • Sysout WRITER ID matches TSO/E userid and sysout userid does not match his TSO/E userid.
    • Sysout WRITER ID matches TSO/E userid and sysout userid is not specified.
  • An external writer program can process sysout if:
    • Sysout WRITER ID matches external writer program name and sysout userid is not specified.
    • Sysout WRITER ID and sysout userid match external writer program name.
    • Sysout WRITER ID matches external writer program name and TSO/E userid does not.
  • An external writer program cannot process sysout if:
    • Sysout WRITER ID is not specified and external writer program name matches sysout userid.
    • Sysout WRITER ID is specified and does not match external writer program name and sysout userid matches external writer program name.
Networking considerations
On destination node for output received by NJE (including spool offload):
  • If both external writer and destination userid are specified, and both are identical, JES2 will blank out the WRITER ID field during network processing. In this case, a TSO/E user can issue a RECEIVE command and process the sysout as electronic mail. An external writer program cannot process the sysout.
  • If both external writer and destination userid are specified, and both are different, the destination userid and the WRITER ID are processed as specified in the JCL. Either a TSO/E destination userid or an external writer program can process the sysout.
  • If destination userid only is specified, external WRITER ID is not filled in. A TSO/E user can do a RECEIVE command if his userid matches the destination userid. An external writer program cannot process the sysout.
    • TSO/E user ‘CARNEY’ can receive - userid matches WRITER ID
        
      //CHRISBX   JOB...............  
      //CLW       OUTPUT DEST=DB2.CARNEY  
      //STEP1     EXEC  PGM=IEBGENER  
      //SYSPRINT  DD SYSOUT=(A,CARNEY),OUTPUT=(*.CLW)  
      The $LJ,ALL command will show this as:
        
                 DEST=CARNEY  
                    W=CARNEY  
    • TSO/E user ‘MWAI’ cannot receive - TSO/E userid does not match sysout userid (even though WRITER ID does):
        
      //EGGBERTX   JOB.............  
      //TJW        OUTPUT DEST=PLPSC.EGGBERT  
      //STEP1      EXEC PGM=.......  
      //SYSPRINT   DD SYSOUT=(A,MWAI),OUTPUT=(*.TJW)  
      The $LJ,ALL command will show this as:
        
                 DEST=EGGBERT  
                    W=MWAI  
    • TSO/E user ‘BERNER’ can receive - TSO/E userid matches in an NJE sysout case - job executes on non-local node:
        
      //BERNERX    JOB.............  
      //ROUTE      XEQ SNJMAS3  
      //DXP        OUTPUT DEST=PLPSC.BERNER  
      //STEP1      EXEC PGM=.......  
      //SYSPRINT   DD SYSOUT=(A,BERNER),OUTPUT=(*.DXP)  
      The $LJ,ALL command will show this as:
        
                 DEST=BERNER  
                    W=(none)  
      Note: External WRITER ID is discarded in NJE sysout processing.
DEST parameter on DD SYSOUT statement
Specifies the destination for the sysout data set being defined.
class subparameter in SYSOUT parameter on DD statement
Specifies the destination for the sysout data set being defined. During JES2 initialization, a destination must have been defined for the requested class.
DEST parameter on OUTPUT JCL statement
Specifies the destination for all referencing sysout data sets.
DEST parameter on /*ROUTE PRINT or PUNCH statement
Specifies the destination of a job's sysout data sets for any node or any remote work station. All sysout data sets that have no specific destination go to the destination in the /*ROUTE statement.
Note: If you send a job to execute and the job has a ROUTE PRINT RMTnnn statement or a ROUTE PRINT Unnnn statement, JES2 returns the output to RMTnnn or Unnnn at the node of origin. For JES2 to print the output at RMTnnn at the executing node, code DEST=NnnnRmmm on an OUTPUT JCL statement or sysout DD statement.
Default output destination
If the destination for a data set is stated specifically on the /*OUTPUT control statement, or the JCL OUTPUT or DD statements, the specified destination is used. However, data sets routed to a remote terminal cannot be controlled by the remote operator. Such data sets are owned by the location specified as the default for the job.

For data sets with no destination specified, the default destination is determined by the device from which the job entered the system.

In the case of an internal reader, the DEST parameter for the internal reader allocation determines the default destination. If the DEST parameter is not specified, the default destination for the output is the location at which the job was originally submitted. For example, a job submitted on NODEA can be routed to NODEB for execution; however, the output is returned to NODEA unless the DEST parameter was specified as NODEB or some other location.

Examples
  
   //DDFAR1 DD     SYSOUT=E,DEST=NYC  
  
   //DDFAR2 DD     SYSOUT=F  
  
   //OTFAR  OUTPUT DEST=NYC,COMPACT=TABCM  
   //DD1    DD     SYSOUT=E,OUTPUT=*.OTFAR  
  
   /*ROUTE  PRINT  NYC  
   //DD3    DD     SYSOUT=E  
  
   /*ROUTE  PUNCH  NYC  
   //DD4    DD     SYSOUT=P  

For the second example, output class F must be defined during JES2 initialization as having a destination, for example, a node in Los Angeles.