Using the z/OSMF REST API
SMF data can be read from z/OS using the z/OSMF Dataset and Files REST API. This uses a https connection to z/OSMF to transfer the data.
Specify a URL as the input to the program e.g.
java -jar easysmf-events-v.r.m.jar --config <config-file> https://zosmf.example.com:10443/zosmf/restfiles/ds/MY.SMF.DATASET
The z/OSMF URL is somewhat flexible. It will also accept URLs of the form
https://zosmf.example.com:10443/MY.SMF.DATASEThttps://zosmf.example.com:10443/zosmf/MY.SMF.DATASET
and the program will normalize it to the form:
https://zosmf.example.com:10443/zosmf/restfiles/ds/MY.SMF.DATASET
z/OSMF Authentication
z/OSMF requires autheentication. Credentials can be supplied from:
- Credential files under
CREDENTIALS_DIRECTORY - A
.netrcfile in your home directory - An interactive prompt for userid and password
CREDENTIALS_DIRECTORY (recommended)
If the CREDENTIALS_DIRECTORY environment variable is set, EasySMF will read credentials from the following files:
| File | Contents |
|---|---|
CREDENTIALS_DIRECTORY/zosmf_userid | Userid for z/OSMF |
CREDENTIALS_DIRECTORY/zosmf_password | Password for z/OSMF |
See Credentials Directory for details.
netrc File
Create a .netrc file in your home directory with the following format:
machine zosmf.example.com
login your_userid
password your_password
Store your .netrc file with appropriate permissions (600 on Unix/Linux.
Interactive Prompt
If no credentials are supplied, the program will prompt for userid and password. This may be useful for initial testing.