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

3.9.1 COBW3_SET_COOKIE, COBW3_SET_COOKIE_XX, COBW3_SET_COOKIE_NX, COBW3_SET_COOKIE_XN, and COBW3_SET_COOKIE_NN

These subroutines register Cookie data to be sent to the WWW Browser. The registered Cookie data is used during header output.

The following lists the meaning of each subroutine:

ASCII environment

COBW3_SET_COOKIE

Registers an alphanumeric character string Cookie name and the corresponding Cookie value as alphanumeric character strings.

Unicode environment

COBW3_SET_COOKIE_XX

Registers an alphanumeric character string Cookie name and the corresponding Cookie value as alphanumeric character strings.

COBW3_SET_COOKIE_NX

Registers a national character string Cookie name and the corresponding Cookie value as alphanumeric character strings.

COBW3_SET_COOKIE_XN

Registers an alphanumeric character string Cookie name and the corresponding Cookie value as national character string.

COBW3_SET_COOKIE_NN

Registers a national character string Cookie name and the corresponding Cookie value as national character string.

Note

Use this subroutine before using COBW3_PUT_HTML or COBW3_PUT_TEXT. If this subroutine is used after COBW3_PUT_HTML or COBW3_PUT_TEXT is used even once, the specified information will become invalid.

The Cookie character code sent to the WWW Browser is always ASCII, regardless of the COBOL operation code system.

How to write

CALL "COBW3_SET_COOKIE" USING COBW3.
CALL "COBW3_SET_COOKIE_XX" USING COBW3.
CALL "COBW3_SET_COOKIE_NX" USING COBW3.
CALL "COBW3_SET_COOKIE_XN" USING COBW3.
CALL "COBW3_SET_COOKIE_NN" USING COBW3.

Data setting for calling

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

Set the COOKIE name to be registered.

For COBW3_SET_COOKIE, COBW3_SET_COOKIE_XX and COBW3_SET_COOKIE_XN, set the Cookie name to COBW3-COOKIE-NAME.

For COBW3_SET_COOKIE_NX or COBW3_SET_COOKIE_NN, set the Cookie name to COBW3-COOKIE-NAME-N.

COBW3-COOKIE-NAME-LENGTH [optional]

If the Cookie name has a valid blank at the end, set the string length (byte length) of the Cookie name including the blank.

Value

Meaning

0

Registers the Cookie name using the length up to the last character excluding the blank. However, if COBW3-COOKIE-NAME or COBW3-COOKIE-NAME-N is completely blank, the string length is set to zero for processing.

1 to 64

Registers the Cookie name using the specified string length.

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

Set the Cookie value.

For COBW3_SET_COOKIE, COBW3_SET_COOKIE_XX and COBW3_SET_COOKIE_NX, set the Cookie value to COBW3-COOKIE-VALUE.

For COBW3_SET_COOKIE_XN or COBW3_SET_COOKIE_NN, set the Cookie value to COBW3-COOKIE-VALUE-N.

COBW3-COOKIE-VALUE-LENGTH [optional]

If the Cookie value has a valid blank at the end, set the string length (byte length) of the Cookie value including the blank.

Value

Meaning

0

Registers the Cookie value using the length up to the last character excluding the blank. However, if COBW3-COOKIE-VALUE or COBW3-COOKIE-VALUE-N is completely blank, the string length is set to zero for processing.

1 to 1024

Registers the Cookie value using the specified string length.

COBW3-COOKIE-EXPIRES [optional]

Used to specify the expiration date of Cookie. This item has the following items (year, month, day, hour, minute, and second). Use GMT (Greenwich mean time) to specify the expiration date.

  • COBW3-COOKIE-EXPIRES-YEAR (year) (1582 to 9999)

  • COBW3-COOKIE-EXPIRES-MONTH (month) (01 to 12)

  • COBW3-COOKIE-EXPIRES-DAY (day) (01 to 31. However, the last day depends on the month)

  • COBW3-COOKIE-EXPIRES-HOUR (hour) (00 to 23)

  • COBW3-COOKIE-EXPIRES-MIN (minute) (00 to 59)

  • COBW3-COOKIE-EXPIRES-SEC (second) (00 to 59)

Note

If the expiration date is omitted, the Cookie data is deleted when the WWW Browser is terminated. It is also possible to delete Cookie data held currently by the WWW Browser by specifying a past time.

The time-zone difference between JST (Japan standard time) and GMT is nine hours. Therefore, the value obtained by subtracting 9 from JST becomes GMT.

To specify the expiration date, use a date of October 15, 1582 or later. If a date before this date is specified, the day of week cannot be calculated automatically and so the expiration date becomes invalid.

COBW3-COOKIE-DOMAIN [optional]

Specify the domain where Cookie is valid.

COBW3-COOKIE-PATH [optional]

Specify the virtual directory where Cookie is valid.

COBW3-COOKIE-SECURE [optional]

Specify the security. When security is enabled, Cookie data can be sent from the WWW Browser only if SSL is used.

Condition name

Value

Meaning

COBW3-COOKIE-SECURE-OFF

LOW-VALUE

Disables the security.

COBW3-COOKIE-SECURE-ON

"1"

Enables the security.

COBW3-COOKIE-MODE [optional]

Set the registration type of Cookie data.

Condition name

Value

Meaning

COBW3-COOKIE-MODE-ADDREP

LOW-VALUE

Adds Cookie data if the specified Cookie name has not been registered.

COBW3-COOKIE-MODE-REPLACE

"1"

Replaces Cookie data. If the specified Cookie name has not been registered, an error is output and no replacement is carried out.

COBW3-COOKIE-MODE-ADD

"2"

Adds Cookie data. If the specified Cookie name has been registered, an error is output and no addition is made.

Processing result data

None