Accessing Source Physical Files


Specifying a URL

The general format of a URL that accesses a source physical file (SRC-PF) member is as follows:

http://server:port/qsys.lib/library.lib/src.file/member.mbr

where,

server
is the fully qualified domain name of the machine that contains the resource.
port
is the socket port on the host machine that is running the HTTP server. The :port is optional. If it is not included, it defaults to port 80.
qsys.lib
indicates that the document is contained in the QSYS file system on the AS/400.
library.lib
name of the library in QSYS that contains the SRC-PF.
src.file
the name of the SRC-PF contained in the above library.
member.mbr
member in SRC-PF that contains the document. If the member is not included in the URL then the first member will be returned unless the MBR keyword is used.


Determining Content Type

The content type indicates the type of data that is being returned from the server to the browser. SRC-PF members will normally contain plain text or HTML data.

The following order is used to determine the content type of data stored in a SRC-PF member:


Authority

The server user profile must have at least *USE authority to the source physical file and library. The library containing the source physical file must be available through the configured include libraries.


Supported Keywords

The following keyword parameters are supported when processing SRC-PF members:

MBR(member)
Used to specify up to 10 characters for the name of SRC-PF member to process. The following special values can be used:

The member specified is case insensitive. This keyword is ignored if the member was previously found in the URL. If there is not a member specified in the URL then the first member is returned.

Samples:

SENDLEN(0 | 1)
Used to specify if the content length should be sent. Using the SENDLEN keyword overrides the send file content length configuration value. Valid values are:

Samples:

Samples are provided to demonstrate usage of keywords when retrieving documents from source physical files.


Restrictions

Data read from a SRC-PF member is always converted. The retrieval of binary data (e.g., image) from a SRC-PF member is not supported.


Examples

The following are examples of URLs that access SRC-PF members:
http://system/qsys.lib/library.lib/source.file/member.mbr
Member source type is blank or not a valid content type extension.

Returns MEMBER from file LIBRARY/SOURCE as a default content type document.

http://system/qsys.lib/library.lib/source.file/member.mbr
Member source type is TXT.

Returns MEMBER from file LIBRARY/SOURCE as a plain text document.

http://system/qsys.lib/library.lib/source.file/member.mbr
Member source type is HTML.

Returns MEMBER from file LIBRARY/SOURCE as a HTML document.

http://system/qsys.lib/library.lib/source.file/mbr.html.html
Member source type is not used to determine content type.

Returns MBR.HTML from file LIBRARY/SOURCE as a HTML document.

http://system/qsys.lib/library.lib/source.file.html?MBR(member)
Member source type is not used to determine content type.

Returns MEMBER from file LIBRARY/SOURCE as a HTML document.

http://system/qsys.lib/library.lib/source.file
Member source type is HTML.

Returns first member from file LIBRARY/SOURCE as a HTML document.

http://system/qsys.lib/library.lib/source.file.html?MBR(*FIRST)
Member source type is not used to determine content type.

Returns first member from file LIBRARY/SOURCE as a HTML document.

http://system/qsys.lib/library.lib/source.file.txt?MBR(*ALL)
Member source type is not used to determine content type.

Returns all members from file LIBRARY/SOURCE as one plain text document.