Search for specific text in an Endevor element and show the line of code before and after the search string
search cancel

Search for specific text in an Endevor element and show the line of code before and after the search string

book

Article ID: 244371

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

Is there an Endevor Utility that can search for a specific text string and the show the line before it and after it?

Environment

Release : 18.0 18.1 

Component : Endevor Software Change Manager

Resolution

The LIST ELEMENT action will provide the information needed.  Below is an example that will search for "TEST" and then show 1 line before and after the search string.

//***************************************************************
//*  LIST ELEMENT WHERE TEXT PLUS/MINUS 1 LINES                  
//***************************************************************
//STEP1     EXEC PGM=NDVRC1,PARM=C1BM3000,DYNAMNBR=1500           
//STEPLIB  DD   DISP=SHR,DSN=YOUR.ENDEVOR.CSIQAUTU              
//                 DD   DISP=SHR,DSN=YOUR.ENDEVOR.CSIQAUTH                 
//CONLIB   DD   DISP=SHR,DSN=YOUR.ENDEVOR.CSIQLOAD                 
//BSTERR   DD   SYSOUT=*                                         
//C1PRINT   DD  SYSOUT=*                                         
//SYSPRINT  DD  SYSOUT=*                                         
//SYSABEND  DD  SYSOUT=*                                         
//SYSOUT    DD  SYSOUT=*                                         
//C1MSGS1  DD  SYSOUT=*
//BSTIPT01  DD *                                                 
LIST ELEMENT *                                                   
FROM ENVIRONMENT XXXXX                                       
     SYSTEM      XXXXX                                             
     SUBSYSTEM   XXXXX                                        
     TYPE        XXXXXX                                        
     STAGE      *                                                
WHERE TEXT 'TEST'                                                
OPTION SHOW TEXT PLUS 1 LINES .                                                   

 

For more information on LIST ELEMENT: 

https://techdocs.broadcom.com/us/en/ca-mainframe-software/devops/ca-endevor-software-change-manager/18-1/reference/scl-reference/process-element-actions-in-batch/list-statement/list-from-syntax.html