#include "cobcall.h"
cobchar_t *cobcommandline(int flags, int *argcp,
cobchar_t ***argvp, cobchar_t ***envpp,
cobchar_t **namep);
| flags | Reserved for future use. Must be 0. |
| argcp | Address of the argc argument passed to the C main(). |
| argvp | Address of the argv argument passed to the C main(). |
| envpp | Address of the envp argument passed to the C main(). |
| namep | Reserved for future use. Should be NULL. |
None.
The following example shows how to use this routine:
main(int argc, char **argv, char **envp)
{
cobinit();
cobcommandline(0, &argc, &argv, &envp, NULL);
/* Rest of code here */
cobexit(0);
}
Comments:
This routine sets up the COBOL run-time environment with the passed command line.
If your application has a C main() and the command line is accessed from COBOL, then this routine must be called.