HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 4 Advanced Forms Design

STRIP

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Used to delete any specified character in the field.

Syntax

[STRIP {TRAILING
LEADING
ALL} "characters"]

Parameters

TRAILING

If TRAILING is specified, all occurrences of each character at the end of the field are replaced with blanks.

LEADING

STRIP LEADING replaces with blanks all occurrences of each character at the beginning of the field.

ALL

STRIP ALL deletes all occurrences of each character, compressing the data to the left.

characters

Any string of one or more characters can be specified. Since the statement does not apply to leading or trailing blanks, the statements STRIP LEADING or STRIP TRAILING are not useful.

Discussion

The STRIP statement can be used to format data entered into or moved to any field. (For automatic formatting, refer to the SET command earlier in this section.) As is true of all formatting statements, STRIP has an immediate effect on the data in the memory buffer; the formatted data is then available for display or copying into the application. When the user enters data into a field for which formatting is specified, the data is formatted as soon as ENTER or an appropriate function key is pressed. Thus, FORMSPEC formatting is done before data is written to the data or batch file. (In contrast, reformatting through REFORMAT, described in Section 5, is done after data is collected, edited, and written to the batch file.)

Note that only the characters between the leftmost nonblank and the rightmost nonblank characters are affected. That is, leading and trailing blanks are not included when the data is formatted. No formatting occurs when the field is blank since there are no characters to strip.

Example

Statement

Data Entered

After Formatting

STRIP ALL "-"

[548-72-2002]

[548722002DD]

STRIP LEADING "0"

[D000205000]

[DDDD205000]

Feedback to webmaster