Subroutine Name | Executable Example | Viewable Example | Resources |
---|---|---|---|
W3LOAD-RESOURCE |
E3RESOUR |
E3RESOUR |
E3SAVE.HTML |
- Description
Load a file from the resource directory of a given library into the output page.
If no library is specified, use the current library.
Use together withW3REPLACE
for template processing.Data is loaded as binary or alpha - depending on the settings of "MIMEDATA" and "MIMETYPE".
UseW3MIME-TYPE
to evaluate the mime-type for the given file extension.- Parameters
1 W3LIBRARY (A8) DYNAMIC BY VALUE OPTIONAL /* i /o : Natural Library ID 1 W3RESOURCE-FILE (A) DYNAMIC BY VALUE /* i /m : File Name 1 W3RESPONSE (I4) OPTIONAL /* o/o : ResponseIf the
W3RESPONSE
parameter is not specified, the Web Interface error processing is triggered if an error occurs. If theW3RESPONSE
parameter is specified, the parameter contains the Natural message number if an error occurred, or zero on success.- How To Invoke
PERFORM W3LOAD-RESOURCE W3LIBRARY W3RESOURCE-FILE PERFORM W3LOAD-RESOURCE " " "templ.html" PERFORM W3LOAD-RESOURCE 1X "templ.html"- Restriction
Load Resource is only available on Natural for Windows and UNIX supporting non-natural files/resources. Internally it uses workfile 12.