gtpo1m5qOperations

ZFILE dd-Convert and Copy a File

Use this command to convert the contents of a file to a specified format and display the contents or copy the contents to another file.

Requirements and Restrictions

Format




if=inpath
specifies the input file, where inpath is the path name of the file you are converting. If you do not specify this parameter, the input file is read from the standard input (stdin) stream.

of=outpath
specifies the output file, where outpath is the path name of the file in which you want to store the data. If you do not specify this parameter, the data is written to the standard output (stdout) stream.

conv
specifies the type of conversion, where:

ascii
converts the data from EBCDIC to ASCII.

ebcdic
converts the data from ASCII to EBCDIC.

lcase
converts the data to lowercase.

ucase
converts the data to uppercase.

Additional Information

Examples

In the following example, the contents of file /etc/hello.txt are converted to uppercase and displayed on a CRAS terminal. In addition, the number of bytes processed are written to the standard error (stderr) stream.

+---------------------------------------------------------------------------------------------+
|User:   ZFILE dd if=/etc/hello.txt conv=ucase                                                |
|                                                                                             |
|System: FILE0001I 11:41:45 START OF DISPLAY FROM dd if=/etc/hello.txt conv=ucase             |
|        HELLO                                                                                |
|        END OF DISPLAY                                                                       |
|        FILE0002I 11.41.45 START OF ERROR DISPLAY FROM dd if=/etc/hello.txt conv=ucase       |
|        0.1 records in                                                                       |
|        0.1 records out                                                                      |
|        6 bytes transferred in 1 secs (6 bytes/sec)                                          |
|        END OF DISPLAY                                                                       |
+---------------------------------------------------------------------------------------------+

Related Information

See Information Technology--Portable Operating System Interface for Computer Environments (POSIX) for more information about the POSIX standards.