FORMCHAR Command | Basic Teradata Query - FORMCHAR (FC) - Basic Teradata Query

Basic Teradata® Query Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Basic Teradata Query
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2025-04-02
dita:mapPath
gxl1691484661681.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
psp1479308573013
Product Category
Teradata Tools and Utilities

Purpose

This control enables users to specify the HEX numeric escape sequence to be used instead of a form-feed character, when 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





Shorthand Syntax (Interactive Mode Only)
Command Shorthand
FORMCHAR FC
Option Shorthand
DEFAULT D

where the following is true:

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 following examples.

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.

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
  • FORMAT

The FORMCHAR setting only affects the output for Field Mode, not Record Mode, Indicator Mode, or Multipart Indicator Mode.

The DEFAULTS command resets FORMCHAR setting to its initial default.

The FORMCHAR command is valid in an SQL macro.

Example 1 – FORMCHAR

Specify form feed ON for a workstation-attached system as follows:

.SET FORMAT ON
.SET FORMCHAR ON

Example 2 – FORMCHAR instigated by a macro

The FORMCHAR command in an SQL macro appears as follows:

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

Example 3 – FORMCHAR

Enter the default for mainframe-attached operating systems as follows:

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