Contents of Article


Text Margin and BOUNDS

A note about using TF/TFF and TM/TMM to format text

Using TM to Emulate the TE command on ISPF


Syntax


TM[n]

TMM / TMM

TMM is the block form of this command.


Operands


n

The column number to which the text should be flowed. The default is the panel width. If a number greater than the current maximum record length is specified, the maximum record length is used.


Description


The Text Margin line command is used to reformat a paragraph of text to fit within a certain column range. A "paragraph" is a group of lines starting with the TM command and ending at the next blank line or the end of the file. The paragraph is made to fit into the margin by breaking it apart into "words" and reassembling the paragraph.


Text Margin is similar to Text Flow (TF) except that the way it interacts with BOUNDS is different; see the discussion below.


TM honors the existing text indent (normal or reverse) of the first and subsequent lines of the original paragraph.


Example:


    First line of paragraph 

Subsequent line of paragraph 

Subsequent line of paragraph 

Subsequent line of paragraph 

 

would be re-flowed with an initial indent of 4 columns, and no indent on the remaining lines, whereas


First line of paragraph 

    Subsequent line of paragraph 

    Subsequent line of paragraph 

    Subsequent line of paragraph 

 

would be re-flowed with no initial indent, and in indent of 4 columns on the remaining lines.


The formatting is done this to retain existing paragraph structure, and is ISPF compliant.


The Text Margin command uses a simplified definition of "words", one that is not based upon the Normal Characters for P'.' picture literals in the General Options dialog. Instead, a "word" is any string delimited by blanks or by the beginning or end of a line.


To flow text within a single paragraph:

    1. Type TM in the line command area of the line at which you want the text to begin flowing. If you want to specify the rightmost column position for the restructured text, type a number greater than 1 immediately after the TM command.
    2. Press Enter.
    3. The text is flowed from the beginning of that line to the end of the paragraph.



You can use Text Margin to format multiple paragraphs with a single SPFLite interaction:

    1. Type TMM in the line command area of the first line of the first paragraph at which you want the text to begin flowing. If you want to specify the rightmost column position for the restructured text, type a number greater than 1 immediately after the TMM command.
    2. Type TMM in the line command area of the last line of the last paragraph at which you want the text to begin flowing. If you want to specify the rightmost column position for the restructured text, and did not specify this in step (1) above, you can type a number greater than 1 immediately after the second TMM command here. As with all block-mode commands, it is unnecessary but possible to specify a number both places, but if this is done, they must agree.
    3. Press Enter.
    4. The text is flowed from the beginning of the first line of the first paragraph to the end of last line of the last the paragraph. The spacing between paragraphs is preserved.

 

Text Margin and BOUNDS


TM is affected by the current BOUNDS setting:


    • When BOUNDS is defined as 1 bb then TM without a n value is treated the same as if the command were specified as TMbb. When lines are reformatted into paragraphs, the right-hand margin of lines will be aligned so that they are as long as possible without the column margin exceeding a width of bb characters on any given line.


    • When BOUNDS is defined as 1 MAX then TM without a n value is treated the same as if the command were specified as TMww, where ww is the current screen width. When lines are reformatted into paragraphs, the right-hand margin of lines will be aligned so that they are as long as possible without the column margin exceeding a width of ww characters on any given line.


    • TM with a n value respects the n value. When lines are reformatted into paragraphs, the right-hand margin of lines will be aligned so that they are as long as possible without the column margin exceeding a width of n characters on any given line. The current contents of the BOUNDS value is ignored when an n value is present on the TM command.


Regardless of any bounds values in effect, TM/TMM will place its results between column 1 and the right-most margin column as determined above, even if the current left bound of any BOUNDS command in effect would be incompatible with this understanding.


It is important to note that TM will inquire as to the state of BOUNDS at the time, but the results it produces are not restricted to the BOUNDS column range in effect at the time. In particular, regardless of the current BOUNDS setting, you will not get an error message similar to "TF right bound specified, but global BNDS are set. TF abandoned" that can sometimes occur with Text Flow.


See TF / TFF - Text-Flow a Paragraph and Word Processing Support for more information.


A note about using TF/TFF and TM/TMM to format text


The Text Flow command TF/TFF and the Text Margin command TM/TMM use a simplified definition of "words". A "word" is any string delimited by blanks or by the beginning or end of a line. It is not necessary to change the definition of the WORD string or the Normal Characters string for these commands to work correctly.


Using TM to Emulate the TE command on ISPF


IBM ISPF contains the line command TE for Text Entry, a feature not supported in SPFLite. The IBM TE command was an attempt to perform a type of "word processing" on 3270-style terminals, which were not really well-suited for this task. On Windows, a comparable editing task would be to take free-form text (from an editor such as NotePad) that "wraps" from one line to the next, and convert it to discrete lines in the SPFLite editor. While there are probably several ways to accomplish this, here is a method that is likely to be the easiest and fastest way to go about doing it:


    • In a character-mode editor such as NotePad, open an existing text file, or type the lines you need. 
    • If you wish, feel free to allow these lines of text to wrap from one line to the next without pressing Enter.
    • Highlight (text-select) the desired lines, and press Ctrl-C to copy them into the Windows clipboard.
    • In SPFLite, use an A line command, and the PASTE primary command, to paste the text data into your edit file.
    • Use a TMM block to set the text margins of the lines you just pasted in, to some length (say, 80). This will reformat the block to a maximum length of 80 characters, splitting lines as needed and gluing others together.


Note: A convenient way to use the A line command and the PASTE primary command is to map Alt-V to the following key mapping definition:


       (saveCursor)(LineNo)[a](home)[paste](Enter)(restoreCursor)


Then, put your cursor on the line after which you want the text pasted in, and press Alt-V.


If you didn't want to go outside of SPFLite, you could simply create a bunch of temporary or permanent blank lines, enter your data, and use TMM to reformat them. This will accomplish basically the same thing, but will take more steps, because you will have to have several SPFLite interactions to create an "opening" in the file in which to put your initially-entered text before it gets reformatted.


Created with the Personal Edition of HelpNDoc: Experience the Power and Ease of Use of a Help Authoring Tool