Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Variables and Commands
To set the variables use := (colon + equals sign)
Example
TestInt1 := 5
GatewayDirectory := c:\gateway\
StateImage := $GatewayDirectory + GatewayState.AWS
The dollar sign in front of the string variable indicates that one variable can use another variable. In this case the StateImage variable will have the value c:\gateway\GatewayState.AWS
You can space the assignment operator where you want as long as there is at least one space between each part of the statement.
(VariableName),(at least one space),( := ),(at least one space), (variable value)
A variable can be assigned as a mixture of strings and variables. Integer variables can be used in the assignment statement and these will be translated to strings.
Example
FOR TestInt1 := 1000 to 1999 do
LoadFile := $GatewayDirectory + TEST + $TestInt1 + .XSF
This command can be used to set a variable that has been declared, to a value retrieved from an INI file.
The five parameters needed for GET_INI_VARIABLE are:
Variable name with or without a '$' in front of it.
INI file to get variable from.
Section name to get variable from.
Key name to get variable from.
A default value to use if key is not found - defaults to empty string if not specified.
Example
GET_INI_VARIABLE $GatewayDir, Gateway.INI, AWScript, GatewayDirectory, c:\Gateway\
This command can be used to set a variable that has been declared, to a value retrieved from an environment variable.
The three parameters needed for GET_ENV_VARIABLE are:
- Variable name with '$' in front of it.
- Environment variable to read from.
- A default value to use if variable is not found - defaults to empty string if not specified.
Commands for Calling Other Processes
Calls another section of the command script. It takes a section name as a parameter. Do not call any of the standard sections Startup, Variables, Process and End.
Example
RUN_PROCESS ClearAW
Run another Analysis Workbench command script. It takes a script file name as a parameter.
Example
RUN_SCRIPT TestScript.AWCS
Commands for Loading Data into Analysis Workbench
Loads an Analysis workbench state image file into Analysis Workbench.
Example
LOAD_STATE TestState.AWS
Loads one scan file into Analysis Workbench. It has a single scan file name as a parameter.
Example
LOAD_SCAN c:\UCMDB\DataFlowProbe\tools\InventoryTools\Samples
LOAD_SCAN $XSFDirectory + aix52.xsf
Has a single section name as a parameter to load a list of scan file names from. This procedure calls the LOAD_SCAN procedure for each file in the list.
Example
LOAD_SCAN_LIST FileList
Loads a single directory specified, as a parameter to this command. Optionally, specify the /SUB parameter to load all scan files in the specified directory and all subdirectories of that directory.
Example
; Load all files from the Samples directory
LOAD_DIRECTORY C:\UCMDB\DataFlowProbe\tools\InventoryTools\Samples
; Load all files from all the sample directories in Analysis Workbench.
LOAD_DIRECTORY c:\ /SUB
Loads a list of directories from a section of the script file. This procedure calls the LOAD_DIRECTORY procedure for each directory in the list. (The /SUB parameter can also be used in the directory list).
Example
LOAD_DIRECTORY_LIST TestDirList
Commands for Unloading Data from the Analysis Workbench
Unloads scan file data from Analysis Workbench. Uses a parameter ALL, TAGGED, or UNTAGGED. Assumes ALL if no parameter is specified.
Example
UNLOAD UNTAGGED
; Unloads from Analysis Workbench all scan files that are not tagged.
Commands for Setting the Load Options
Sets business mode if no scan files have been loaded.
Sets operational mode if no scan files have been loaded.
Instructs Analysis Workbench how to treat duplicate scan files. This overrides and changes the current setting of Analysis Workbench. The settings are available in the File Load Options dialog box called from the scan file load form Options button.
Valid combinations are:
- LOAD_DUP_OPTION NEWEST (load the newest of the duplicate files)
- LOAD_DUP_OPTION ASK (Ask what to do if duplicate files detected)
- LOAD_DUP_OPTION LOAD (load the duplicate file, remove the previously loaded one)
- LOAD_DUP_OPTION IGNORE (Leave the file already loaded, ignore the attempt to load another file with the same name)
Instructs Analysis Workbench how to treat old scan files. This overrides and changes the current setting of Analysis Workbench.
Valid combinations are:
- LOAD_OLD_OPTION LOAD (Load old files even if they are older than the limit).
- LOAD_OLD_OPTION Ask (Ask what to do if old scan files are detected).
- LOAD_OLD_OPTION IGNORE (Ignore files older than the limit).
Require a load configuration file as a parameter, to load an INI file saved by the Analysis Workbench Load Configuration dialog box. This sets up recognition, display filter, asset fields, duplicate and old scan file options and so on.
Example
LOAD_CONFIG ScriptLoadOptions.ini
Allows a list of directories to ignore to be specified, when loading scan files. The list can be set and saved using the Load Filter tab of the Analysis Workbench Load Configuration dialog box.
Example
LOAD_EXCLUDE_DIR c:\UCMDB\DataFlowProbe \tools\InventoryTools\AnalysisWorkbench\ExcludedDirs.txt
Commands for Running Tag Queries
Clear the current Analysis Workbench query from memory, this is not necessary if you are loading a query from a file.
Load a tag query into Analysis Workbench. Takes a query file as a parameter.
Example
QUERY_LOAD NT4WS
QUERY_RUN
Run the tag query currently loaded into Analysis Workbench. Ensure that you load the correct query file before running the query. Typically you would call the QUERY_RUN procedure immediately after a QUERY_LOAD.
Overrides the tagging option set by the loaded query in Analysis Workbench.
Uses the parameters SET, CLEAR, TOGGLE.
Valid combinations are:
- QUERY_SET_OPTION TAG SET
- QUERY_SET_OPTION TAG CLEAR
- QUERY_SET_OPTION TAG TOGGLE
Overrides the pre-query option set by the loaded query in Analysis Workbench.
Uses the parameters NONE, CLEARALL, SETALL.
Valid combinations are:
- QUERY_SET_OPTION PREQUERY NONE
- QUERY_SET_OPTION PREQUERY CLEARALL
- QUERY_SET_OPTION PREQUERY SETALL
Commands for Tagging
Loads a list of tagged machines from a .tag text file. This file contains the asset numbers of the tagged machines. It takes one argument, the fully qualified name of the tags file to load.
Example
LOAD_TAGS C:\UCMDB\DataFlowProbe\tools\InventoryTools\AnalysisWorkbench\Machines15March2012.tag
Saves the asset numbers of the machines tagged in a Machines window to a .tag text file. It takes one argument, the fully qualified name of the tags file to save.
Example
SAVE_TAGS C:\UCMDB\DataFlowProbe\tools\InventoryTools\AnalysisWorkbench\Machines15March2012.tag TAG_ALL
Used to tag or untag all items of a particular type.
The syntax of the command is
TAG_ALL (Tag|Untag) (Local|Global) (File|Dir|App|Mach)
Tags files, directories and applications from a script. The syntax is:
TAG_CONTAINS (Tag|Untag)(File|Dir|App) ColumnName Value
Where (x|y) means x or y.
Example 1
This will tag all of the unrecognized (Checkver and Unknown) files:
TAG_CONTAINS Tag File Status Check TAG_CONTAINS Tag File Status Unknown
Example 2
This will tag all MS apps except Outlook
TAG_CONTAINS Tag App Publisher Microsoft
TAG_CONTAINS Untag App Application Outlook
Commands for Exporting Data from Analysis Workbench
Loads a saved export layout file. This can be configured using any of the exports available from the main Analysis Workbench menu. Simply set up the export as required for exporting the data and save it to the file name used in your script.
Example
EXPORT_LOAD TestScript.awrcl
Runs the currently loaded export layout file. This will export the data to the files specified in the AWRCL file.
Allows you to change the directory that the files are exported.
Example
EXPORT_SETDIR C:\Gateway
Note Older .rcl files will not work in this version of Universal Discovery.
Commands for Script Debugging
Pressing the Pause|Break key will stop the script at the next command and display a dialog box – it will not interrupt a running command apart from the WAIT command.
It only needs to be pressed once, however, it may appear that nothing is happening if a whole directory of scan files is being loaded.
Setting BREAK_ON_ERROR ON will stop the script if any errors occur.
Puts up a dialog box for every command when switched on, allowing the script to quit, skip the current command or turn off the single stepping.
Shows a window with currently processing script line added to a list
Commands for Script Logging
Clears the Analysis Workbench error log. (this is not recommended unless you are saving the error log to a file each time a script is run).
Writes command lines to the log as they are processed
Writes the specified string to the log file and log window if turned on.
Displays the Analysis Workbench main log window to show errors and messages as the commands in the script are processed.
Saves the log to a file specified as a parameter.
Example
LOG_SAVE $ScriptFile
LOG_SAVE c:\ScriptFile.txt
Miscellaneous Commands
This statement performs the command only if the preceding expression is true.
Example
IF $LOOP = 10 THEN TERMINATE_PROGRAM
Used in conjunction with the IF...THEN command.
Allows a command to be repeated a number of times. The command can be a normal one line command or a whole process section.
The syntax is FOR (variable) := Start TO end DO (command)
Start and end can be numbers or variables, end must be greater than start.
FOR TestInt1 := 1 to 10 DO LOG_WRITE HELLO WORLD
FOR $loop := $start TO $end DO RUN_PROCESS HelloWorld
Saves the current Analysis Workbench data to a state image file. Takes two parameters – Filename and Description. The state image description is optional and a default description will be used if one is not specified.
The state image files are compressed and decompressed on the fly.
Example
SAVE_STATE TestState.AWS, Test state image saved by command script
Shuts down the Analysis Workbench program.
Will not prompt for shutdown
Will display a dialog box prompting for action - optionally you can include a message that will be displayed in the dialog box.
Example 1
PAUSE load has finished
WAIT n
Wait n seconds
Example 2
WAIT 100
Will wait 100 seconds - only checks for times greater than 1 hour – Do not use large numbers for the wait time. This will lock the program until the time limit is reached or the Pause|Break key is pressed.
Displays and outputs all date fields in a standard format to aid in exporting data to other applications.
Example
STD_DATES ON
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to cms-doc@microfocus.com.
Help Topic ID:
Product:
Topic Title:
Feedback: