H

Places a text string in the active output buffer.

Syntax

Htext-string

Syntax Elements

text-string is the text to be placed in the active output buffer.

text-string can be either a literal (not enclosed in quotes), a direct or indirect reference to a buffer or select register that contains the character string, or a SYSTEM function.

Quotes can be used in the character string but they will be part of the string and everything within the quotes will be considered as a single attribute.

Operation

The H command places a text string in the active output buffer. Placing text in the active output buffer with the H command lets you execute any TCL command as if it had been executed from TCL.

On starting a Proc, the Primary Output Buffer is selected as the active output buffer. Executing the STON (Stack On) command selects the Secondary Output Buffer as active. Executing STOFF (Stack Off) selects the Primary Output Buffer as active again. The P command executes any command built in the Primary Output Buffer (and subsequently any built in the Secondary Output Buffer), empties the buffers and turns the stack off.

Refer to command descriptions P, STON and STOFF for further related information.

Placing Text into the Primary Output Buffer

If the text is placed in the primary output buffer, attribute marks are replaced with blanks and RETURN is supplied automatically, prior to processing the TCL command.

A series of one or more blanks (including leading and trailing blanks) is replaced with a single attribute mark. Blanks within quote marks are retained and everything within the quotes is taken as a single attribute. The text is then moved into the primary output buffer, starting at the current location of the buffer pointer.

Because leading blanks are replaced with an attribute mark, you can construct H commands to create separate parameters or to concatenate a string to an existing parameter.

Note that any TCL command that accepts the (P) option can be executed from within a Proc to produce the same result.

The buffer pointer is positioned at the end of the primary output buffer, after the last character in the moved text.

Placing Text into the Secondary Output Buffer

If the text string is placed in the secondary output buffer, each line of text is terminated by typing a less than character (<) that represents a RETURN. A RETURN is not supplied automatically to text in the secondary output buffer as it is to text in the primary output buffer.

A series of one or more blanks (including leading and trailing blanks) is replaced with a single attribute mark. The text is then moved into the secondary output buffer, starting at the current location of the buffer pointer. Attribute marks are replaced with blanks prior to processing the secondary output buffer.

The buffer pointer is positioned at the end of the secondary output buffer, after the last character in the moved text.

Text that will result in a string in excess of 140 characters must be made up of stacked strings of less than 140 characters joined by the stack continuation character. Two less-than signs (<<) represent the stack continuation character.

Blanks cannot follow these characters in the string to be moved - they will be loaded as text characters instead of stack continuation characters.

Example 1

Command

POB Before

POB After

HED


ED
 

H CUST

ED
 

ED^CUST
      

H 123

ED^CUST
      

ED^CUST^123
          

H-ABC

ED^CUST^123
          

ED^CUST^123-ABC
              

H  (Z)

ED^CUST^123-ABC
              

ED^CUST^123-ABC^(Z)
                  

Example 2

012 HLIST ONLY
013 H MD

This example loads the following text into the primary output buffer:

LIST^ONLY^MD

Note that the space between ONLY and MD was preserved, and MD is identified as a separate parameter.

Example 3

HTIME
P

This example displays the current time and date on the terminal.

Example 4

024 HLIST INV ID-
025 HSUPP QTY

This example loads the following text into the primary output buffer:

LIST^INV^ID-SUPP^QTY

Note that there is no space between ID- and SUPP and that ID-SUPP is one parameter. This example also presupposes that there are no trailing blanks after ID-.

Example 5

Command

SOB Before

SOB After

HG2<


G2<
  

HR2<

G2<
  

G2<R2<
     

H123 MAIN

G2<R2<
     

G2<R2<123^MAIN
             

H ST.<

G2<R2<123^MAIN
             

G2<R2<123^MAIN^ST.<
                  

HIR

G2<R2<123^MAIN^ST.<
                  

G2<R2<123^MAIN^ST.<IR
                    

HVINE<

G2<R2<123^MAIN^ST.<IR
                    

G2<R2<123^MAIN^ST.<IRVINE<