---
title: "CCS Variables Usage"
canonical: "https://docs.infoblox.com/space/NCSG/23199828/CCS%20Variables%20Usage"
format: markdown
---
Scripting and programming languages use *variables* to define important values that allow the NetMRI job engine to respond according to what it sees in the data it's parsing. CCS is no different; in each section of a CCS script (Script, Actions, Issues and Triggers), you use variables to define the values that CCS uses to run CLI commands and to match against output data from network devices.

NetMRI 's job engine recognizes several types of variables:

**Well-Known** **Variables** – A set of standard variables universally recognized by the NetMRI job engine in all scripts whereever they are called out. See the section *<span style="color: #0000ff">[Well-Known](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199947)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199947)*<span style="color: #0000ff">[Variables](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199947)</span>* for a list and brief descriptions of the well-known variables in the NetMRI system.

**Script-Variables** – User-defined variables that are used in sections of a script to allow interactive user/admin input during script execution. You define `Script-Variables` in the Script section of any script. (See the section *<span style="color: #0000ff">[Script-Variables:](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199816/Script+Section+Attributes#ScriptSectionAttributes-ScriptVariables)</span>* for more detail.) When a script runs, a `Script-Variable` prompts the user running the script to enter the value (IP address, user name, device name, etc...).

A `Script-Variable` can refer to lists in the NetMRI system (**Configuration** **Management** **–>** **Job** **Management** tab **–>** **Lists**) as an input type. (See and *<span style="color: #0000ff">[The](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)*<span style="color: #0000ff">[getListValue(](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)*<span style="color: #0000ff">[)](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)*<span style="color: #0000ff">[Function](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199984)</span>* for more detail.)

**Trigger-Variables** – A special variable type, limited to Trigger sections, that is used to extract pieces of information from the command-line output resulting from an `Action-Command` attribute. Consult the topic *<span style="color: #0000ff">[Trigger-Variables:](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199824/Trigger+Section+Attributes#TriggerSectionAttributes-bookmark19)</span>* for more information.

**SET** **variables** – Custom, user-defined variables that can be declared only in specific Command scripting attributes. SET variables can also reference lists, which are two-dimensional tables of data that are installed into the Lists page in NetMRI. See *<span style="color: #0000ff">[Setting](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[Variables](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[in](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[Command](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[Attributes](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>* for more.)

---

**Note:** A longer list of NetMRI-standard scripting variables can be found in the section "Scripting Well-Known Variables (Perl and CCS)" in the *Infoblox* *NetMRI* *Administrator* *Guide* or in online Help.

---

In CCS scripts, you always declare a variable by using a dollar sign, which is also the sign of a Perl scalar variable:

`$vendor`

CCS scripts also reference declared variables with the dollar sign. Setting a value for a variable requires standard arguments:

- `eq` (Equal to)
- `like` (Similar to, used with wildcards)
- `in` (variable value is contained in the following)
- `ne` (not equal to)

Declaring a variable, even if you do not assign it a value, also requires declaring its type, including the possibility of using a list:

- regular expression (example in section *<span style="color: #0000ff">[Setting](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[Variables](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[in](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[Command](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)*<span style="color: #0000ff">[Attributes](https://infoblox-docs.atlassian.net/wiki/spaces/NCSG/pages/23199831)</span>*)
- `word` (string)
- `boolean`
- `string`
- `list`