Start of change

SERVER_SHARE_INFO view

The SERVER_SHARE_INFO view returns information about IBM® i NetServer shares.

This information is similar to what is returned by the List Server Information (QZLSLSTI) and Open List of Server Information (QZLSOLST) APIs.

Authorization: None required.

The following table describes the columns in the view. The system name is SHARE_INFO. The schema is QSYS2.

Table 1. SERVER_SHARE_INFO view
Column Name System Column Name Data Type Description
SERVER_SHARE_NAME SHARE VARCHAR(12) The network name of the resource.
SHARE_TYPE SHARE_TYPE VARCHAR(5) The type of share.
FILE
This is a file share
PRINT
This is a print share
TEXT_DESCRIPTION TEXT VARCHAR(50)
Nullable
An optional comment about the shared resource or computer.

Contains the null value if there is no text description.

ENCRYPTION_REQUIRED ENCRYPTION VARCHAR(3) Whether the server requires access to the share to use encryption.
NO
Access to the share does not require encryption
YES
Access to the share can only be made from an SMB 3 or newer client with encryption enabled. Unencrypted access to this share is denied.

The following columns can contain values when SHARE_TYPE is FILE. They will contain the null value when SHARE_TYPE is PRINT.

PATH_NAME PATH_NAME DBCLOB(16M) CCSID 1200
Nullable
The file share path in the integrated file system.

Contains the null value when SHARE_TYPE is PRINT.

PERMISSIONS PERMISSION VARCHAR(3)
Nullable
Permissions to be applied against the file for sharing.
*R
Read only
*RW
Read/write

Contains the null value when SHARE_TYPE is PRINT.

MAXIMUM_CONNECTIONS MAX_CONN INTEGER
Nullable
The maximum number of concurrent connections that the shared file resource can accommodate.

Contains the null value if the number is unlimited or SHARE_TYPE is PRINT.

CURRENT_CONNECTIONS CUR_CONN INTEGER
Nullable
The number of connections that are currently made to the resource.

Contains the null value if the value could not be returned or SHARE_TYPE is PRINT.

TEXT_CONVERSION_ENABLED TEXT_CONV VARCHAR(5)
Nullable
Whether the server enables text file data conversion for this file share.
MIXED
Text conversion enabled and mixed data is allowed
NO
Text conversion not enabled
YES
Text conversion enabled

Contains the null value when SHARE_TYPE is PRINT.

TEXT_CONVERSION_CCSID TEXT_CCSID INTEGER
Nullable
The CCSID that is used for text file data conversion. If the value is 0, no CCSID was specified so the IBM i NetServer's default CCSID will be used.

Contains the null value if TEXT_CONVERSION_ENABLED is NO or when SHARE_TYPE is PRINT.

FILE_EXTENSION_COUNT EXT_COUNT INTEGER
Nullable
The number of file extension entries returned in FILE_EXTENSIONS.

Contains the null value when SHARE_TYPE is PRINT.

FILE_EXTENSIONS EXTENSIONS VARBINARY(5000)
Nullable
A string containing a list of file extensions. The format of each entry is a 2 byte integer length followed by that number of characters followed by a single blank. If there are more file extensions than what fit in this column, the last file extension in the list will have a length of 3 with a value of +++ to indicate the list was truncated.
Examples of extensions are:
*
The server will convert all files.
.
The server will convert all files without an extension.
TXT, .TXT
The server will convert all files ending with .TXT (that is, a.TXT, a.b.c.TXT).
..TXT, ...TXT, ......TXT
Extensions with more than one leading period will have no effect on the server. No translation will be done.
T*T
The server will convert all files ending with an extension that substitutes any number of characters for the * wild card (that is, a.T123T, b.TXT, c.TEST).
T?T
The server will convert all files ending with an extension that substitutes any one character for the ? wild card (that is, a.T1T, b.TXT).

Contains the null value when SHARE_TYPE is PRINT.


The following columns can contain values when SHARE_TYPE is PRINT. They will contain the null value when SHARE_TYPE is FILE.

SPOOLED_FILE_TYPE SPOOL_TYPE VARCHAR(9)
Nullable
The type of spooled files that will be created using this print share.
AFP
Advanced Function Presentation
AUTOSENSE
Automatic type sensing
SCS
Simplified Character Set
USERASCII
User ASCII

Contains the null value when SHARE_TYPE is FILE.

OUTPUT_QUEUE_LIBRARY OUTQLIB VARCHAR(10)
Nullable
The library containing the output queue.

Contains the null value when SHARE_TYPE is FILE.

OUTPUT_QUEUE OUTQ VARCHAR(10)
Nullable
The name of the output queue.

Contains the null value when SHARE_TYPE is FILE.

PRINT_DRIVER PRT_DRIVER VARCHAR(50)
Nullable
The text string that identifies the print driver appropriate for this print share. When personal computers connect to this shared printer, this identifies the print driver they should use. This text should match the name of a print driver known to the personal computer operating system.

Contains the null value when there is no print driver or when SHARE_TYPE is FILE.

PRINTER_FILE_LIBRARY PRTF_LIB VARCHAR(10)
Nullable
The library containing the printer file.

Contains the null value when there is no printer file or when SHARE_TYPE is FILE.

PRINTER_FILE PRTF VARCHAR(10)
Nullable
The name of the printer file.

Contains the null value when there is no printer file or when SHARE_TYPE is FILE.

PUBLISH_PRINT_SHARE PUBLISH VARCHAR(3)
Nullable
Whether the print share is to be published
NO
Print share is not published
YES
Print share is published

Contains the null value when SHARE_TYPE is FILE.

Example

  • List all the file shares.
     SELECT * FROM QSYS2.SERVER_SHARE_INFO 
      WHERE SHARE_TYPE = 'FILE';
End of change