Job and User Identification

The following functions allow client programmers to access details about the current job being processed, the user and client who initiated the job, and the API itself. These functions may be of use when writing logging code in a client implementation.

API Information

GetAPIVersionT()

Get the version of the Data Control API.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob


C++
GetAPIVersionT() 


Returns

The API version number.

Job Identification

GetJobNameT()

Retrieve the name of the current job.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetJobNameT(PreJobInfoT* JobInfo)

PrepareJob, PerformJob or CleanUpJob:

C++
GetJobNameT(JobInfoT* JobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

A job name, or NULL on failure.

GetJobTypeT()

Retrieve the type name of the current job. Only the tabulation job type ("TABULATION") is currently supported by the API.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetJobTypeT(PreJobInfoT* JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetJobTypeT(JobInfoT* JobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

A job type, or NULL on failure.

GetJobOwnerIDT()

Retrieve the user ID of the current job's owner.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetJobOwnerIDT(PreJobInfoT* JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetJobOwnerIDT(JobInfoT* JobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

A user ID, or NULL on failure.

GetJobOwnerGroupsT()

Retrieve the group IDs that the job's owner belongs to.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetJobOwnerGroupsT(PreJobInfoT* JobInfo, const char*** Groups, int* Len) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetJobOwnerGroupsT(JobInfoT* JobInfo, const char*** Groups, int* Len)


Arguments


JobInfo

Input

Information about the current job.

Groups

Output

IDs of the groups the job owner belongs to.

Len

Output

The number of group IDs returned.


Returns


1

Group IDs were retrieved successfully.

0

The user does not belong to any groups.


GetJobDBCatalogueIDT()

Retrieve the ID of the database that the job was submitted against.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetJobDBCatalogueIDT(PreJobInfoT* JobInfo)

PrepareJob, PerformJob or CleanUpJob:

C++
GetJobDBCatalogueIDT(JobInfoT* JobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

A database catalogue ID, or NULL on failure.

GetJobDBFileNameT()

Retrieve the filename of the database the job was submitted against.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetJobDBFileNameT(PreJobInfoT* JobInfo)

PrepareJob, PerformJob or CleanUpJob:

C++
GetJobDBFileNameT(JobInfoT* JobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

A database filename, or NULL on failure.

GetJobMethodIDT()

Retrieve the ID string of the currently executing method.

Available To

PrepareJob

PerformJob

CleanUpJob


C++
GetJobMethodIDT(JobInfoT* jobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

The name of the current method, or NULL.

GetJobMethodListT()

Retrieve the list of methods that will be invoked in this tabulation request. This will list all methods that will actually be executed (non-selected table methods will be suppressed).

Available To

PrepareJob

PerformJob

CleanUpJob


C++
GetJobMethodListT(JobInfoT* jobInfo, const MethodDefinitionT** definitions, int* length)


Arguments


JobInfo

Input

Information about the current job.

definitions

Output

The current method list.

length

Output

The length of the method list.


GetClientLanguageT()

Retrieve the language setting for the client.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetClientLanguageT(PreJobInfoT* JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetClientLanguageT(JobInfoT* jobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

The requesting client's language string (if available), or an empty string otherwise.

Audit Functions

GetUserIdT()

Retrieve the user ID for the current request.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetUserIdT(PreJobInfoT* JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetUserIdT(JobInfoT* jobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

The unique user ID used to initiate the cross tabulation request.

GetClientApplicationT()

Retrieve the client application ID for the current request.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetClientApplicationT(PreJobInfoT* JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetClientApplicationT(JobInfoT* jobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

The client application ID used to initiate the cross tabulation request.

GetClientIpAddressT()

Retrieve the client IP address for the current request.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetClientIpAddressT(PreJobInfoT* JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetClientIpAddressT(JobInfoT* jobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns

The IPv4 address where the request originated, as a string.

  • For SuperCROSS or Production System this will be the host IP where the application was run.

  • For SuperWEB2 this will be the user's host IP (i.e., where the web browser was run).