Migrating to ZOAU v1.3 from v1.2.x or earlier
To support several new capabilities, ZOAU v1.3 includes changes that are incompatible with previous versions of ZOAU. For an overview of additions and changes introduced by ZOAU release 1.3, see What's new with ZOAU.
To migrate to ZOAU v1.3, review the following changes and perform all relevant actions.
Migration actions for all users
Starting with ZOAU v1.3, the opercmd utility argument -T <TIMEOUT> returns time in hundredths of a second (0.01 sec) rather than seconds. Ensure that this new
unit of time produces expected results in any scripts or applications that use opercmd -T.
ZOAU v1.3 enables several utilities to support JSON output with a new schema. In previous versions of ZOAU, the utilities apfadm, dmod, dsed, and zinfo supported limited JSON output with a schema that is now obsolete, so any use of previous output must be updated. To learn more, see ZOAU JSON schema and examples.
ZOAU v1.3 does not document internal functions because they are not programming interfaces and can change at any time. Internal functions are denoted by a leading underscore, such as datasets._copy().
Migration actions for Python language pack users
ZOAU v1.3 brings changes and new functionality to the Python API. If you use the ZOAU Python language pack, review the following API changes and adjust your scripts and applications as needed. To learn more about new functionality, see Python APIs.
ZOAU v1.3 provides an updated approach to Python exception handling and a revised exception schema. To learn more, see exceptions.
Python API changes
The following changes affect the function of specific Python API modules.
Module definition changes
-
Module
types.pyis renamed toztypes.py. -
The contents of module
volumes.pyare moved todatasets.py. Thevolumes.pymodule is no longer available.
Changes to the datasets module
The datasets module includes changes to arguments, attributes, functions, and parameters. Migration-related changes are described as follows. To learn more about new dataset capabilities, see Python APIs - New capabilities in datasets.
For a full description of the datasets module, see Python API datasets module.
Changes to datasets classes and module attribute names are as follows:
-
The
datasetclass is relocated tozoautil_py.datasets.Dataset. -
Attribute
dsorgis renamed toorganization. -
Attribute
recfmis renamed torecord_format. -
Attribute
lreclis renamed torecord_length.
Changes to datasets module arguments, functions, and parameters are as follows:
-
The function
datasets.hlq()is renamed todatasets.get_hlq(). -
The function
datasets.listing()is renamed tolist_datasets(). -
The function
datasets.unzip()is renamed todatasets.dunzip(). -
The function
datasets.zip()is renamed todatasets.dzip(). -
In the function
datasets.tmp_name()the parameterhlqis renamed tohigh_level_qualifier. -
In the functions
datasets.blockinfile()anddatasets.lineinfile(), the parameterins_befis renamed toinsert_before, and the parameterins_aftis renamed toinsert_after. -
In the function
datasets.create()the parametertypeis renamed todataset_type. -
In the function
datasets.write()the parameterdatasetis renamed todataset_name. -
The function
Dataset.to_dict()is deprecated. Usevars(Dataset)orDataset.__dict__to get a dictionary containing all dataset attributes. -
The dictionary key
stepnameis renamed tostep_namein the output ofjobs.list_dds(). -
The dictionary key
datasetis renamed todd_namein the output ofjobs.list_dds().
- The new function
list_dataset_names()replaces thename_onlyparameter in the deprecateddatasets.listing()function, and should be used instead. To learn more, see Python API datasets module.
Changes to the jobs module
The jobs module includes changes to arguments, attributes, functions, and parameters. Migration-related changes are described as follows. To learn more about new jobs capabilities, see Python APIs - New capabilities in jobs.
For a full description of the jobs module, see Python API jobs module.
Job class and module attribute names changes
Changes to job classes and module attribute names are as follows:
-
The
jobclass is relocated fromzoautil_py.typesto thezoautil_py.jobsmodule. -
The
idattribute is renamed tojob_id. -
The
rcattribute is renamed toreturn_code. -
The new
purgedattribute is available to indicate purged jobs. This variable is exclusive to ZOAU's Python lib. -
The function
Job.to_dict()is deprecated. To get a dictionary containing all the dataset attribute, usevars(Job)orJob.__dict__.
Changes to jobs module functions
Changes to jobs module arguments, functions, and parameters are as follows:
-
The
waitparameter is removed. -
The
hfsparameter is renamed tois_unix. -
The parameter name
datasetis renamed tosourceinjobs.submit(). -
Several changes and new capabilities affect job fetch functionality. Learn more about the new capabilities at Python APIs - New capabilities in jobs. Changes include the following:
-
The
jobs.get()function is renamed tojobs.fetch() -
The
jobs.listing()function is renamed tojobs.fetch_multiple().
-
-
Several changes and new capabilities affect job canceling and purging. To learn more about the new capabilities, see Python APIs - New capabilities in jobs. Changes include the following:
-
The
jobs.cancel()function now includes a confirmation timeout that allows the user to wait until the job appears as cancelled on the system. -
A new
jobs.purge()function is available to purge canceled or finished jobs. -
As a migration action, note that the updated
jobs.cancel()function and the newjobs.purge()function always returnNone, whereas the return code from jcan was previously used. Details are described at Python APIs - New capabilities in jobs.
-