ZosServer
The ZosServer object represents a single server. This object can be obtained using the Server property of ZosNetwork or the Item property of ZosServers.
ZosServer Properties
ZosServer exposes the following properties:
Property | Type | R/W | Description |
---|---|---|---|
Name | String | R | Name of the server. |
Description | String | R/W | Server description (volume label). |
Address | String | R/W | I/P address or DNS name. |
Port | Integer (long) | R/W | XCH port number of server. |
Secure | Boolean | R/W | Enables TLS security for all ports on this server, including ChangeMan ports. |
PasswordPhrase | Boolean | R/W | Indicates whether password phrases (long passwords) are allowed. |
DisablePort | Boolean | R/W | Disables XCH port. If the port is disabled, the “DataSets”, “Jobs”, and “Unix” folders are hidden and unavailable. |
MaxSessions | Integer (short) | R/W | Maximum number of concurrent sessions. |
User | String | R | User ID of currently logged on user. |
DataSetFolder (strPath) | Object (IZosDataSetFolder) | R | Data set folder with specified path name (relative to "DataSets" share name). |
JobFolder (strPath) | Object (IZosJobFolder) | R | Job folder with specified path name (relative to "Jobs" share name). |
ChangeManInstance (strName) | Object (IZosChangeManInstance) | R | ChangeMan ZMF folder with specified name. |
EbcdicCodePage | Integer (long) | R/W | Server code page number. |
ChangeManInstances | Object (IZosChangeManInstances) | R | Collection of all ChangeMan ZMF folders for server. |
LibTypes | Object (IZosLibypeMappings) | R | Collection of all library types for server. |
FileExtensions | Object (IZosFileExtensionMappings) | R | Collection of file extensions for server. |
DataSetFileFormats | Object (IZosFileFormatMappings) | R | Collection of file format mappings for data sets |
UnixFileFormats | Object (IZosFileFormatMappings) | R | Collection of file format mappings for Unix files. This property is available on version 7.1+ servers only. |
DataSetProfiles | Object (IZosDataSetProfiles) | R | Collection of all data set profiles for server. |
IsHidden | Boolean | R / W | Indicates that this server is hidden in the File Explorer and the ZDD user interface. This is a user-specific setting. |
ZosServer Methods
ZosServer exposes the following methods:
Logon Method
Log on to server.
Logon (
strUserId,
strPassword,
strNewPassword
)
Logoff Method
Log off from server.
Logoff()
NotifyChange Method
Notifies file system driver that a data set or member has been created or deleted by an external process.
NotifyChange(
strDataSetName,
strMemberName
)
SubmitJcl Method
Submit JCL to server. The bSuppressMessage parameter is optional. It is used to indicate whether message boxes should be suppressed. It is useful for running scripts in an automated tool where there is nobody present to press the OK button on a message box.
SubmitJcl (
strFileName,
bSuppressMessage,
bNotify
)
To suppress message boxes, specify:
bSuppressMessage = true
To display message boxes, specify:
bSuppressMessage = false
If this parameter is not specified, it defaults to false and message boxes will be displayed normally.
The bNotify parameter is optional. If bNotify is set to true, a notify job step will be added to the submitted job. The notify step will send you a message listing the return code for the job. |
Examples of using ZosServer:
Visual Basic or VBScript:
Dim objServer
Dim strUser
strUser = objServer.User
objServer.Address = "199.90.90.9"
objServer.Logon "USR001", "password"
objserver.NotifyChange "USR001.NEW.DATA", "MEMBER1"
objServer.SubmitJcl "C:\JCL\Print.jcl"
...
JScript:
var objServer;
var strUser;
strUser = objServer.User
objServer.Address = "199.90.90.9";
objServer.Logon("USR001", "password");
objserver.NotifyChange("USR001.NEW.DATA", "MEMBER1");
objServer.SubmitJcl("C:\JCL\Print.jcl");
...