These subroutines register the cookie data that is to be sent to a WWW browser. The registered cookie data is used at header output.
These subroutines have the following functions:
ASCII environment
Registers, as an alphanumeric character string, the cookie value that corresponds to the cookie name, which is an alphanumeric character string.
Unicode environment
Registers, as an alphanumeric character string, the cookie value that corresponds to the cookie name, which is an alphanumeric character string.
Registers, as an alphanumeric character string, the cookie value that corresponds to the cookie name, which is a national character string.
Registers, as a national character string, the cookie value that corresponds to the cookie name, which is an alphanumeric character string.
Registers, as a national character string, the cookie value that corresponds to the cookie name, which is a national character string.
Note
These subroutines must be used before COBW3_PUT_HTML or COBW3_PUT_TEXT is used. If these subroutines are used after COBW3_PUT_HTML or COBW3_PUT_TEXT are executed, the specified information is invalidated.
The character code of the cookie to be sent to the WWW browser is ASCII without regard to the COBOL operation code system. A cookie is sent or received by applications other than COBOL applications, and is mainly used to send or receive key information. Therefore, the cookie should be set using ASCII characters.
Format
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 at calling
Specify a cookie name that is to be registered.
When COBW3_SET_COOKIE, COBW3_SET_COOKIE_XX or COBW3_SET_COOKIE_XN are used, specify the cookie name in COBW3-COOKIE-NAME.
When COBW3_SET_COOKIE_NX or COBW3_SET_COOKIE_NN are used, specify the cookie name in COBW3-COOKIE-NAME-N.
To register 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 | Registers a cookie name up to the last character other than the blank. However, if the COBW3-COOKIE-NAME or COBW3-COOKIE-NAME-N character string consists of only blank characters, the character string length is assumed to be 0. |
1 to 64 | Registers a cookie name of the specified character string length. |
Specify a cookie value.
When COBW3_SET_COOKIE, COBW3_SET_COOKIE_XX or COBW3_SET_COOKIE_NX are used, specify the cookie value in COBW3-COOKIE-VALUE.
When COBW3_SET_COOKIE_XN or COBW3_SET_COOKIE_NN are used, specify the cookie value in COBW3-COOKIE-VALUE-N.
When the cookie value has a valid blank at the end, specify the byte length of the blank-containing cookie value (character string).
Value | Explanation |
---|---|
0 | Registers a cookie value up to the last character other than the blank. However, if the COBW3-COOKIE-VALUE or COBW3-COOKIE-VALUE-N character string consists of only blank characters, the character string length is assumed to be 0. |
1 to 1024 | Registers a cookie value of the specified character string length. |
Specify an expiry date (year, month, day, hours, minutes, and seconds) of a cookie in Greenwich Mean Time (GMT) mode.
COBW3-COOKIE-EXPIRES-YEAR (year): 1582 to 9999
COBW3-COOKIE-EXPIRES-MONTH (month): 01 to 12
COBW3-COOKIE-EXPIRES-DAY (day): 01 to 31. The end day depends on the month.
COBW3-COOKIE-EXPIRES-HOUR (hours): 00 to 23
COBW3-COOKIE-EXPIRES-MIN (minutes): 00 to 59
COBW3-COOKIE-EXPIRES-SEC (seconds): 00 to 59
Note
If the expiry date was omitted, the related cookie data is deleted at the end of the WWW browser. Cookie data that is being held by the WWW browser can be deleted by specifying a past date.
The difference between Japan Standard Time (JST) and GMT is nine hours. Therefore, GMT is acquired by subtracting 9 from JST.
To specify an expiry date, use a date after October 15 in 1582. If an earlier date is specified, the day of the week cannot be automatically calculated and the specified expiry date is invalidated.
Specify a domain in which the specified cookie is valid.
Specify a virtual path on which the specified cookie is valid.
Specify the security status. When the security is valid, the WWW browser sends the cookie data only while SSL is being used.
Condition name | Value | Explanation |
---|---|---|
COBW3-COOKIE-SECURE-OFF | LOW-VALUE | Invalidates the security. |
COBW3-COOKIE-SECURE-ON | "1" | Validates the security. |
Specify the registration mode of the cookie data.
Condition name | Value | Explanation |
---|---|---|
COBW3-COOKIE-MODE-ADDREP | LOW-VALUE | Adds cookie data if the specified cookie name was not registered. |
COBW3-COOKIE-MODE-REPLACE | "1" | Replaces cookie data. If the specified cookie name was not registered, an abnormal end occurs (the cookie data is not replaced). |
COBW3-COOKIE-MODE-ADD | "2" | Adds cookie data. If the specified cookie name was already registered, an abnormal end occurs (the cookie data is not added). |
Processing result data
None