Variable with Job Log Path
Path to the log of the currently running Uproc can be used as a variable.
Description
This is a script (or code) that can be used placed into
U_ANTE_UPROC so that the path to the log of the currently running Uproc can be used as a variable.
The variable
will show the path to the log which will show activity in the Uporc up to the point it is called. This can be used for a variety
of processes such as regular expression searches in the log.
Example
Code below to be added to a Test Uproc do demonstrate the use of the new variable
Unix:
echo "This is a test uproc message - line 1" echo "This is a test uproc message - line 2 - hello" echo "This is a test uproc message - line 3" echo "" echo "My log is set to $UNI_MYLOG" echo "" echo "#### Searching for lines in the log containing the word \"hello\" ###" echo "" echo "#####################################" echo "" grep "hello" $UNI_MYLOG exit $?
Windows:
echo "This is a test uproc message - line 1" echo "This is a test uproc message - line 2 - hello" echo "This is a test uproc message - line 3" echo. echo My log is %UNI_MYLOG% echo. echo "#### Searching for lines in the log containing the word "hello" ###" echo. findstr "hello" %UNI_MYLOG%
In the example Test Uproc echos 3 lines then carries out a 'grep' to look for lines in the log that contain the word
'hello'.
In this case it finds 2 lines, the echo in the initial 3 lines and then the echo in the information line,
saying that the Uproc is searching for the word hello.
(Obviously more complex processes can be developed)
Target environments: Unix Linux, Windows
Prerequisites: A U_ANTE_UPROC must exist in the UXMGR directory
Implementation: Add the code to an existing U_ANTE_UPROC or put the file into the UXMGR directory as U_ANTE_UPROC
Products | Workload Automation, Dollar Universe Workload Automation |
Operating Systems | Linux, Windows |
Last update | 2015-06-11 23:06:48.0 |
Supported by | |
Community Source | variable-with-job-log-path |
Broadcom does not support, maintain or warrant Solutions, Templates, Actions and any other content published on the Community
and is subject to Broadcom Community Terms and Conditions.
|