id - file identifier. By default, this is the IFS path to the file you want to download. However, it's also possible to pass some sort of a "key" value here that the PUIDNLEXIT exit program will look for. The exit program could then change it to an IFS path name on-the-fly. This is useful when you want to hide your IFS path names from the browser, or when you want the exit program to create a temporary file on-the-fly to be served to the browser.
inline (optional) - This controls how the content is delivered. If set to true, a new browser window/tab will be opened with the intention of displaying the downloaded content in that tab (if the browser supports it). If set to false (which is the default), the data will be sent as a download, and the user will be prompted to save it to disk or open it in another application.
contentType (optional) - This is the MIME content-type. When opening a document in-line, some browsers use this string to determine if it's capable of viewing the document in it's window, or whether an external viewer is needed. If this parameter is not given, the contentType will be assumed to be "application/octet-stream".
The following example downloads a PDF file from the /usr/share/accounting directory of the IFS. The user will be prompted to save this document to disk, because it was not specified as "inline":
This example passes "itemrpt" to the PUIDNLEXIT program. PUIDNLEXIT will have code in it to look for the "itemrpt" string, and then will generate a PDF of an item report, store it in a temporary file, and download it to be displayed in the browser. After the download is complete, PUIDNLEXIT will delete the temporary file. (Most of the needed logic is in the download program. See PUIDNLEXIT for details.)