datarea - Read or write i5/OS(TM) data area
Synopsis
datarea -r [-l] [-s substring] data-area
datarea -w [-l] [-s substring] data-area
[ data ... ]
Description
The datarea utility reads or writes a data area.
In the first synopsis form, datarea reads the contents of the
data-area and writes it to standard output. By default, it reads the
entire data area.
In the second synopsis form, datarea writes to the
data-area. If data is specified, it is written
to the data-area. Otherwise, one line is read from standard input and written
to the data-area.
Options
- -l
- When a relative path name is specified, use the library list to find the data-area.
- -r
- Read from the data-area.
- -s substring
- For a character type data area, read or write the character positions specified by substring.
The substring is specified as a number range that consists of a number, a dash (-), and a
second number to select the character positions from the first number to the second number, inclusive.
If the first number is omitted, character positions from 1 to the second number are selected. If
the second number is omitted, character positions from the first number to the end of the data area
are selected.
- -w
- Write to the data-area.
Operands
The data-area is the path name to a data area. A data area can only exist in
the QSYS.LIB file system.
Exit Status
- 0 when successful
- >0 when unsuccessful
Related information