zospy.functions.nce.find_object_by_comment

zospy.functions.nce.find_object_by_comment#

zospy.functions.nce.find_object_by_comment(nce: ZOSAPI.Editors.NCE, comment: str, *, case_sensitive: bool = True) list[_ZOSAPI.Editors.NCE.INCERow]#

Retrieve objects from the Non-Sequential Component Editor that have the supplied string as Comment.

In case of multiple matches, the objects are returned in ascending order.

Parameters:
nceZOSAPI.Editors.NCE

The Non-sequential Component Editor (NCE).

commentstr

String that is searched for in the Comment column of the NCE.

case_sensitivebool=False

Flag that specifies whether the search is case-sensitive (default value) or not.

Returns:
list[ZOSAPI.Editors.NCE.INCERow]

A list of object in the NCE that have a Comment column value which matches the comment argument.

Examples

>>> import zospy as zp
>>> zos = zp.ZOS()
>>> oss = zos.connect()
>>> oss.make_nonsequential()
>>> nce_object_1 = oss.NCE.InsertNewObjectAt(1)
>>> nce_object_1.Comment = "aa"
>>> nce_object_2 = oss.NCE.InsertNewObjectAt(1)
>>> nce_object_2.Comment = "bb"
>>> nce_object_3 = oss.NCE.InsertNewObjectAt(1)
>>> nce_object_3.Comment = "aA"
>>> find_object_by_comment(oss.NCE, "aa")