Directing SYSPRINT Output to an HFS File
Many WebSphere for z/OS customers that are used to an UNIX or NT environment are somewhat reluctant to use the facilities of SDSF (or IOF) to view the SYSPRINT output from their Application Server regions. They would much rather use a familiar editor (such as vi) in a TELNET session to view the STDOUT and STDERR streams. These streams have been redirected to SYSPRINT and it is possible to redirect them to files in the HFS for viewing using such an editor.
The JCL below for an Application Server region uses this facility. A new SET statement has been added to point to the LOGPATH directory, and the SYSPRINT DD statement has been changed to point to a file in the LOGPATH/servername directory, in this case named: was.log.d&LYYMMDD..t&LHHMMSS (that extra period (.) between the date and time variables is not a typographical error, but rather an idiosyncrasy of JCL syntax and is necessary to terminate the first variable) where &LYYMMDD will be replaced with the local date in YYMMDD format and &LHHMMSS will be replaced by the local time in HHMMSS format. Using the local date and time ensures a unique file for each instance of the Application Server region that is started. The PATHMODE subparameter sets the file mode to 775 and the PATHOPTS subparameter OWRONLY opens the file for WRITE access and the subparameter OCREAT indicates that if the file does not already exist, create it.
//TSTST1S PROC IWMSSNM='TSTST1S',PARMS='-ORBsrvname '
// SET CBCONFIG='/WebSphere390/TSDCONF'
// SET LOGPATH='/WebSphere390/logs' <----- Added to set path
// SET RELPATH='controlinfo/envfile'
//WSDAS1S EXEC PGM=BBOSR,REGION=0M,TIME=NOLIMIT,
// PARM='/ &PARMS &IWMSSNM'
//BBOENV DD PATH='&CBCONFIG/&RELPATH/&SYSPLEX/&IWMSSNM/current.env'
//CEEDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*YSPRINT DD SYSOUT=* Added the following 3 lines for SYSPRINT
//SYSPRINT DD PATHMODE=(SIRWXU,SIRWXG,SIROTH), < 775
// PATHOPTS=(OWRONLY,OCREAT), <
// PATH='&LOGPATH/TSTST1S/was.log.d&LYYMMDD..t&LHHMMSS'
In the above example, if the file specified by the SYSPRINT DD statement is created on May 2, 2003 at 1:30:35 PM, the PATH parameter will resolve to: /WebSphere390/logs/TSTST1S/was.log.d030503.t133035
which will be a unique file for this execution of this server instance.