Skip to main content

[Migrated content. Thread originally posted on 06 June 2011]

Hello,

I am trying to precompile some programs using pro*cobol from the command line.

I am how ever having issues as the procompiler cannot expand the copyfiles. I have noticed that if the extension is .cob it seems to like it how ever if I use .cpy it does not find it (can this behaviour be changed).

I know about the CP preprocessor and the COBCPY env variable usage in the IDE, but how do we use them from the command line ?

I was able to do this via the IDE setting the P(COBSQL) p(cp) ENDP; directive. How ever I am not sure how to do this via the command line.

Thanks
-PTeng

[Migrated content. Thread originally posted on 06 June 2011]

Hello,

I am trying to precompile some programs using pro*cobol from the command line.

I am how ever having issues as the procompiler cannot expand the copyfiles. I have noticed that if the extension is .cob it seems to like it how ever if I use .cpy it does not find it (can this behaviour be changed).

I know about the CP preprocessor and the COBCPY env variable usage in the IDE, but how do we use them from the command line ?

I was able to do this via the IDE setting the P(COBSQL) p(cp) ENDP; directive. How ever I am not sure how to do this via the command line.

Thanks
-PTeng
You can compile Pro*COBOL applications from the command line in the same manner that you do from the IDE.
You can either pass the directives on the command line to cobol or cbllink or you can place them in a directives file like cobol.dir or cobsql.dir.

To specify the names of copyfile extensions to recognize use:
copyext (pco,cbl,cpy,cob) osext(pco)

Please see the Net Express documentation under Programming->Database Access->Database Access Guide->Part 4 COBSQL->Chapter 11 COBSQL for example command lines etc.

Thanks.