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



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

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

Postby NicC » Thu Mar 17, 2016 7:30 pm

I can't find anything for it.

You obviously did not do a Google search (isrsupc AND chng). Please do your 'homework' before posting.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby Raja190 » Thu Mar 17, 2016 7:49 pm

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.
Raja190
 
Posts: 36
Joined: Mon Dec 14, 2015 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Raja190 » Thu Mar 17, 2016 8:52 pm

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                                                  
/*
Raja190
 
Posts: 36
Joined: Mon Dec 14, 2015 8:13 pm
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post