# RXS_updVar()

Use this subprocedure to update the contents of a template engine variable defined in a section (e.g. `<phone>.:phone:.</phone>`)

## Subprocedure Prototype

### IBM i V5R4+

```rpgle
      // Replaces a specified template variable with a provided value.
     D RXS_updVar      pr

      // The name of the variable to replace with the value specified in the
      //   second parameter.
      // Example: phone (for the template variable .:phone:.)
     D  pName                        30a   const varying

      // The value to replace the template variable's place holder.
      // Example: 123-456-7890 (to populate the example template variable
      //   .:phone:., above)
     D  pValue                    65535a   const varying

      // Specify *On for this parameter in order to trim the data of blanks at
      //   the beginning and end of the string or *Off to maintain the spaces as
      //   passed.
      // Default: *On
     D  pTrim                          n   value options(*nopass)
```

