Extarct block data using awk

I have 3 block data with Process Beginning and Process Ending

I need to Print Begining and ending lines of block data other than sqlExtracts blocks

Process Beginning - 2016-04-02-00.36.13---->Print this line

Putting Files To daADadD for File will move to /sadafJJHFASJFFASJ/

Extract Files :-/ASFDSHAF_ABC_2016-04-02.csv /ASFDSHAF_ABC.2016-04-02.csv / ASFDSHAF_ABC.2016-04-02.csv /ASFDSHAF_ABC.2016-04-02.csv /

Process Ending - 2016-04-02-00.36.36 -->Print this line

Process Beginning - 2016-04-02-10.01.20

Putting Files To daADadD for File will move to /sadafJJHFASJFFASJ/

Extract Files :-/sdshsdhsh_sqlExtract.2016-04-02.csv /sdshsdhsh_sqlExtract.2016-04-02.csv/sdshsdhsh_sqlExtract.2016-04-02.csv
Process Ending - 2016-04-02-10.01.21

Process Beginning - 2016-04-02-14.01.20

Putting Files To daADadD for File will move to /sadafJJHFASJFFASJ/

Extract Files :-/sdshsdhsh_sqlExtract.2016-04-02.csv /sdshsdhsh_sqlExtract.2016-04-02.csv /sdshsdhsh_sqlExtract.2016-04-02.csv

Process Ending - 2016-04-02-14.01.21

Not sure I get what you need, so - please specify more clearly and carefully and detailed. Try

grep "^Process" file
Process Beginning - 2016-04-02-00.36.13---->Print this line
Process Ending - 2016-04-02-00.36.36 -->Print this line
Process Beginning - 2016-04-02-10.01.20
Process Ending - 2016-04-02-10.01.21
Process Ending - 2016-04-02-14.01.21

As there is 3 block of Process Beginning and Process Ending how do I print only first one , discard other 2 based on pattern match sdshsdhsh_sqlExtract.2016-04-02.csv

You can extend the search pattern

grep "^Process .* 2016-04-02-00.36.13"

.* means: any character any times.

grep wont help me here . I need someone help me on awk with pattern search in file

I have 3 block data with start and end time(Process Begining and Proces Ending). I need to discard 2 block data (which is for sql extract)

Process Beginning - 2016-04-02-10.01.20

Putting Files To daADadD for File will move to /sadafJJHFASJFFASJ/

Extract Files :-/sdshsdhsh_sqlExtract.2016-04-02.csv /sdshsdhsh_sqlExtract.2016-04-02.csv/sdshsdhsh_sqlExtract.2016-04-02.csv
Process Ending - 2016-04-02-10.01.21

Process Beginning - 2016-04-02-14.01.20

Putting Files To daADadD for File will move to /sadafJJHFASJFFASJ/

Extract Files :-/sdshsdhsh_sqlExtract.2016-04-02.csv /sdshsdhsh_sqlExtract.2016-04-02.csv /sdshsdhsh_sqlExtract.2016-04-02.csv

Process Ending - 2016-04-02-14.01.21

and get start and end time for one remaining

Process Beginning - 2016-04-02-00.36.13---->Print this line

Putting Files To daADadD for File will move to /sadafJJHFASJFFASJ/

Extract Files :-/ASFDSHAF_ABC_2016-04-02.csv /ASFDSHAF_ABC.2016-04-02.csv / ASFDSHAF_ABC.2016-04-02.csv /ASFDSHAF_ABC.2016-04-02.csv /

Process Ending - 2016-04-02-00.36.36 -->Print this line

Try:

awk 's!=""{s=s RS $0} /Process Beginning/{s=$0} /Process Ending/{if(s!~/sqlExtract/) print s; s=""}' file
awk 's!=""{s=s RS $0} /Process Beginning/{s=$0} /Process Ending/{if(s!~/sqlExtract/) print s; s=""}' file |awk 'NR==1; END{print}' 

as I need only first and last line

Can it be done differently??

Its not able process data if block has more than 30000 lines data

Try

awk '
/Process Beginning/     {s = $0
                        }
/Process Ending/        {if (!FND) print s ORS $0
                         s = ""
                         FND = 0
                        }
/sqlExtract/            {FND = 1
                        }
' file
Process Beginning - 2016-04-02-00.36.13---->Print this line
Process Ending - 2016-04-02-00.36.36 -->Print this line

If you also want to print the lines in between, you can use an address,address block in sed or awk

sed '/Process Beginning - 2016-04-02-10.01.20/,/Process Ending/!d' file
sed -n '/Process Beginning - 2016-04-02-10.01.20/,/Process Ending/p' file
awk '/Process Beginning - 2016-04-02-10.01.20/,/Process Ending/' file

For very big files it is more efficient to quit

sed -n '/Process Beginning - 2016-04-02-10.01.20/ {
 :L
 $!N
 /Process Ending/!b L
 p
 q
}
' file
awk '/Process Beginning - 2016-04-02-10.01.20/ {p=1} p; /Process Ending/ {exit}' file