My requirement is to search for a particular field in a FILE A.
If my search is successfull then I need to move FILEB to the output file else FILEC to the output file.
1.Search 3 character field('LEA or FBA or VAB) from postion 50 to 52 in FILEA
2.If present move entire file B to output file
3.Search ('EDA' or DEA') in FILE A.
4.If present move file c to the output file.
You mention FILEA, FILEB and FILEC - are those three different input data sets?
Do you want to copy FILEB to to the output file if LEA or FBA or VAB is present anywhere in any record of FILEA?
Do you want to copy FILEC to the output file if EDA' or DEA is present anywhere in any record of FILEB? If LEA or FBA or VAB is also present, do you want FILEB and FILEC copied to the output file? In that order?
What is the RECFM and LRECL of FILEA, FILEB and FILEC?
It would really help if you would show some examples of the input records in each file and what you want for output for different cases.