Version 4.2.6 for Mainframes
 —  Operations  —

Print File/Work File Server NATPWSV2

This document describes the print file/work file server NATPWSV2 for the RPC batch server environment under BS2000/OSD that is started via the RPC Server Front-End.

The following topics are covered:

See also Print File/Work File Server NATPWSV2 Error Messages in the Messages and Codes documentation.


Setup

The print file/work file server NATPWSV2 communicates with the RPC batch server NATFSTB2 by using the forward eventing method.

To setup the print file/work file server, perform the following steps:

PWKSTUB  BS2STUB PARMOD=31,PROGMOD=ANY,UNRES=*DBLOPT
         ADDON NAME=PWK#POOL,       NAME OF CONTROL POOL          -
               TYPE=PWK,            TYPE OF CONTROL POOL          -
               SIZE=1MB,            POOL SIZE IN MB               -
               STAT=LOCAL,          POOL STATUS IS LOCAL          -
               SCOP=GLOBAL,         SCOPE IS GLOBAL               -
               POSI=ABOVE,          POOL POSITION IS ABOVE        -
               ADDR=19,             ADDRESS IS X'1300000'         -
               PFIX=YES,            POOL ADDRESS IS FIXED         -
               ACCS=WRITE           NO POOL PROTECTION
          ADDEND

The same ADDON parameter definition (except for ADDR=) must be contained in the program BS2STUB which is linked to the front-end part of the RPC batch server.

Example of linking the print file/work file server:

/EXEC $TSOSLNK
PROG PWKSRV,FILENAM=E.NATPWSV2,LOADPT=X'1000000',XREF=YES
TRAITS RMODE=ANY,AMODE=31
INCLUDE NATPWSV2,NATURAL.NATvrs.MOD
INCLUDE PWKSTUB,USERLIB
BIND

where:

vrs stands for the current version of Natural for Mainframes and
USERLIB stands for the user-specific library.

Top of page

Operation

Data exchange between the print file/work file server and the RPC batch server takes place in the print file/work file control pool (TYPE=PWK).

Starting the Print File/Work File Server

The print file/work file server has to be started before the RPC batch server.

The RPC batch server expects the presence of an initialized print file/work file control pool. This initialization occurs when the print file/work file server is started.

A Natural RPC batch server communicates with exactly one print file/work file server and vice versa (TSN1 <=> TSN2).

All print files and work files (link names P01 to P32 and W01 to W32) to be used have to be defined by a FILE command in the print file/work file server's job control.

Example of a start job:

/.PWKSRV LOGON
/ER LST.PWKSERVER.
/STEP
/OPTION DUMP=YES
/FILE WORK.W01,LINK=W01
/FILE WORK.W02,LINK=W02 
.
.
/FILE PRINT.P01,LINK=P01
/FILE PRINT.P02,LINK=P02
.
.
/EXEC (NATPWSV2,NATURAL.NATvrs.MOD)
/LOGOFF N        

Terminating the Print File/Work File Server

The print file/work file server can be terminated by way of P1 eventing, using the program CMPEND. The event name for terminating the print file/work file server is the name of the print file/work file control pool.

Example of a print file/work file server termination procedure:

/BEGIN-PROCEDURE LOGGING COMMANDS
/ASSIGN-SYSDTA TO=*SYSCMD
/SET-JOB-STEP
/START-PROGRAM FROM-FILE=*MODULE(LIBRARY=NATURAL.NATvrs.MOD,-
/      ELEMENT=CMPEND)
PWK#POOL        <== name of the print file/work file control pool
/SET-JOB-STEP
/ASSIGN-SYSDTA TO=*PRIMARY
/EXIT-PROCEDURE

All error messages (abnormal termination of the print file/work file server) are written to SYSLST99 into the file LST.PWKSERVER.tsnn.

Top of page