AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | SCO | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Specifies text for the HTTP header.
You must have this variable set before Net.Data processes any text sent to the Web browser, because Net.Data reads this variable once before displaying text and does not look at it again. Any changes to the DTW_PRINT_HEADER variable are ignored after Net.Data has sent text to the browser.
If you are using DTW_PRINT_HEADER to generate your own headers (DTW_PRINT_HEADER = "NO"), you must set DTW_REMOVE_WS to "NO".
Specify the value of this variable using a DEFINE statement or with the @DTW_ASSIGN() function.
Values
DTW_PRINT_HEADER="YES"|"NO"
Table 24. DTW_PRINT_HEADER Values
Values | Description |
---|---|
YES | Net.Data prints out the text Content-type: text/html for the HTTP header. YES is the default. |
NO | Net.Data does not print out an HTTP header. You can generate custom HTTP header information. |
Examples
One of the most common uses of this variable is to enable Net.Data macros to send cookies. To set a cookie, the DTW_PRINT_HEADER variable must be set to NO, and the first three lines must be the Content-type header, the Set-Cookie statement, and a blank line.
Example 1: Enabling Net.Data to send a cookie
%DEFINE DTW_PRINT_HEADER="NO" %HTML(cookie1) { Content-type: text/html Set-Cookie: UsrId=56, expires=Friday, 12-Dec-99, 12:00:00 GMT; path=/ <P> Any text %}