Version 4.2.6 for Mainframes (Update)
 —  Natural Advanced Facilities  —

NAF - NATSPOOL Initialization

To create the NATSPOOL environment, the following steps are required:

  1. Format the data area of the spool file (Function 30.1).

  2. Set the options of the spool file (Function 30.5).

  3. Set the general options for the spool server (Function 30.5).

  4. Set the system-dependent options for the spool server:

  5. Define the main objects:

  6. For additional functionality, you can define objects for:

  7. You can also define specific options, such as:

Your Natural environment must include the following:

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.

Top of page