Tuesday, April 1, 2025

SUPERC - Display lines preceding and following the search line found to be listed

When you invoke ISRSUPC(SUPERC) to search for strings, by default, it will display only matching lines.

If you want to display the lines preceding and following the search line found to be listed, then you can use LPSF process option in the PARM card of SUPERC. The default value is 6.

The count can be changed by using the LPSFV process statement. This allows a count range of 1 to 50 lines.

In the below example, "LPSFV 2" option, lists up to 2 lines before and after the line found.

//SEARCH  EXEC PGM=ISRSUPC,                       
//            PARM=(SRCHCMP,LPSF,NOSUMS,          
//            'ANYC')                             
//NEWDD  DD DISP=SHR,DSN=MY.SEARCH.PDS
//OUTDD  DD SYSOUT=*                  
//SYSIN  DD *                         
SRCHFOR 'WS-PGM1XXXU-XXXCLE-UPDATE'   
LPSFV 2                               
/*                                    
 
Output of the above step
 
1  ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS           LINE-#  SOURCE SECTION                    SRCH DSN: MY.SEARCH.PDS 
                                                                       
                                                                       
  MEMBER01 CONCAT#(9)       ----------- STRING(S) FOUND ----------------
                                                                       
                                                                       
       *  010500*=======================================================
       *  010600 01 WS-SQLCODE                      PIC ----9.         
     110  010700 01 WS-PGM1XXXU-XXXCLE-UPDATE       PIC X(8) VALUE 'A01U
       *  010800 01 WS-RECS-READ                    PIC 9(08).         
       *  010900 01 WS-RECS-POSTED                  PIC 9(08).         
        

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.