To create the NATSPOOL environment, the following steps are required:
Format the data area of the spool file (Function 30.1).
Set the options of the spool file (Function 30.5).
Set the general options for the spool server (Function 30.5).
Set the system-dependent options for the spool server:
CICS options not defined in NAFPAMC parameter module (Function 30.5), or
IMS TM options not defined in NAFPARMI parameter module (Function 30.5).
Define the main objects:
user profile (Function 31.1),
logical printer (Function 31.2),
allocation (Function 31.3),
physical printers (Function 31.4).
For additional functionality, you can define objects for:
header pages (Function 31.5),
applications (Function 31.6),
clusters (Function 31.7),
NTCC tables (Function
31.8),
calendars (Function 31.9).
You can also define specific options, such as:
logging function (Function 30.5),
defaults (Function 30.5),
statistics (Function 30.5),
access authorization (Function 30.7).
Your Natural environment must include the following:
a parameter module with settings for:
NAFUPF = user-profile-name
NTPRINT (1- n), AM = NAF
FSPOOL = (DBID,FNR)
NAFSIZE = 1
the corresponding NAF modules.
When starting a Natural session, the defined user profile (parameter
NAFUPF) is read from the specified spool file (parameter
FSPOOL) and an internal cache is initialized for usage of WRITE
(rep) statements. The maximum number that can be
used for rep corresponds to the value
n defined in the
NTPRINT macro.
Example:
NTPRINT (1,3,6-11,15), AM = NAF
This allows the usage of the following statements to be executed for Natural Advanced
Facilities reports: WRITE (1), WRITE (3), WRITE (6)
to WRITE (11) and WRITE (15).
If the user profile is not found on the spool file, the access method is not initialized and a corresponding warning is issued.
After reading the user profile, the values of the referenced logical printer(s) and allocation(s) are transferred to memory. This saves I/O time during the Natural session. If you modify any of these objects, you must therefore restart your session.
Initialization is now complete and your WRITE
(rep) statements will route the data to the defined
reports.
Example:
NAFUPF = SAG00001 NTPRINT (1-3), AM = NAF FSPOOL = (6,47) NAFSIZE = 1
User profile SAG00001 is defined on the spool file and uses LPF1, LPF2, LPF3
and LPF4. After initialization, you can use the WRITE (1) to WRITE
(3) statements. A WRITE (4) statement cannot be executed due to the
maximum number 3 specified for the NTPRINT macro.
The data are routed to the spool file by using the logical printers LPF1 for WRITE
(1), LPF2 for WRITE (2) and LPF3 for WRITE (3).
To get the information the physical printer uses for printout, the allocation
(Destination/Form) assigned to the logical printer is read. After closing
the report, the specified physical printer from this allocation is used for starting the
printout.
Note
If Natural Security is installed, a user profile can be assigned by using a library or
user ID definition. This assignment is used when executing a LOGON to a
library and overwrites the information used by the Natural initialization.
The Natural programs NTEST and SPPTEST in library
SYSPOOL are sample programs which produce test reports. The resulting
reports can be listed and their contents can be displayed by using Function 10.
You can also create test reports with Function 42.