Development and Pipeline

 View Only

 COBOL using REGCOMP and REGEXEC

Douglas Landholt's profile image
Douglas Landholt posted Thu June 04, 2026 05:15 PM

I'm trying to use COBOL to match text strings (mainframe and server file names) to Regular Expressions used in our File Transfer system to determine the transmission route IDs for our input and output files. I'm using REGCOMP and REGEXEC modules in CEE.SCEELKED, statically linked to the calling program. I got some AI help to set up parameters and structure the calls. I was getting S0C4s using COBOL 6.4, but at least sidestepped the crashes by downshifting to COBOL 4.2. 

My current hurdle is that the REGEXEC function sends back a return code of 1 (no match) even for files that should match. If there's anyone out there with experience using these functions, any help would be greatly appreciated!!