E_SECT

Place text into a section of the display screen

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall E_SECT(text[, text_flag, ...]) 

text

Text to display. (a)

text_flag

(optional) One or more (up to six) of the following text flags: (n)

D_HEADER

Reference the header section.

D_CAPTION

Reference a Microsoft Windows caption.

D_FOOTER

Reference the footer section.

D_INFO

Reference the information line. (default)

D_POSITION, row, col

Specify the text’s position by row and column.

D_NOCLEAR

Don’t clear the line of text.

D_CLEAR

Clear entire line of text. (default)

D_CLREOL

Clear to end of line.

D_CLRBOL

Clear to beginning of line.

D_DISPLAY

Display after last text. (default)

D_LEFT

Left-justify the text.

D_CENTER

Center the text.

D_RIGHT

Right-justify the text.

D_VLINE

Convert “ ¦ ” characters to vertical lines. (default)

D_NOVLINE

Don’t convert “ ¦ ” characters to vertical lines.

Discussion

E_SECT places text into the various display screen sections (header, footer, and information line) in the current environment.

The text argument contains the text that will be displayed in one of the screen sections. The text_flag arguments define where and how that text will be displayed. You can have a maximum of six text_flag arguments.

The information line is loaded by default if D_HEADER, D_CAPTION or D_FOOTER is not specified.

The D_POSITION argument redefines the current position of the text by specifying the section row and column where the text should begin. This redefinition occurs before any clearing or justification. The default display position (D_DISPLAY) for the section text is after the last text placed into that section.

After positioning, the routine takes care of clearing the text. The entire line of text is cleared if none of the clearing function codes (D_NOCLEAR, D_CLEAR, D_CLREOL, or D_CLRBOL) are specified.

Justification occurs next. If D_LEFT, D_CENTER, or D_RIGHT is not specified, the text is displayed at the current display position (D_DISPLAY).

Next, if D_NOVLINE is not passed, “ ¦ ” characters will be converted to vertical lines.

Finally, the routine outputs text at the current position and updates the current position. The text is displayed in the current default rendition for the specified screen section.

If you attempt to place text in a section that does not exist (because it was not defined at the U_START call), a fatal error occurs.

E_SECT processing on Windows

On Windows, if your header section is exactly one line in size, the application’s window caption is used to display the header. Use D_HEADER or D_CAPTION to set or modify the header text. For compatibility between all environments, we recommend that you always use D_HEADER. The maximum visible length of header or caption text is 78 characters.

If your header section is more than one line in size, an area below the application’s window caption will be used for displaying the header. Use D_HEADER to access this area. Use D_CAPTION to set and modify an additional line of text in the application’s window caption. The Windows theme in use determines the location of the title (Toolkit settings for titles are ignored on Windows).

Microsoft Windows-style status bars are used for the information line and footer in the application window. These status bars are created outside the client area, allowing more space for your application. The information line and footer float with the bottom of the application window when the window is resized. Only one-line footers are supported.

The D_LEFT, D_RIGHT, and D_CENTER options divide the status bar into sections and specify the justification for text. Text is justified according to the option, but the status bar is divided differently depending on whether the text includes vertical bars and the D_VLINE option is set:

e_sect("centered|with|bars", D_INFO, D_CENTER, D_CLEAR)

will result in a status line with something like the following:

Status line centered with bars

Examples

The following example displays the quoted text at the left side of the information line (if there was no prior display to the information line). The line is cleared to blanks and the “¦” character is converted to a vertical line.

xcall e_sect("RETURN to continue|^Z to exit") 

This example centers the contents of nam(i:j) in the second line of the header section. The line is cleared to blanks and the “¦” character is converted to a vertical line if it occurs in nam.

xcall e_sect(nam(i:j), D_HEADER, D_CENTER, D_POSITION, 2, 1) 

The next example places the contents of pagnm at display row 2 and column 60 of the footer section. The line that will contain the text is not cleared, and any “¦” characters are converted to vertical lines.

xcall e_sect(pagnm, D_FOOTER, D_NOCLEAR, D_POSITION, 2, 60) 

The following example changes the Windows environment application caption to “Accounts Receivable” whether or not the caption is being used for the header section. This statement would be ignored in all other environments.

xcall e_sect("Accounts Receivable", D_CAPTION)