User Guide

6-22 Ampex 1308911-02
Model No.
Running Head
dd2_getpos_tape DD-2 Utilities Manual Pages
%v_dis Current time code location on a DIS formatted cartridge. Displayed
as a string: ddd hh:mm:ss.sss
ENVIRONMENT
The $TAPE environment variable specifies the tape device to use if the
-f <device_special_file> option is omitted.
EXIT STATUS
The dd2 utilities use the following exit status codes, and may also produce output to -stdout
on success:
0 Operation succeeded.
nonzero Operation failed.
A nonzero return value describes the error encountered error during processing (see “Exit
Status” on page 6-5).
EXAMPLES
1. Display the current partition, file section, and logical data block number.
dd2_getpos_tape -stdout "%ptid %fsn %ldbn"
The above example might produce output like this:
0 2 165
2. Print the volume ID on one line, followed by the volume ID in hexadecimal on the next
line.
dd2_getpos_tape -stdout "%volid\n%hexvolid"
For volume tape01, the above example might produce output like this:
tape01
0x746170653031
3. Display the bytes remaining in the current partition. This example uses the -stdout option
to construct an instance of the expr command that multiplies the remaining capacity by
the physical block size. The built-in shell command eval runs the constructed command.
The backslash prevents interpretation of the asterisk by the shell.
eval ‘dd2_getpos_tape -stdout ’expr %remcap \* 1199840’‘
SEE ALSO
“DD-2 Utilities Overview” on page 6-1, dd2_setpos_tape, dst_getpos()