Need to issue a DOS command from within a native COBOL program

In my COBOL program I would construct a DOS command like "copy EDITFILE.txt EDITFILE-Finance.txt"

Question:  how can I cause the COBOL program to actually issue that command?

Parents
  • The uppercase SYSTEM library api is a wrapper to the lowercase 'C' system api.  

    This uppercase wrapper version of the api ensure the terminal is setup before proceeding to the lowercase system api.

    The parameters to the api are passed through without being changed.   The 'C' system api takes a zero terminated string aka a "char *".

    The one exception being is you are compiling for ACU compatibility directives, an alternative SYSTEM library api is used, which does not require the parameter to be zero terminated.

    Both have the same name but expect the parameter to be different.

Reply
  • The uppercase SYSTEM library api is a wrapper to the lowercase 'C' system api.  

    This uppercase wrapper version of the api ensure the terminal is setup before proceeding to the lowercase system api.

    The parameters to the api are passed through without being changed.   The 'C' system api takes a zero terminated string aka a "char *".

    The one exception being is you are compiling for ACU compatibility directives, an alternative SYSTEM library api is used, which does not require the parameter to be zero terminated.

    Both have the same name but expect the parameter to be different.

Children
No Data