CA View - Looping Condition in SARGRW Utility Program Using SELECT Logic
search cancel

CA View - Looping Condition in SARGRW Utility Program Using SELECT Logic

book

Article ID: 208557

calendar_today

Updated On:

Products

View

Issue/Introduction

I am trying to code a batch job to execute the SARGRW utility program to generate a list of jobs in CA-View for a particular control number.

My current usage of the process codes the control cards as follows:

/CONTROL DATABASE=XXXXXX.XXXXXX   RULER=YES
         LINESIZE=80
/SELECT  (SUBSTR(JOBNAME,1,5) = 'PR748') &
         JOBSUBDT GE '01/24/21' &
         JOBSUBDT LE '01/31/21'
/SORT  JOBNAME, JOBEXSDT, JOBEXSTM
/TITLE 'LISTING OF JOBS'
/PRINT JOBNAME   'JOBNAME'  COL(1)
/PRINT JOBID     ' JOBID'
/PRINT JOBSUBDT  ' SUB DATE'
/PRINT JOBSUBTM  '  TIME'
/PRINT JOBEXSDT  'START DATE'
/PRINT JOBEXSTM  '  TIME'
/PRINT JOBXCODE  'XCODE'

This works fine, but now I want to extend the JOBNAME selection to other job names for the same control number ('748' in this example).

I decided to try using the LIKE comparison operator, and coded an initial test using that with the /SELECT command coded as follows:

/SELECT  JOBNAME LIKE 'PR748*' &
         JOBSUBDT GE '01/24/21' &
         JOBSUBDT LE '01/31/21'

This test was successful and generated the same output report as the prior test.  I then tried to extend the JOBNAME selection to include an additional selection of jobs by coding the /SELECT statement as follows:

/SELECT  JOBNAME LIKE ('I1748*','PR748*') &
         JOBSUBDT GE '01/24/21' &
         JOBSUBDT LE '01/31/21'

As I read your documentation, this should cause basically an OR comparison and should select JOBNAMEs which begin with either I1748 OR PR748.  However, when I run the test with this /SELECT statement coded, the job goes into a CPU loop.

As another test, I also tried coding the /SELECT statement in the following manner to utilize the OR logical operator, but the results were the same with the job going into a CPU loop:

/SELECT ((SUBSTR(JOBNAME,1,5) = 'I1748') OR
         (SUBSTR(JOBNAME,1,5) = 'PR748')) &
         JOBSUBDT GE '01/24/21' &
         JOBSUBDT LE '01/31/21'

How can I code this job to allow the selection of multiple different job naming conventions?  

Environment

Release : 14.0

Component : CA View

Resolution

To stop the loop in SARGRW processing, fix LT00211 was created:

 https://support.broadcom.com/download-center/edit-solution.html?aparNo=LT00211&os=z%2FOS

With the fix on, the client reported that they successfully ran tests using OR conditions with multiple comparison values to the JOBNAME variable, as well as tests using the LIKE comparator with a list of generic comparison values.