cobcommandline

Sets up the COBOL command line.
Restriction: This function is supported for native COBOL only.

Syntax:

#include "cobcall.h"

cobchar_t *cobcommandline(int flags, int *argcp,  
           cobchar_t ***argvp, cobchar_t ***envpp, 
           cobchar_t **namep);

Parameters:

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.

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.

Equivalent COBOL Syntax:

None.

Example:

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);
}