3

I am trying to access information about dataset members using IBM Z Open Automation Utilities.

What I want to know is if it is possible to view dataset information like version, creation date, etc. as well as being able to view information inside the dataset member using Python library zoautil_py

So far I am able to list all dataset members using:

from zoautil_py import datasets, jobs, zsystem
import sys
dsname = input("Enter the Sequential Data Set name: ")
if (datasets.exists(dsname) == True):
    print("Data set found! We will use it")
else:
    sys.exit("Without a data set name, we cannot continue. Quitting!")

members = datasets.list_members(dsname)

However I haven't found functions in the library that allows printing of members info.

Anyways, I am able to use another command-line to view dataset member attribute, which is the Zowe CLI.

So back to my question, is it achievable using the zoautil_py library?

Hogstrom
  • 3,581
  • 2
  • 9
  • 25
Fnechz
  • 151
  • 8

2 Answers2

3

Unfortunately, this isn't possible right now. The information I believe you are after is 'ISPF editor' information that is found in the PDS directory (open the PDS itself in 'read' mode from C). This sounds like a reasonable enhancement to add to the ZOAU list. If you wanted to 'roll your own' Appendix H of the V2.4 C/C++ Programming Guide https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R4sc147315/$file/cbcpx01_v2r4.pdf (page 1110, Listing Partitioned Data Set Members) has the C code to get the TTR members and the ISPF 'user fields' can be read from there.

mike
  • 819
  • 4
  • 14
1

You are almost correct, you just need to use the right path to read the dataset member. So let's say the dataset name is NPX.PUBLIC.DATA and you are trying to read the member memb1 you should access it like below:

result = datasets.read("NPX.PUBLIC.DATA(memb1)")