FORMCHAR - Basic Teradata Query

Basic Teradata Query Reference

Product
Basic Teradata Query
Release Number
15.00
Language
English (United States)
Last Update
2018-09-25
dita:id
B035-2414
lifecycle
previous
Product Category
Teradata Tools and Utilities

FORMCHAR

Purpose  

Provides format control for printing reports. The command has four options: ON, OFF, DEFAULT or any HEX sequence that a printer translates into a printer escape sequence (for example, "0C"XB or '0c'xb).

Syntax  

where:

  • OFF = initial default for workstation-attached systems
  • DEFAULT = initial default for mainframe-attached systems
  • Usage Notes  

    Use the FORMCHAR command to specify form feed characters for printing reports. With the FORMCHAR set to ON, BTEQ sends a form-feed character to the mainframe printer and puts a single-byte “1” character in column one. For the FORMCHAR setting to be effective, the FORMAT setting must be set to ON as well. See the examples shown below.

    Certain printers accept only a special numeric sequence in HEX to produce a form feed at the end of a page. When entering the HEX sequence, either uppercase or lowercase characters are valid. If used, the HEX sequence must be less than or equal to ten HEX characters. Note that when choosing this option, the character sets are implementation-dependent.

    If no option is entered, or if an invalid option is entered, the value of FORMCHAR is reset to its initial default value.

    The following commands are affected by the FORMCHAR command:

  • SHOW CONTROLS
  • HELP BTEQ
  • FORMAT
  • The FORMCHAR setting only affects the output for Field Mode, not Record Mode, Indicator Mode, or Multipart Indicator Mode.

    The FORMCHAR command is valid in a Teradata SQL macro.

    Example  

    To specify form feed ON for a workstation-attached system, enter the following commands:

       .SET FORMAT ON
       .SET FORMCHAR ON

    Example  

    Specify the command for HEX as follows:

       .SET FORMAT ON
       .SET FORMCHAR "0C"xb

    Example  

    The Example 2 FORMCHAR command in a Teradata SQL macro appears in the following format:

       ECHO '.SET FORMCHAR  "0C"xb' ;

    Example  

    To enter the default for mainframe-attached operating systems, enter the following commands:

       .help bteq
       .show controls
       .set formchar 'e7'xb
       .show controls
       .set formchar default
       .show controls