This documentcovers the following topics:
Natural batch jobs can store reports on the spool file.
To do so, specify
FSPOOL=(nnnnn,fffff)
and the printers to be used by Natural Advanced Facilities with either the
NTPRINT
macro or the PRINT
parameter (see the Natural
Parameter Reference documentation).
The reports can subsequently be routed by the operator to remote terminal printers in the same way as those produced by online Natural applications.
In order to use NATSPOOL
in batch mode, the
NATSPOOL
nucleus NAFNUC
must be link-edited to the
Natural batch module.
The value of *USER
is taken as the Sending
User ID.
Batch jobs creating reports on the spool file can be submitted offline
or online by using the Natural Remote Job Entry function
NATRJE
described in the
Natural Utilities documentation. In this way it is
possible to build online Natural applications which transfer time-consuming
operations to batch jobs, which in turn spool the output back to the online
Natural environment.
You can use the following z/OS sample JCL to store reports on the spool file in batch mode:
//TEST JOB NATSPOOL,CLASS=G,MSGCLASS=X //BATCH EXEC PGM=NATBATCH,PARM='PRINT=((1),AM=STD),PRINT=((2),AM=NAF)' //STEPLIB DD DSN=NATURAL.NAF.LOAD,DISP=SHR // DD DSN=ADABAS.LOAD,DISP=SHR //DDCARD DD DSN=NATURAL.SOURCE(ADAPARM),DISP=SHR //CMPRINT DD SYSOUT=X //CMPRT01 DD SYSOUT=X //CMSYNIN DD * LOGON TEST CREATE WRITE (1) 'This report is for CMPRT01' WRITE (2) 'This report is for NATSPOOL' END RUN FIN /*
You can use the following z/VSE sample JCL to store reports on the spool file in batch mode:
// JOB TEST // OPTION LOG // EXEC PROC=NAFLIB // EXEC PROC=ADALIB // LIBDEF PHASE,SEARCH=(SAGLIB.NAFvrs),TEMP // ASSGN SYS010,00E // ASSGN SYS000,READER // EXEC NATBATCH,SIZE=NATBATCH,PARM='SYSRDR' PRINT=((1),AM=STD,SYSNR=10,LRECL=133) PRINT=((2),AM=NAF) /* ADARUN /* LOGON TEST CREATE WRITE (1) 'This report is for CMPRT01' WRITE (2) 'This report is for NATSPOOL' END RUN FIN /*
You can use the following BS2000 sample JCL to store reports on the spool file in batch mode:
/LOGON /FILE LI.PRINTFILE.1,LINK=P01 /EXEC NATBATCH LOGON TEST CREATE WRITE (1) 'THIS REPORT IS FOR PRINTFILE 1' WRITE (2) 'THIS REPORT IS FOR NATSPOOL' END RUN FIN /LOGOFF
The NATSPOOL
spool server under CICS or IMS TM is not
started by batch jobs. This means that in general, reports created in batch
mode are not printed automatically on CICS or IMS TM terminal printers.
However, if the spool server is already active, reports that are created in
batch mode are also printed if they have the same Destination/Form
as the report which has ONPR
status.
If the spool file is an Adabas file, NATSPOOL
can be
invoked under CICS or IMS TM and in batch mode concurrently.
Note:
For CICS usage: If the spool file is a VSAM dataset, creation of
reports in batch mode is only possible if control has not been given to CICS
that is, CICS has not opened the spool file for update. This restriction is due
to VSAM provisions for controlling data sharing in a single-system environment
(SHARE OPTION
).
The spool server must be active during a batch run. When a Natural
program which creates a report is started, the report is written to the spool
file, the spool server is activated, and the report is printed.
NATSPOOL
operates in batch mode the same way as it operates
online.