GET_USER_TOKEN_VALUE
GET_USER_TOKEN_VALUE allows the user exit to retrieve the value of user tokens.
Buffers
xlibc
typedef struct __user_token_value {
char token_name[256];
short actual_length;
char token_value_buf[2000];
} user_token_vaue_def;
xlibcob
01 result native-2.
?Section TOKENS,Tandem
01 USER-TOKEN-VALUE.
02 TOKEN-NAME PIC X(256).
02 ACTUAL-LENGTH NATIVE-2.
02 TOKEN-VALUE-BUF PIC X(2000).
Syntax
For C:
#include "usrdecs" #include "xlibc" short result = 0; user_token_value_def usr_token_val; result = GET_USER_TOKEN_VALUE (&usr_token_val);
For TAL:
?source usrdect int result; int .ext utoken_value_ptr(user_token_value_def); result := GET_USER_TOKEN_VALUE(utoken_value_ptr);
For COBOL:
?ENV COMMON ?CONSULT =EXTRACT (or =REPLICAT) ENTER C "GET_USER_TOKEN_VALUE" using USER-TOKEN-VALUE giving RESULT.
Return Values
EXIT_FN_RET_OK EXIT_FN_RET_INVALID_CONTEXT EXIT_FN_RET_TOKEN_NOT_FOUND
-
token_name TOKEN-NAME-
Up to 256 characters to specify the name of the user token.
-
actual_length -
The actual length of the data returned in the buffer.
-
token_value_buf -
The 2000 byte buffer that will receive data.
-
result -
A code indicating whether the call was successful or not. One of the following:
EXIT_FN_RET_OK EXIT_FN_RET_INVALID_CONTEXT EXIT_FN_RET_TOKEN_NOT_FOUND