Top
NetCOBOL V11.0 CGI Subroutines User's Guide
FUJITSU Software

3.9.4 COBW3_GET_COOKIE, COBW3_GET_COOKIE_XX, COBW3_GET_COOKIE_NX, COBW3_GET_COOKIE_XN, and COBW3_GET_COOKIE_NN

These subroutines retrieve an arbitrary cookie name according to the request cookie data that were acquired using the COBW3_INIT, and acquire the cookie value that corresponds to the cookie name.

The functions of these subroutines are as follows:

ASCII environment

COBW3_GET_COOKIE

Retrieves a cookie name that is an alphanumeric character string, and returns the corresponding cookie value, which is an alphanumeric character string.

Unicode environment

COBW3_GET_COOKIE_XX

Retrieves a cookie name that is an alphanumeric character string, and returns the corresponding cookie value, which is an alphanumeric character string.

COBW3_GET_COOKIE_NX

Retrieves a cookie name that is a national character string, and returns the corresponding cookie value, which is an alphanumeric character string.

COBW3_GET_COOKIE_XN

Retrieves a cookie name that is an alphanumeric character string, and returns the corresponding cookie value, which is a national character string.

COBW3_GET_COOKIE_NN

Retrieves a cookie name that is a national character string, and returns the corresponding cookie value, which is a national character string.

To store the acquired cookie value, the en-size blank is added as a padding character.

Format

CALL "COBW3_GET_COOKIE" USING COBW3.
CALL "COBW3_GET_COOKIE_XX" USING COBW3.
CALL "COBW3_GET_COOKIE_NX" USING COBW3.
CALL "COBW3_GET_COOKIE_XN" USING COBW3.
CALL "COBW3_GET_COOKIE_NN" USING COBW3.

Data setting at calling

COBW3-COOKIE-NAME and COBW3-COOKIE-NAME-N

Specify a cookie name that is to be retrieved.

When COBW3_GET_COOKIE, COBW3_GET_COOKIE_XX or COBW3_GET_COOKIE_XN are used, specify the name in COBW3-COOKIE-NAME.

When COBW3_GET_COOKIE_NX or COBW3_GET_COOKIE_NN are used, specify the name in COBW3-COOKIE-NAME-N.

COBW3-COOKIE-NAME-LENGTH [Optional]

To retrieve a cookie name that has a valid blank at the end, specify the byte length of the blank-containing cookie name (character string).

Value

Explanation

0

Retrieves a cookie name up to the last character other than the blank.

When the COBW3-COOKIE-NAME or COBW3-COOKIE-NAME-N character string consists of only blanks, the character string length is assumed to be 0.

1 to 64

Retrieves a cookie name of the specified character string length.

Processing result data

COBW3-SEARCH-FLAG

Condition name

Value

Explanation

COBW3-SEARCH-FLAG-NON

"0"

The retrieved name was not found.

COBW3-SEARCH-FLAG-EXIST

"1"

The retrieved name was found.

COBW3-COOKIE-VALUE and COBW3-COOKIE-VALUE-N

The cookie value that corresponds to the retrieved cookie name is set.

When COBW3_GET_COOKIE, COBW3_GET_COOKIE_XX or COBW3_GET_COOKIE_NX are specified, the found value is set in COBW3-COOKIE-VALUE.

When COBW3_GET_COOKIE_XN or COBW3_GET_COOKIE_NN are specified, the found value is set in COBW3-COOKIE-VALUE-N.

COBW3-COOKIE-VALUE-LENGTH

The character string length (byte length) of the cookie value that corresponds to the retrieved cookie name is set.