Python API classes

types


class zoautil_py.types.DDStatement(name, definition)


Bases: object

Description

  • DDStatement for use with zoautil_py.mvscmd.execute and similar functions.

Parameters



class zoautil_py.types.DataDefinition(name)


Bases: object

Description

  • Data definition to be used by zoautil_py.types.DDStatement.

Parameters

  • name (str) - Name of the definition.


class zoautil_py.types.Dataset(name, recfm=None, lrecl=None, block_size=None, dsorg=None, volume=None, last_referenced=None, used_space=None, total_space=None)


Bases: object

Description

  • Class that represents the z/OS dataset.

Parameters

  • name (str) – Name of the dataset.

  • recfm (str) – Record format of the dataset. None if unknown.

  • lrecl (int) – Record length of the dataset. None if unknown.

  • block_size (int) – Block size of the dataset. None if unknown.

  • dsorg (str) – Dataset organization of the dataset. None if unknown.

  • volume (str) – Volume the dataset resides on. None if unknown.

  • last_referenced (str) – Date when the dataset was last referenced. None if unknown.

  • used_space (int) – Estimated used space of the dataset. None if unknown.

  • total_space (int) – Estimated total space of the dataset. None if unknown.

Other methods

  • to_dict()
    • Converts zoautil_py.types.Dataset object to dictionary.
    • Returns
      • Dictionary including these keys:  name, recfm, lrecl, block_size, dsorg, volume, last_referenced, used_space, total_space.
    • Return type
      • dict


class zoautil_py.types.DatasetDefinition(dataset_name, disposition='SHR', type=None, primary=None, primary_unit=None, secondary=None, secondary_unit=None, normal_disposition=None, abnormal_disposition=None, conditional_disposition=None, block_size=None, record_format=None, record_length=None, storage_class=None, data_class=None, management_class=None, key_length=None, key_offset=None, volumes=None, dataset_key_label=None, key_label1=None, key_encoding1=None, key_label2=None, key_encoding2=None)


Bases: zoautil_py.types.DataDefinition

Description

  • Definition of z/OS dataset.

Parameters (All dataset attributes)

  • dataset_name (str)

  • disposition (str)

  • type (str)

  • primary (str)

  • primary_unit (str)

  • secondary (str)

  • secondary_unit (str)

  • normal_disposition (str)

  • abnormal_disposition (str)

  • conditional_disposition (str)

  • block_size (str)

  • record_format (str)

  • storage_class (str)

  • data_class (str)

  • management_class (str)

  • key_length (str)

  • key_offset (str)

  • volumes (str)

  • dataset_key_label (str)

  • key_label1 (str)

  • key_encoding1 (str)

  • key_label2 (str)

  • key_encoding2 (str)



class zoautil_py.types.FileDefinition(path_name, normal_disposition=None, abnormal_disposition=None, path_mode=None, status_group=None, file_data=None, record_length=None, block_size=None, record_format=None)


Bases: zoautil_py.types.DataDefinition

Description

  • Definition of an HFS file.

Parameters (all HFS file attributes)

  • path_name (str)

  • normal_disposition (str)

  • abnormal_disposition (str)

  • path_mode (str)

  • status_mode (str)

  • file_data (str)

  • record_length (str)

  • block_size (str)

  • record_format (str)



class zoautil_py.types.Job(id, name, owner, status, rc, job_class, svc_class, priority, asid, creation_datetime, queue_position, program_name)


Bases: object

Description

  • Representation of z/OS Job.

Parameters

  • id (str) - Job ID.

  • name (str) - Job Name.

  • owner (str) - Job Owner.

  • status (str) - Last known status of job.

  • rc (str) - Last known return code (rc) of job.

  • job_class (int) - Job class.

  • svc_class (int) - WLM service class.

  • priority (int) - Priority of job.

  • asid (int) - The Address Space Identifier (ASID) is a unique descriptor for the job address space.

  • creation_datetime (datetime) - Datetime object with the job's input start date and time.

  • queue_position (int) - Position of job on class queue or phase queue.

  • program_name (str) - Program name for the job's last completed step.

Other methods

  • cancel() - Cancels the job.

  • purge() - Purges the job from the queue.

  • refresh() - Refreshes the status and rc of the job.

  • wait() - Waits until status of the job is no longer active (AC).



class zoautil_py.types.ZOAUResponse(rc, stdout_response, stderr_response, command)


Bases: object

Description

  • ZOAU shell command execution response.

Parameters

  • rc (int) - The Return Code of the executed command.

  • stdout_response (str) - The standard_out of the executed command.

  • stderr_response (str) - The standard_out of the executed command.

  • command (str) -  The executed command.

Other methods

  • to_dict()
    • Description
      • Converts zoautil_py.types.ZOAUResponse object to dictionary.
    • Returns
      • Dictionary including these keys:  rc, stdout_response, stderr_response and command.
    • Return type
      • dict