Copy record when a particular string is present in it
Posted: Thu Sep 04, 2008 2:58 pm
Hi,
I have a FB file of LRECL 80. There is a particular string 'ABCD' which can occur at any position starting form 1 to 77 in some the records. The others bytes may have different random values.
My requirement is to copy the records which has that particular string. I could have used a 77 INCLUDE statements one after another, but looking some better way of doing it.
The input file is like -
ABLKJDFLKSDJLFJABCD1GDFKSG7
ABCDOIHFOAIFHONCEWU1924932
OIEDHOWEFOINC12938443BCOBE
LAHFABCDPOWJEFPOWTRUTUERPU
Output file should be -
ABLKJDFLKSDJLFJABCD1GDFKSG7
ABCDOIHFOAIFHONCEWU1924932
LAHFABCDPOWJEFPOWTRUTUERPU
Can you please help me with it.
I have a FB file of LRECL 80. There is a particular string 'ABCD' which can occur at any position starting form 1 to 77 in some the records. The others bytes may have different random values.
My requirement is to copy the records which has that particular string. I could have used a 77 INCLUDE statements one after another, but looking some better way of doing it.
The input file is like -
ABLKJDFLKSDJLFJABCD1GDFKSG7
ABCDOIHFOAIFHONCEWU1924932
OIEDHOWEFOINC12938443BCOBE
LAHFABCDPOWJEFPOWTRUTUERPU
Output file should be -
ABLKJDFLKSDJLFJABCD1GDFKSG7
ABCDOIHFOAIFHONCEWU1924932
LAHFABCDPOWJEFPOWTRUTUERPU
Can you please help me with it.