Determine if there's scope to handle tags for z/OS UNIX files.
Perhaps put_file can tag the file after copying it to the destination.
Perhaps fetch_file can read the tag to determine how to decode the file (and possibly convert it to utf-8)
The zos-util package contains python functions for checking extended file attributes, e.g.:
tag_info = zos_util.get_tag_info(fpath)
zos_util.chtag(fpath, 1047)
A potential concern may be raised that such changes will require new package imports. While true, those import(s) can be wrapped inside a conditional to even set a boolean variable is_zos_target
try:
import zos-util
is_zos_target: True # import only succeeds for z/OS
except ImportException:
is_zos_target: False
And now, function logic can leverage the is_zos_target boolean.
The ssh connection plugin has functions put_file and fetch_file.
Determine if there's scope to handle tags for z/OS UNIX files.
put_file
can tag the file after copying it to the destination.fetch_file
can read the tag to determine how to decode the file (and possibly convert it to utf-8)The zos-util package contains python functions for checking extended file attributes, e.g.:
tag_info = zos_util.get_tag_info(fpath)
zos_util.chtag(fpath, 1047)
A potential concern may be raised that such changes will require new package imports. While true, those import(s) can be wrapped inside a conditional to even set a boolean variable
is_zos_target
And now, function logic can leverage the
is_zos_target
boolean.