ASC_INIT

Reads the platform configuration file and initializes the environment so that calls can be made to a core driver. This function or ASC_INIT_EXT() must be called before any other API function.

Syntax

#include <ascauth.h>
ASCENV *ASC_INIT(char *filename);

Parameters

filename

The name of the platform configuration file.

If you call ASC_INIT() with a NULL in place of the filename parameter as in ASC_INIT(NULL), the default is as follows:

z/OS: Always uses the ASCLIENT started task active configuration.

NetWare: sys:asam\data\asamplat.conf

OS/400: /usr/local/ASAM/data/asamplat.conf

UNIX: /usr/local/ASAM/data/asamplat.conf

Return Values

Returns a pointer to the API environment item created upon success. If an error has occurred, NULL is returned.

Example

#include <stdio.h>
#include <stdlib.h>
#include <ascauth.h>

main()
{
  ASCENV *asce;

  /* initialize the authentication environment */
  asce = ASC_INIT(NULL);
  if (asce == NULL) {
    fprintf(stderr, "Error: cannot initialize authentication environment\n");
    exit(EXIT_FAILURE);
  }

  /* now you can make additional authentication calls  here */

  /* now terminate the authentication environment */
  ASC_TERM(asce);
  return 0;
}

See Also

ASC_INIT_EXT

ASC_TERM