16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

dd<br />

Options<br />

2. If this input block is smaller than the specified input block size, dd pads it to the<br />

specified size with null bytes. When you also specify a block or unblock<br />

conversion, dd uses spaces instead of null bytes.<br />

3. If you specified bs=s and requested no conversion other than sync or noerror,<br />

dd writes the padded (if necessary) input block to the output as a single block<br />

and omits the remaining steps.<br />

4. If you specified the swab conversion, dd swaps each pair of input bytes. If there<br />

is an odd number of input bytes, dd does not attempt to swap the last byte.<br />

5. dd performs all remaining conversions on the input data independently of the<br />

input block boundaries. A fixed-length input or output record may span these<br />

boundaries.<br />

6. dd gathers the converted data into output blocks of the specified size. When dd<br />

reaches the end of the input, it writes the remaining output as a block (without<br />

padding if conv=sync is not specified). As a result, the final output block may be<br />

shorter than the output block size.<br />

bs=size<br />

Sets both input and output block sizes to size bytes. You can suffix this<br />

decimal number with w, b, k, or x number, to multiply it by 2, 512, 1024, or<br />

number, respectively. You can also specify size as two decimal numbers<br />

(with or without suffixes) separated by x to indicate the product of the two<br />

values. Processing is faster when ibs and obs are equal, since this avoids<br />

buffer copying. The default block size is 1B. bs=size supersedes any<br />

settings of ibs=size or obs=size.<br />

If you specify bs=size and you request no other conversions than noerror,<br />

notrunc, or sync, dd writes the data from each input block as a separate<br />

output block; if the input data is less than a full block and you did not<br />

request sync conversion, the output block is the same size as the input<br />

block.<br />

cbs=size<br />

Sets the size of the conversion buffer used by various conv options.<br />

conv=conversion[, conversion, ...]<br />

conversion can be any one of the following:<br />

230 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference<br />

ascii Converts EBCDIC input to ASCII for output; it is provided for<br />

compatibility purposes only.<br />

To copy a file and convert between a shell code page and ASCII,<br />

use iconv, not dd.<br />

block Converts variable-length records to fixed-length records. dd treats<br />

the input data as a sequence of variable-length records (each<br />

terminated by a newline or an EOF character) independent of the<br />

block boundaries. dd converts each input record by first removing<br />

any newline characters and then padding (with spaces) or<br />

truncating the record to the size of the conversion buffer. dd reports<br />

the number of truncated records on standard error (stderr). You<br />

must specify cbs=size with this conversion.<br />

Note: When working with doublebyte characters, dd truncates the<br />

record after the last complete doublebyte character that will<br />

fit in the conversion buffer. dd then pads the record with<br />

spaces if it is shorter than the conversion buffer size.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!