Previous Page | Next Page

Functions for NLS

KUPDATE Function



Inserts, deletes, and replaces character value contents.
Category: DBCS
Restriction: I18N Level 2

Syntax
Arguments
Details
See Also

Syntax

KUPDATE(argument,position,n<, characters-to-replace>)
KUPDATE(argument,position<,n>, characters-to-replace)


Arguments

argument

specifies a character variable.

position

specifies a numeric expression that is the beginning character position.

n

specifies a numeric expression that is the length of the substring to be replaced.

Restriction: n cannot be larger than the length of the expression that remains in argument after position.
Restriction: n is optional, but you cannot omit both n and characters-to-replace from the function.
Tip: If you omit n, SAS uses all of the characters in characters-to-replace to replace the values of argument.
characters-to-replace

specifies a character expression that replaces the contents of argument.

Restriction: characters-to-replace is optional, but you cannot omit both characters-to-replace and n from the function.
Tip: Enclose a literal string of characters in quotation marks.

Details

The KUPDATE function replaces the value of argument with the expression in characters-to-replace. KUPDATE replaces n characters starting at the character you specify in position.

Note:   If you set the NLSCOMPATMODE system option to on, parameter, characters-to-replace, processes the data based on previous SAS releases. If NLSCOMPATMODE is off, then characters-to-replace uses the 9.2 functionality. See the following table for examples.  [cautionend]

Statements Results
NLSCOMPATEMODE
kkupdate("123456", 2,3); 
 
156
NLSCOMPATEMODE
kupdate("123456", 2,3,"abcd"); 
 
1abcd56
NONLSCOMPATEMODE
kupdate("123456", 2,3); 
 
1   56
NONLSCOMPATEMODE
kupdate("123456", 2,3,"abcd"); 
 
1abc56


See Also

Functions:

KUPDATEB Function

System Options:

NLSCOMPATMODE System Option: z/OS

Previous Page | Next Page | Top of Page