i want to do a select for all the things related to record type 10(mentioned in blue) and also '9'(mentioned in red)
Welcome to the forums.
But I dont see anything mentioned in RED above. Have I become color blind?
it must read all occurances of that number 1111111111 into output file
Neither your sample data nor your explanation seems to be sufficient to make your requirement clear to others. Please post some 5-10 records of input and make sure you cover all the possible scenarios. Also mention the input/output RECFM/LRECL etc.