Glue Command [G]

Joins a line with one or more following lines, either concatenated or at specified tab positions. Use Glue to turn a list of fields into a single record-oriented line. See also GG in Visual mode. For the opposite of Glue, see the Divide command.

GLUE [ ( columnlist ) ] [ rangelist ]

(Defaults: columnlist = ], rangelist = */*+n)

The columnlist is a list of ascending column numbers in parentheses such as (10 20 30), or ( ] ) for “after the end-of-line”, which is the default.

The rangelist specifies which lines to combine. The default rangelist is the current line plus n. When you specify a range of lines, Glue joins the lines in “pairs”.

Examples

  /glue              {joins *+1 to *}  /gluej             {joins *+1 to * with space between}  /glue;glue         {join *+1 and *+2 to *}  /glue (10) all     {joins lines in "pairs" at column 10}  /glue (10 20 30)   {joins 4 lines into 1 record}  /glue "string"     {glue "string" lines to lines that follow}  

Notes

If there are not enough lines at the end of a rangelist to fill in each column of the list, Glue does not go beyond the rangelist. If there is not enough room to move all of the characters into the line, as many characters as will fit are moved, the following line is not deleted, and Qedit prints an “overflow” warning.

After a Glue command, the current line is the line last spliced together. To suppress printing of the spliced lines, use GlueQ.

If you don’t specify a list of column fields, Glue removes leading spaces from the following lines before moving them. To insert a single space between them, use GlueJ instead. If you do specify columnar fields, Glue treats spaces as valid data and moves them intact. If you specify more than one field, some nonblank data may be overwritten if the columns are too close together or the lines to be glued are too long. You can always use Undo to cancel a Glue command.

The QEDITCOUNT JCW is updated with the number of lines resulting, rather than the original number of lines that were affected.

If Left or Right margins have been Set, only the text within the margins is copied and the following lines are not deleted.

When editing COBOLX files, the tag area (columns 73 to 80) is not considered part of the data. This means that the tag string on the next line is not moved to the new line. It also means you cannot glue to columns passed 73.

Glue Command [G]