pc.p

Processing Code/Restore Processor, Releases: AP and R83

Performs pattern match.

Syntax

p(matchstring){;(matchstring)...}

Description

tests a value and determines if it matches a pre-determined pattern 'matchstring' composed of alphabetic, numeric or literal characters.

The 'matchstring' may be a composite of literals and/or match operators, appended to length specifications. To be accepted for processing, the value must be the exact length of the length parameter. If the data does not match, null is returned.

The 'p' processing code may be used as an output-conversion or input-conversion. As an input-conversion, the 'p' code verifies input.

Match operators:

na 'n' alphabetic characters only.
mn 'm' numeric characters only.
nx 'n' alphanumeric characters.
'text' any quoted text string. If a literal is specified, the 'p' code tests for an exact match to that literal.

In all of the above cases which support a number, the exact number must be met or found to accept the data. '0' (zero) as the number allows for any number, including zero, to be accepted.

Multiple matchstring parameters will accept the data if any of the matchstrings are met. Pattern match operators must be separated by semicolons.

If the data matches the pattern exactly, the data is returned. If the data does not match, null is returned.

The 'p' code can be used as an output-conversion or input-conversion. As an input-conversion, the 'p' code verifies input. Multiple pattern match.strings must be separated by semicolons.

See Also

Command Name Type Description
ue.0070 User Exit Performs a correlated match on a multi-valued set.
up.input-conversion.adi Processing Code Processing codes available from UP after input.
basic.match Relational Operator Pattern matching function.
pc.pattern.match Processing Code see the 'p' processing code.
pc Introductory

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.