NAF - NTCC Table - Function 31.8

An NTCC table contains printer-specific control information that is used during printing.

This document covers the following topics:


Invoking NTCC Table

When you invoke this function, the NTCC Table window appears:

Time 15:06:07        *** Natural Spool Administration ***      Date 2002-10-21 
User SAG                            M e n u                    File 7/411      
                                      +----------- NTCC Table 7/411 -----------+
       Administration                 !                                        !
                                      !  Enter name of                         !
       10 Reports/Queues              !                                        !
       11 Devices                     !       NTCC Table                       !
       12 Abstracts                   !                                        !
       13 Applications                !  or                                    !
       14 Change Spool File           !                                        !
                                      !      *    for Selection                !
                                      !                                        !
       Maintenance                    !      ?    for Help                     !
                                      !                                        !
       30 Spool File Properties       !      .    for End                      !
       31 Objects                     !                                        !
       32 Mass Update                 !      -------------------------         !
       33 Hardcopy Allocations        !      / ________ /                      !
       34 Transfer Objects            !                                        !
                                      +----------------------------------------+
 Enter values.                                                                  
 Command ===>                                                                   
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Menu  Exit  User  Logic Alloc Print Heade Appli Clust NTCC  Canc

In this window, you can specify the name of an existing NTCC table, select an NTCC table from a list of NTCC tables available or add a new NTCC table to the spool file.

Selecting an NTCC Table from a List

To select an NTCC table from a list, enter one of the following:

  • a partly-qualified name (e.g. T* to list all NTCC tables starting alphabetically from T),

  • an asterisk (*) to list all NTCC tables in the NATSPOOL system.

A list of NTCC tables is then shown in a window.

Time 15:06:45        *** Natural Spool Administration ***      Date 2002-10-21 
User SAG                            M e n u                    File 7/411      
                                      +-------------Select with *--------------+
       Administration                 !  New start value ......... _________   !
                                      !  -----------------------------------   !
       10 Reports/Queues              !  Fl Cm  Name        Fl Cm  Name        !
       11 Devices                     !  -- --  ---------   -- --  ---------   !
       12 Abstracts                   !      _  NAF             _  TEST1       !
       13 Applications                !                                        !
       14 Change Spool File           !                                        !
                                      !                                        !
                                      !                                        !
       Maintenance                    !                                        !
                                      !                                        !
       30 Spool File Properties       !                                        !
       31 Objects                     !                                        !
       32 Mass Update                 !                                        !
       33 Hardcopy Allocations        !                                        !
       34 Transfer Objects            !                                        !
                                      +----------------------------------------+
 Mark on selection list.                                                        
 Command ===>                                                                   
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Menu  Exit                     --                           Canc   

P in the Fl (flag) column indicates that the NTCC table has been protected by its owner.

In the Cm column, you can enter one of the following codes:

Code Description
C Copy NTCC table.
D Delete NTCC table.
R Rename NTCC table.
. Exit function.
X or any other character Display NTCC table for modification or deletion, see below.

Maintaining an NTCC Table

If the specified NTCC table exists, it is displayed. You can modify the individual parameters or delete the whole NTCC table.

Note:
If you specify a name that does not yet exist, you can add a new NTCC table. In this case, the Delete option is not provided in the window.

Time 15:07:41        *** Natural Spool Administration ***      Date 2002-10-21 
User SAG                            M e n u                    File 7/411      
                                      +-------------- NTCC Table --------------+
       Administration                 !  Modify                TESTPROF        !
                                      !  Delete (Y/N)          N               !
       10 Reports/Queues              !  ------------------------------------- !
       11 Devices                     !  Owner (Y/N) .................. N      !
       12 Abstracts                   !  ------------------------------------- !
       13 Applications                !  Maintenance                           !
       14 Change Spool File           ! - user-defined attributes (Y/N) N      !
                                      ! - conversion table (Y/N)        N      !
                                      !                                        !
       Maintenance                    !  Notes                                 !
                                      !  ________________________________      !
       30 Spool File Properties       !  ________________________________      !
       31 Objects                     !  ------------------------------------- !
       32 Mass Update                 !  Enter  Printer Type                   !
       33 Hardcopy Allocations        !  * for selection or                    !
       34 Transfer Objects            !  . for exit function  ________         !
                                      +----------------------------------------+
 Modify values, or press a PF-key.                                              
 Command ===>                                                                   
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Menu  Exit                                                  Canc

For each NTCC table, you can define different printer types. For each printer type, you can define standard attributes and/or user-defined attributes.

In the window above, you can specify the following:

You can also enter an asterisk (*) to select an existing printer type from a list. In the Cm column of the resulting window, you can then enter one of the following codes:

Code Description
C Copy printer type.
D Delete printer type.
R Rename printer type.
. Exit function.
X or any other character Display printer type for modification or deletion.

Maintaining User-Defined Attributes for All Printer Types

User-defined attributes are freely defined strings that can be up to 10 bytes long. While printing, these strings are replaced with printer-specific control sequences.

When you specify Y to add or delete user-defined attributes that are valid for all printer types defined in the current NTCC table, the following screen appears:

Time 10:29:26        *** Natural Spool Administration ***      Date 2002-10-21
User SAG                            M e n u                    File 7/411
    +------------User defined attributes for  NTCC Table : TESTPROF-------------+
    !  _ #DEV#_____   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    !  _ __________   _ __________   _ __________   _ __________   _ __________ !
    +---------------------------------------------------------------------------+
  Mark with function or press PF key
  Command ===>
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Menu  Exit                                                  Canc

You can define up to 60 user-defined attributes.

In the example above, #DEV# was defined as a user-defined attribute.

You can mark an attribute with one of the following codes:

Code Description
D Delete user-defined attribute.
. Exit function.
X or any other character Add/modify a note for this attribute in a window.

Maintaining a Conversion Table

With the option Conversion Table, you can convert hexadecimal values by using the internal NAF conversion table.

If you choose this option, a screen similiar to the one below appears:

Time 10:36:46        *** Natural Spool Administration ***      Date 2002-10-22 
User SAG                  Conversion Table for TESTPROF        File 7/411      
                                                                                
        0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F           
     0  40  01  02  03  04  05  06  07  08  09  0A  0B  0C0D 0E  0F          
     1  10  11  12  13  14  15 16  17  18  19  1A  1B  1C  1D  1E  1F          
     2  20  21  22  23  24  25  26  27  28  29  2A  2B  2C  2D  2E  2F          
     3  30  31  32  33  34  35  36  37  38  39  3A  3B  3C  3D  3E  3F          
     4  40  41  42  43  44  45  46  47  48  49  4A  4B  4C  4D  4E  4F          
     5  50  51  52  53  54  55  56  57  58  59  5A  5B  5C  5D  5E  5F          
     6  60  61  62  63  64  65  66  67  68  69  6A  6B  6C  6D  6E  6F          
     7  70  71  72  73  74  75  76  77  78  79  7A  7B  7C  7D  7E  7F          
     8  80  81  82  83  84  85  86  87  88  89  8A  8B  8C  8D  8E  8F          
     9  90  91  92  93  94  95  96  97  98  99  9A  9B  9C  9D  9E  9F          
     A  A0  A1  A2  A3  A4  A5  A6  A7  A8  A9  AA  AB  AC  AD  AE  AF          
     B  B0  B1  B2  B3  B4  B5  B6  B7  B8  B9  BA  BB  BC  BD  BE  BF          
     C  C0  C1  C2  C3  C4  C5  C6  C7  C8  C9  CA  CB  CC  CD  CE  CF          
     D  D0  D1  D2  D3  D4  D5  D6  D7  D8  D9  DA  DB  DC  DD  DE  DF          
     E  E0  E1  E2  E3  E4  E5  E6  E7  E8  E9  EA  EB  EC  ED  EE  EF          
     F  F0  F1  F2  F3  F4  F5  F6  F7  F8  F9  FA  FB  FC  FD  FE  FF          
 Modify values.                                                                 
 Command ===>                                                                   
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Menu  Exit  Reset                                           Canc 

In the example above, the hexadecimal value 00 has been replaced by the hexadecimal value 40 in all lines of the report. You can specify a conversion table for an entire NTCC table, but also for further table specifications in order to define a special printer type. The table defining the printer type is then processed before the entire NTCC table.

Note:
The spool server interprets the hexadecimal values 0C, 0D and 15 as form feed, carriage return and line feed respectively. You cannot define any substitutes for these values. You can use these values for replacing other values. However, this can lead to undesirable side effects, such as unintended form feeds or line feeds.

Maintaining a Printer Type

If the specified printer type exists, it is displayed. You can modify the individual parameters or delete the whole printer type.

Note:
If you specify a name that does not yet exist, you can add a new printer type. In this case, the Delete option is not provided in the window.

Time 15:11:52        *** Natural Spool Administration ***      Date 2002-10-21 
User SAG                            M e n u                    File 7/411      
                                      +-------------- NTCC Table --------------+
       Administration                 !  Modify                 TESTPROF       !
                                      !  Printer Type           PTYPE          !
       10 Reports/Queues              !  Delete (Y/N)                  N       !
       11 Devices                     !  ----------------------------------    !
       12 Abstracts                   !  Replacement for ESCAPE (H'27')   #    !
       13 Applications                !                                        !
       14 Change Spool File           !  Notes                                 !
                                      !  ________________________________      !
                                      !  ________________________________      !
       Maintenance                    !  ----------------------------------    !
                                      !  Maintenance functions                 !
       30 Spool File Properties       !  Standard attributes  ........... _    !
       31 Objects                     !  User-defined attributes  ....... _    !
       32 Mass Update                 !  Conversion table ............... _    !
       33 Hardcopy Allocations        !                                        !
       34 Transfer Objects            !  Save and exit function ......... _    !
                                      +----------------------------------------+
 Modify values, or press a PF-key.                                              
 Command ===>                                                                   
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Menu  Exit                                                  Canc

You can specify the following:

  • A replacement character for the escape character (H'27') which normally indicates a control sequence. This is helpful, since escape characters often corrupt a screen.

  • Whether you want to define, modify or delete standard attributes for the current printer type. See below.

  • Whether you want to modify the user-defined attributes for the current printer type.

  • Whether you want to modify the conversion table for hexadecimal values that is valid for the current printer type.

Below is information on:

Maintaining Standard Attributes

The standard attributes are the Natural attributes AD, BX, CD, OPEN and CLOSE.

The OPEN information is processed before the report is printed. It can consist of either text or control sequences (for example, to switch to landscape format). The CLOSE information is processed after the report has been printed and can also consist of text or control sequences.

When you choose to maintain the standard attributes that are valid for the current printer type, the following screen appears:

Time 10:29:26        *** Natural Spool Administration ***      Date 2002-10-21
User SAG                            M e n u                    File 7/411
                                       +--------- Standard Attributes ----------+
        Administration                 !                                        !
                                       !                                        !
        10 Reports / Queues            !    _  AD=U  +         _  AD=C          !
        11 Devices                     !    _  AD=I            _  AD=V          !
        12 Abstracts                   !                                        !
        13 Applications                !    _  BX=L            _  BX=T          !
        14 Change Spool File           !    _  BX=R            _  BX=B          !
                                       !                                        !
        Maintenance                    !    _  CD=NE           _  CD=YE         !
                                       !    _  CD=TU           _  CD=GR         !
        30 Spool File Properties       !    _  CD=PI           _  CD=RE         !
        31 Objects                     !    _  CD=BL                            !
        32 Mass Update                 !                                        !
        33 Hardcopy Allocations        !    _  OPEN  +         _  CLOSE         !
        34 Transfer Objects            !                                        !
                                       !                                        !
                                       +----------------------------------------+
  Mark with function or press PF key
  Command ===>
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Menu  Exit                                                  Canc

This screen contains all available attributes. A plus (+) sign next to an attribute indicates that an attribute definition has already been provided.

You can mark an attribute with one of the following codes:

Code Description
D Delete attribute definition.
X or any other character Display attribute definition for modification, see below.

Maintaining Standard Attribute Definitions

When you mark a standard attribute definition for modification or deletion, the following screen appears:

Time 11:03:29        *** Natural Spool Administration ***      Date 2002-10-21   
User SAG                   Standard Attributes AD=U            File 7/411        
                                                                                 
   Attribute P2UL       NTCC Table TESTPROF Printer Type PTYPE1          Save _   
   Replace character for ESCAPE #                                                
   Hexadecimal Format          On Sequence :<U:       Alphanumeric Format        
   -------------------------------------------------- -------------------------  
   27110000000000000000000000000000000000000000000000 #?_______________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   Hexadecimal Format         Off Sequence :U>:       Alphanumeric Format        
   -------------------------------------------------- -------------------------  
   27910000000000000000000000000000000000000000000000 #j_______________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   00000000000000000000000000000000000000000000000000 _________________________  
   00000000000000000000000000000000000000000000000000 _________________________  
  Notes ...... ________________________________________________________________  
  Mark with function or press PF key                                      
  Command===>                                                                    
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Menu  Exit                                                  Ca 

The internal attribute name for the standard attribute is shown. In the example above, the internal name for AD=U (underscoring) is P2UL. The corresponding internal On and Off sequences are :<U: and :>U:.

The following table lists the Natural attributes and the corresponding internal On and Off sequences.

Natural Attribute On Sequence Off Sequence
AD=U :<U: :U>:
AD=C :<C: :C>:
AD=I :<I: :I>:
AD=V :<V: :V>:
BX=L :<BL: :BL>:
BX=T :<BT: :BT>:
BX=R :<BR: :BR>:
BX=B :<BB: :BB>:
CD=NE :<N: :N>:
CD=YE :<Y: :Y>:
CD=TU :<T: :T>:
CD=GR :<G: :G>:
CD=PI :<P: :P>:
CD=RE :<R: :R>:
CD=BL :<B: :B>:

The replacement character for the escape character (H'27') that has been defined for the example above is a hash (#)

In the example above, the hexadecimal value 2711 is defined as the On sequence. This is the string which replaces the AD=U attribute when underscoring is switched on. As the Off sequence, the hexadecimal value 2791 is defined. This is the string which replaces the AD=U attribute when underscoring is switched off.

When you mark the OPEN or CLOSE attribute, the resulting screen is slightly different:

Time 15:35:18        *** Natural Spool Administration ***      Date 2002-10-21
User SAG                      Standard Attribute               File 7/411  
  
  
   Attribute OPEN       NTCC Table TESTPROF  Printer Type PTYPE1      Save _
   Replace character for ESCAPE #
  
   Hexadecimal Format                                 Alphanumeric Format
   -------------------------------------------------- -------------------------
   C995A596898385000000000000000000000000000000000000 Invoice__________________
   00000000000000000000000000000000000000000000000000 _________________________
   00000000000000000000000000000000000000000000000000 _________________________
   00000000000000000000000000000000000000000000000000 _________________________
   00000000000000000000000000000000000000000000000000 _________________________
  
   OPEN       to be used as control sequence _
   OPEN       to be used as text information *
  
  Notes ...... ________________________________________________________________
  
  Mark with function or press PF key
  Command===>
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Menu  Exit                                                  Canc

For the OPEN and CLOSE attributes, you can specify the following:

  • A hexadecimal or alphanumeric value for a control sequence, or text that is to be used before (OPEN) or after (CLOSE) a report is printed.

  • Whether the OPEN or CLOSE attribute is to be used as control sequence or text information. You can only mark one of the two options.

To save the new definition, mark the Save field.

Maintaining User-Defined Attributes for Current Printer Type

When you choose to maintain the user-defined attributes that are valid for the current printer type, the following screen appears:

Time 11:04:56        *** Natural Spool Administration ***      Date 2002-10-21
User SAG                            M e n u                    File 7/411
               +---User defined attributes for  NTCC Table TESTPROF / PTYPE1----+
        Admini !  _ #DEV#                                                       !
               !                                                                !
        10 Rep !                                                                !
        11 Dev !                                                                !
        12 Abs !                                                                !
        13 App !                                                                !
        14 Cha !                                                                !
               !                                                                !
        Mainte !                                                                !
               !                                                                !
        30 Spo !                                                                !
        31 Obj !                                                                !
        32 Mas !                                                                !
        33 Har !                                                                !
        34 Tra !                                                                !
               !                                                                !
               +----------------------------------------------------------------+
  Modify values or press PF-Key.
  Command ===>
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Menu  Exit                                                  Canc

In the example above, #DEV# was defined as a user-defined attribute. This attribute was defined for all printer types in the NTCC table.

You can mark an attribute with one of the following codes:

Code Description
D Delete attribute definition.
X or any other character Display attribute definition for modification, see below.

When you mark an attribute and press Enter, the following screen appears and you can modify the attribute definition for the current printer type.

Time 11:05:41        *** Natural Spool Administration ***      Date 2002-10-21
User SAG                      User-defined Attribute           File 7/411 
  
  
   Attribute #DEV#        NTCC Table TESTPROF  Printer Type PTYPE1        Save 
  _
  
   Replace Character for ESCAPE  #
  
   Hexadecimal Format                                 Alphanumeric Format
   -------------------------------------------------- -------------------------
   D3C1E2C5D940F1000000000000000000000000000000000000 LASER 1__________________
   00000000000000000000000000000000000000000000000000 _________________________
   00000000000000000000000000000000000000000000000000 _________________________
   00000000000000000000000000000000000000000000000000 _________________________
   00000000000000000000000000000000000000000000000000 _________________________
  
  
  
  Notes ...... Replacement for #DEV# for all printers with type PTYPE1
 
  
  Command===>
  Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
        Help  Menu  Exit                                                  Canc

In the example above, the alphanumeric value LASER 1 was defined. While printing, the attribute #DEV# will be replaced with LASER 1.

Example:

This example explains how NTCC tables and reports work together.

The NTCC table TESTPROF contains the user-defined attribute #DEV# and printer types PTYPE1 and PTYPE2. For these printer types, the following definitions apply:

  • PTYPE1: the user-defined attribute #DEV# will be replaced with LASER 1. The standard attribute AD=U will be replaced with the On sequence H'2711' and the Off sequence H'2791'. For the standard attribute OPEN, the text information "Invoice" was defined.

  • PTYPE2: the user-defined attribute #DEV# will be replaced with INK 2. The standard attribute AD=U will be replaced with the On sequence H'2714' and the Off sequence H'2794'.

There is a DEFINE PRINTER statement with the PROFILE parameter set to TESTPROF. Using the allocation DEST/A, this logical printer refers to the physical printers PRINTER1 and PRINTER2. For these physical printers, the following applies:

  • For PRINTER1, PTYPE1 is defined as the printer type.

  • For PRINTER2, PTYPE2 is defined as the printer type.

The WRITE statement contains the following:

'The' 'report' (AD=U) 'is printed on #DEV#'

This creates a report for the logical printer containing the following line:

The :U<:report:>U: is printed on #DEV#

When the report is output on the physical printer PRINTER1, the spool server recognizes the connection between the NTCC table TESTPROF (of the DEFINE PRINTER statement) and the printer type PTYPE1 (of the physical printer). The line above is then rendered as follows:

The H'2711'reportH'2791' is printed on LASER 1

which results in the following output:

Invoice
The report is printed on LASER 1

When the same report is output on PRINTER2, the line above is rendered as follows:

The H'2714'totalH'2794' is printed on INK 2

which results in the following output:

The report is printed on INK 2

Restrictions

If a report is created using an NTCC table defined in the NTCCTAB of the Natural parameter module, printer-specific replacement is not done by Natural Advanced Facilities. Replacement then occurs, as usual, when the report is created.

When the replacement is done by Natural Advanced Facilities and the required NTCC table with a printer type definition does not exist, the report cannot be printed and its status is set to MINT (missing NTCC table).

The assignment of the NTCC table of Natural Advanced Facilities can only be done dynamically by using the DEFINE PRINTER statement (PROFILE clause).