Skip to content

[Enhancement][zos_stat] Add support for members in zos_stat #2354

@fernandofloresg

Description

@fernandofloresg

Is there an existing issue for this?

  • There are no existing issues.

Enhancement or feature description

Description:

Enhance the zos_stat module to support a new member value in type option that retrieves detailed metadata for individual members within partitioned data sets (PDS/PDSE). This will allow users to gather ISPF-specific information about members, which is currently not available through existing options.

Background:
The zos_stat module currently retrieves facts from various z/OS resources including:

UNIX System Services files
Data sets
Generation data groups (GDGs)
Aggregates

However, there is no built-in support to extract metadata specific to members within a PDS/PDSE. This enhancement will fill that gap.

Proposed Enhancement:

Introduce a new value member for the type option in zos_stat. When this option is selected, the module will return the following ISPF member information:

Name – Member name
Prompt – ISPF prompt text
Lib – Library name
VV.MM – Version and modification level
Created – Creation date
Changed – Last changed date
Size – Member size
Init – Initial lines
Mod – Modified lines
ID – User ID of last modifier

and extended data set member attributes:
-Last user that modified the member
-Codeset name
-Last modification time

Example Usage:

- name: Retrieve ISPF member metadata
  zos_stat:
    name: 'MY.PDS.LIBRARY'
    type: member

Additional Notes:

We can ge this from mls attributes:
-https://www.ibm.com/docs/en/zoau/1.4.x?topic=commands-mls
-https://www.ibm.com/docs/en/zoau/1.4.x?topic=apis-members

Ansible module

zos_stat

Sub-issues

Metadata

Metadata

Labels

EnhancementEnhancement to existing collection content

Type

No type

Projects

Status

⚙ Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions