I'm using job_Depends to retrieve forecast of jobs during a time period, I'm looking to find jobs OFF_ICE or OFF_HOLD only during a time period. current query:
job_depends -c -j %2 -F %3 -T %4>>%FileName%
brings out unnecessary(in my case) info., like showing the dependencies, conditions, etc.
Start Dependent
Job Name Status Date Cond? Cond? Jobs?
-------- ------ --------------- ----- ---------
1CCS.UATQA.ACE_EXTRACT.C ON_HOLD Met No Yes
Dependent Job Name Condition
------------------ ---------
1CCS.UATQA.ACE_EXPORT.C SUCCESS(1CCS.UATQA.ACE_EXTRACT.C)
All I need is Job name and current status which are 'ON_ICE' and 'ON_HOLD' jobs only.
I used find and findstr features to remove the unwanted stuff. Add required words in the below command, according to your req. The below command will remove spaces and new lines too.
type Temp.txt | find /V "ON_ICE" | find /V "Condition" | find /V "-------" | find /V "success" | find /V "______"| find /V ".FW"| find /V "(" |FINDSTR /V /R /C:"^$">FilteredFile.log