DCAT(1)
NAME
dcat
- Print out a non-VSAM dataset.
SYNOPSIS
dcat [-bdhjJlv] 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.
-v
Print out verbose command information.
DESCRIPTION
dcat
prints out an entire non-VSAM dataset. It can be either a partitioned dataset member or a sequential dataset.
dcat
can print active generation datasets referenced by absolute or relative names.
EXAMPLES
Print the content of a sequential dataset:
dcat "IBMUSER.DATASET.ABC"
Print the content of a PDS member into a file:
dcat "IBMUSER.DATASET.PDS(MEMBER1)" >> sample.txt
Print in a readable JSON format:
dcat -J 'IBMUSER.MY.TEXT'
Output:
{
"data": {
"content": "Record 1
Record 2
"
},
"records": 2,
"content_length": 162
}
EXIT VALUES
0
dcat completed successfully.
non-zero
dcat failed. See error messages for details.