Specific method requests for z/OS files

The Z Data Tools Service Provider accepts the following JSON for specific method requests for z/OSĀ® files:

{
    "operation" :
    {
        "numRecords" : integer,
        "session" : boolean,
        "token"   : "string"
    },
    "position" :
    {
        "record" : integer,
        "key" : "string"
    }
}

Key fields for specific method requests are explained in the following table:

Key Description
operation Operation parameters affect the behavior of the service provider. All operation parameters are optional, but for performance reasons it is helpful to understand the correct use of the session and token parameters.
numRecords The number of records to retrieve. The acceptable range is 0 - 10000. The default is 1.
session Indicates whether to persist or end a Z Data Tools session. A value of true instructs the service provider to start the session (if it is not already started) and keep it active for subsequent API calls. A value of false instructs the service provider to end the session when the API call is complete.
token A session token, as returned in a previous API response. The token represents an active Z Data Tools session and can be used for subsequent reads following an initial read that sets "session" : true. A successful initial read request with "session" : true returns a token in the response.
position Position parameters affect the read position of the data resource. Can be a relative record position or a key position (if KSDS).
record Relative record read position. If requested, the service provider will position to the nominated relative record position before reading records. The default is 1 for an initial read, or the current record position for a subsequent read. A read is considered a subsequent read if a valid token is passed.
key Record key read position for KSDS. If requested, the service provider will position to the nominated key position or the next higher key position before reading records. The default is the first record for an initial read, or the current record position for a subsequent read. A read is considered a subsequent read if a valid token is passed.

The key value can be expressed as a string, for example: "ABC", "C'ABC DEF'", "X'C1F7'". The C'string' format must be used if the key value contains spaces or lowercase characters.

The key and record parameters are mutually exclusive.

All Z Data Tools Service Provider initial requests to read a data resource (that is, requests that do not pass a token) require an HTTP Basic Authorization header in the following form:

Authorization : Basic credentials_string

where credentials_string represents a Base64 encoding of userid:password. For example:

Authorization : Basic dXNlcmlkOnBhc3N3b3Jk