I have a PS file. It has around 200,000 lines of data.
I need to search for the lines which have the below strings in the same sequence as mentioned below.
N8USD210
MOBI
FLI10=PRR.
Basically I want to search the above strings on consecutive lines.
ie. N8USD210 should be present in the first line
MOBI should be present in the second line
FLI10=PRR. should be present in the third line
When I get the above mentioned strings at any position in three consecutive lines, I want to copy these three lines into another file.
To illustrate an example:
Input file:
Code:
//END OF DATA
//****************************************************
//STEP05 EXEC N8USD210,
// MOBZ=MOBI001,
// FLI10=PRR.A000T00.RRD0200A.GLREPT(+1)
L01 XXRRPTOMOB PROC MOBIUSXX=MOBIUSXX
L01 XX*********************************************
L01 XX*----- LOAD DATASET TO MOBIUS
L01 XX*********************************************
L01 XXSTEP010 EXEC PGM=IEBGENER
//*
//************** END OF JCL RRD0200A *************
L01 XXSYSPRINT DD DUMMY
L01 XXSYSIN DD DUMMY
L01 XXSYSUT1 DD DISP=SHR,DSN=&FLI10