ZosNameFilters
The ZosNameFilters object is a collection of all name filters for a folder. This object is obtained using the Filters property of the ZosDataSetFolder object or the Filters property of the ZosChangeManInstance object.
ZosNameFilters Properties
ZosNameFilters exposes the following properties:
Property | Type | R/W | Description |
---|---|---|---|
[index] [name] | String | R | Filter with specified index or data set name pattern. |
Count | Int32 | R | Number of objects in collection. |
Path | String | R | File system path name for collection. |
ZosNameFilters Methods
ZosNameFilters exposes the following methods:
Add Method
Adds a new name filter.
void Add(
String name
)
FindIndex Method
Searches for filter with specified name and returns zero-based index. Returns -1 if name is not found.
Int32 FindIndex(
String name
)
FromArray Method
Copies the contents of a one-dimensional array into the collection. The existing contents of the collection are completely replaced.
void FromArray(
String[] array
)
Refresh Method
Refreshes collection.
void Refresh()
Remove Method
Deletes a filter, specified by name. Returns true if item was removed or false if item is not found.
Boolean Remove(
String name
)
RemoveAt Method
Deletes a filter, specified by index.
void RemoveAt(
Int32 index
)
ToArray Method
Copies the entire collection to a one-dimensional array.
String[] ToArray()
ZosNameFilters Examples
Examples of using ZosNameFilters are shown below:
C#
ZosNameFilters filters;
String[] filterArray = new String[]
{
"**.ASM",
"**.JAVA"
};
filters.FromArray(filterArray);
filters.Add("**.COBOL");
filters.Remove(“**.LIST”);
...
C++
ZosNameFilters^ filters;
array<String>^ filterArray =
{
"**.ASM",
"**.JAVA"
};
filters.FromArray(filterArray);
filters->Add("**.COBOL");
filters->Remove(“**.LIST”);
...
Visual Basic
Dim filters As ZosNameFilters
Dim filterArray() As String = _
{ _
"**.ASM", _
"**.JAVA" _
} filters.FromArray(filterArray)
filters.Add("**.COBOL")
filters.Remove(“**.LIST”)
...
Jscript
var filters : ZosNameFilters;
var filterArray : String[] =
[
"**.ASM",
"**.JAVA"
];
filters.FromArray(filterArray);
filters.Add("**.COBOL");
filters.Remove(“**.LIST”);
...