May I please ask for assistance.
I have a file which could contain 1 or many records. In one of the records could be a specific 'key' string (in any record, in any position) lets say 'THIS IS A KEY'. I hope there is a way to check if it's present in the file, and create a new file with just one this record, with the 'KEY' string' .
For instance, the file has the following records:
header 11111111 text key
4 jfjfjfjf 9 9 9 9 99
4gjgjgjgj 900d0d0d
8888 THIS IS a KEY
8888 00s0s0s0s0
4 jfjfjfjf 9 9 9 9 99
4gjgjgjgj 900d0d0d
8888 THIS IS a KEY
8888 00s0s0s0s0
After the program run, it will create a file with just one record:
8888 THIS IS a KEY
If there is NO 'KEY string' in the first file - the resulting file will be created empty, or has 0(zero) records.
Hope it is possible.
Thanks so much in advance,
Irene