Hello all...
Wondering if there is a command in COBOL that functions similar to LIKE when you run queries? I know if I run a query on a file and have a 30 character field...if I want to know if a certain sequence or word is there but am unsure the exact position, I can say LIKE '%word%' and query will return matching results. I need to do something similar within my program and am unsure how to go about it in the best, most efficient way in COBOL.
I know from past lives in RPGLE shops, that you can code for LIKE but am not sure if COBOL has a similar command.
If anyone has a viable solution to this problem, I'd appreciate hearing it.
Thanks...
Caren
Wondering if there is a command in COBOL that functions similar to LIKE when you run queries? I know if I run a query on a file and have a 30 character field...if I want to know if a certain sequence or word is there but am unsure the exact position, I can say LIKE '%word%' and query will return matching results. I need to do something similar within my program and am unsure how to go about it in the best, most efficient way in COBOL.
I know from past lives in RPGLE shops, that you can code for LIKE but am not sure if COBOL has a similar command.
If anyone has a viable solution to this problem, I'd appreciate hearing it.
Thanks...
Caren
Comment