0

I am new to COBOL programming. I am making changes to a COBOL program which manipulates threads.I have introduced a file in the program to read a set of parameters and use it in the program. But whenever I compile the program I get the following warning:-

*1237-W **Filehandling used with REENTRANT Directive

Now am I supposed to use the RENT option to compile this program? If so, then how should I compile using RENT option ie. the exact commands to be used. Please help.

cschneid
  • 10,237
  • 1
  • 28
  • 39
Adi G
  • 1
  • 2
  • Q: What operating system are you running? Windows? Linux? Other? Q: Have you looked here [Microfocus COBOL System Interface (Cob)](http://supportline.microfocus.com/documentation/books/sx2011sp1/cycobc.htm)? – FoggyDay Jul 06 '14 at 20:16
  • It's originally tagged procobol. Pro*COBOL is from Oracle. OP was a little coy with the full error-message reference. So, is it a COBOL marketed by Micro Focus, or is it Pro*COBOL from Oracle (probably written by Micro Focus)? What do you mean by "manipulates threads"? The message would seem to be a Warning, have you tried executing the program? Is your program actually re-entrant? If so, and your file-handling is aware of that, you may be good to go (who knows?). – Bill Woodger Jul 06 '14 at 22:44

1 Answers1

1

The error message number implies you are using Micro Focus COBOL, so depending on the platform you can do:

Unix:

cob -C REENTRANT fred.cbl

Windows:

cobol fred.cbl REENTRANT; cbllink fred.obj

or you can add the option to the actual source code itself eg:

  $set REENTRANT
Stephen Gennard
  • 1,910
  • 16
  • 21
  • OP hasn't looked in since five minutes after posting the question. Did you see the comments on the question? Still, it's useful for the passerby with something similar anyway. – Bill Woodger Aug 01 '14 at 19:04