Page 3 of 3

Re: Search a string in PDS with 2 lines prior & after.

PostPosted: Thu Mar 17, 2016 7:30 pm
by NicC
I can't find anything for it.

You obviously did not do a Google search (isrsupc AND chng). Please do your 'homework' before posting.

Re: Search a string in PDS with 2 lines prior & after.

PostPosted: Thu Mar 17, 2016 7:49 pm
by Raja190
hi Billy,


Thanks for posting the link, it was really help but... my requirement is to get N number of lines prior and after the search string and what "CHNGV" is pull lines prior and after when 2 files are compared and gets 3 lines prior and after the changed line. Hope this clarifies.


CHNGV 3
Lists up to 3 lines before and after change



Please let me know if any option is there for my requirement.

Re: Search a string in PDS with 2 lines prior & after.

PostPosted: Thu Mar 17, 2016 8:52 pm
by Raja190
I found my self and below will work for what i asked.

//CONTROLR EXEC CONTROLR,PARM='R2,,,BL,.$FIRST,,DDD'      
// EXEC PGM=ISRSUPC,                                      
//      PARM=(SRCHCMP,'ANYC,IDPFX,NOPRTCC,SDUPM,LPSF')    
//NEWDD DD DSN=dsn.pds.name,DISP=OLD                
//OUTDD DD SYSOUT=*                                        
//SYSIN DD *                                              
 SRCHFOR  'RAJA'                                          
 LPSFV 5                                                  
/*