Search code examples
unixautosys

Get just the staus of autosys (main) job/box


I have a main autosys box (first_start_main_job)that has 2 different sub box.

When I enter autorep -j first_start_main_job -d I get something like:

JOb Name | Last Start | Last Run | ST | RUN | Pri/Xtx
first_start_main_job | some_time | some_time | SU | some_text
first_start_sub_job | some_time | some_time | SU | some_text
second_start_sub_job | some_time | some_time | SU | some_text

I just want ST(status) of first_start_main_job and store that in a variable.

Please let me know how to accomplish this.

Thanks in advance..


Solution

  • Use the print level switch -L, with level 0, (zero) to list only the outermost box. Then use your favorite script tool to get and store the ST value.

    For example:

    autorep -J main_job_box -d -L0
    

    man autorep from a AutoSys command prompt will give you more information if you need it.