DTAIL(1)
NAME
dtail - Print out the tail of a non-VSAM dataset.
SYNOPSIS
dtail [-bdhjJlv] [-n [+-]NUM] DATASET
-b
Prints out dataset contents in "binary mode".
-d
Print out debug messages.
-h
Display syntax help.
-j
Print output in JSON format.
Options -b (binary mode) and -l (newline suppression) are ignored,
and do not affect JSON output. This means records with NULL bytes
get truncated and each record is followed by a line break.
Output appears in this form:
{ "data": { "content": "..." }, "records":<records printed>,
"content_length":<characters read from the dataset> }
-J
Prints JSON output in a readable format.
This option forces -j if it was not set.
-l
Suppresses printing of newline characters between dataset records.
-n NUM
Controls the number of lines displayed from the dataset.
See DESCRIPTION for details.
-v
Print out verbose command information.
DESCRIPTION
dtail prints out the tail of a non-VSAM dataset, which can be either a partitioned dataset member or a sequential dataset.
dtail can print active generation datasets referenced by absolute or relative names.
If a negative number NUM is specified, the last NUM lines of the dataset are printed to stdout.
If a positive number NUM is specified, the first (NUM - 1) lines of the dataset are skipped and printing starts from line NUM.
If the number NUM does not have a sign (e.g. -n NUM) it is treated as if a negative number was specified (this is consistent with tail).
If no number is specified, the last 10 lines are printed.
EXAMPLES
Print the last 10 lines of the dataset ZOAU.EXAMPLE:
dtail ZOAU.EXAMPLE
Print the entire contents of the dataset ZOAU.EXAMPLE:
dtail -n +1 ZOAU.EXAMPLE
Print the last 5 lines of the dataset ZOAU.EXAMPLE in binary mode:
dtail -n 5 -b ZOAU.EXAMPLE
Display the last two records of IBMUSER.MY.TEXT in a readable JSON format:
dtail -J -n 2 'IBMUSER.MY.TEXT'
Output:
{
"data": {
"content": "Record 09
Record 10
"
},
"records": 2,
"content_length": 162
}
EXIT VALUES
0
dtail completed without error.
non-zero
dtail failed. See error messages for details.