gtpo1m5w | Operations |
Use this command to write the contents of a file to the standard output (stdout) stream in character, decimal, hexadecimal, or octal format.
Requirements and Restrictions
Format
|
Table 7. Additional Conversion Specifications for the ZFILE hex Command
Type | Argument | Output Format |
---|---|---|
%_ad | Not applicable. | Input data displacement for each line shown in decimal notation. The displacement is cumulative across all specified input files. |
%_ao | Not applicable. | Input data displacement for each line shown in octal notation. The displacement is cumulative across all specified input files. |
%_ax | Not applicable. | Input data displacement for each line shown in lowercase hexadecimal notation. The displacement is cumulative across all specified input files. |
%_aX | Not applicable. | Input data displacement for each line shown in uppercase hexadecimal notation. The displacement is cumulative across all specified input files. |
%_Ad | Not applicable. | Ending displacement shown in decimal notation. The displacement is cumulative across all specified input files and is displayed once at the end of the display. |
%_Ao | Not applicable. | Ending displacement shown in octal notation. The displacement is cumulative across all specified input files and is displayed once at the end of the display. |
%_Ax | Not applicable. | Ending displacement shown in lowercase hexadecimal notation. The displacement is cumulative across all specified input files and is displayed once at the end of the display. |
%_AX | Not applicable. | Ending displacement shown in uppercase hexadecimal notation. The displacement is cumulative across all specified input files and is displayed once at the end of the display. |
%_c | Not applicable. | EBCDIC characters. Nonprintable characters are displayed in hexadecimal except for those that can be represented by standard C language escape sequences (see the -c parameter for more information). |
%_p | Not applicable. | EBCDIC characters. Nonprintable characters are displayed as single periods (.). |
%_e | Not applicable. | EBCDIC characters. Nonprintable characters are displayed in hexadecimal with the exception of some control characters, which are displayed with their corresponding 3-character name. Table 8 shows how the control characters will be displayed with this conversion specification. |
When using the %_e conversion specification type, some
control characters are displayed as 3-character names rather than in
hexadecimal. The following table lists those control characters along
with each corresponding 3-character name.
Table 8. Control Character Display for the _e Conversion Specification in the ZFILE hex Command
00 -- nul | 01 -- soh | 02 -- stx | 03 -- etx |
04 -- sel | 05 -- _ht | 06 -- rnl | 07 -- del |
08 -- _ge | 09 -- sps | 0a -- _lf | 0b -- _vt |
0c -- _ff | 0d -- _cr | 0e -- _so | 0f -- _si |
10 -- dle | 11 -- dcl | 12 -- dc2 | 13 -- dc3 |
14 -- res | 15 -- _nl | 16 -- _bs | 17 -- poc |
18 -- can | 19 -- _em | 1a -- ubs | 1b -- cul |
1c -- ifs | 1d -- igs | 1e -- irs | 1f -- itb |
20 -- _ds | 21 -- sos | 22 -- _fs | 23 -- wus |
24 -- byp | 25 -- lf_ | 26 -- etb | 27 -- esc |
28 -- _sa | 29 -- sfe | 2a -- _sm | 2b -- csp |
2c -- mfa | 2d -- enq | 2e -- ack | 2f -- bel |
32 -- syn | 33 -- _ir | 34 -- _pp | 35 -- trn |
36 -- nbs | 37 -- eot | 38 -- sbs | 39 -- _it |
3a -- rff | 3b -- cu3 | 3c -- dc4 | 3d -- nak |
3f -- sub | 41 -- rsp | ca -- shy | e1 -- nsp |
ff -- _eo |
|
|
|
Additional Information
ZFILE HELP hex
ZFILE HELP
ZFILE ?
Table 9. Summary of Supported Conversion Specifications for the ZFILE hex Command
Supported Conversion Specifications | Allowable Byte Counts | |||||
---|---|---|---|---|---|---|
Specifier | Description | 1 | 2 | 4 | 8 | n |
_ad | Displacement in decimal |
|
|
|
| n |
_ao | Displacement in octal |
|
|
|
| n |
_ax | Displacement in lowercase hexadecimal |
|
|
|
| n |
_aX | Displacement in uppercase hexadecimal |
|
|
|
| n |
_Ad | End-of-file (EOF) displacement shown in decimal |
|
|
|
| n |
_Ao | End-of-file (EOF) displacement shown in octal |
|
|
|
| n |
_Ax | End-of-file (EOF) displacement shown in lowercase hexadecimal |
|
|
|
| n |
_AX | End-of-file (EOF) displacement shown in uppercase hexadecimal |
|
|
|
| n |
_c | EBCDIC display with nonprintable characters shown in C language standard escape notation or in hexadecimal | 1 |
|
|
|
|
_e | EBCDIC display with control characters shown using 3-character names or in hexadecimal | 1 |
|
|
|
|
_p | EBCDIC display with nonprintable characters shown as single periods (.) | 1 |
|
|
|
|
c | Unsigned character display | 1 |
|
|
|
|
d | Signed integer, decimal format display | 1 | 2 | 4 |
|
|
e | Double display, using [-]d.ddde±dd format |
|
| 4 | 8 |
|
E | Double display, using [-]d.dddE±dd format |
|
| 4 | 8 |
|
f | Double display, using [-]ddd.ddd format |
|
| 4 | 8 |
|
g | Similar to e; see the fprintf function in TPF C/C++ Language Support User's Guide for more details |
|
| 4 | 8 |
|
G | Similar to E; see the fprintf function in TPF C/C++ Language Support User's Guide for more details |
|
| 4 | 8 |
|
i | Signed integer display, decimal format | 1 | 2 | 4 |
|
|
o | Unsigned integer display, octal format | 1 | 2 | 4 |
|
|
s | String display (length must be specified) |
|
|
|
| n |
u | Unsigned integer display, decimal format | 1 | 2 | 4 |
|
|
x | Unsigned integer display, lowercase hexadecimal format | 1 | 2 | 4 |
|
|
X | Unsigned integer display, uppercase hexadecimal format | 1 | 2 | 4 |
|
|
ZFILE ls -l | grep JanThe result is filtered output from the ZFILE ls command displaying only the lines containing the word Jan in any position.
You can use pipes only with a combination of ZFILE commands where the command on the left-hand side of the pipe provides data through stdout and the right-hand side accepts data through stdin.
You can redirect the standard output (stdout) stream from the display terminal to a file by specifying one of the redirection characters (> or >>) followed by the file name to which you want the output written. The > character writes the output to a file. The >> character appends the output to an existing file.
You can redirect the standard error (stderr) stream from the display terminal to a file by specifying one of the redirection characters (2> or 2>>) followed by the file name to which you want the error output written. The 2> character writes the error output to a file. The 2>> character appends the error output to an existing file.
User: ZFILE echo \$PATH is $PATH System: $PATH is /bin:/usr/bin:.
left angle bracket (<) | right angle bracket (>) | ampersand (&) |
backquote (`) | backslash (\) | dollar sign ($) |
double quotation mark (") | new-line (\n) | left parenthesis ( ( ) |
right parenthesis ( ) ) | semicolon (;) | single quotation mark (') |
blank space | tab | vertical bar (|) |
asterisk (*) | equal sign (=) | left square bracket ( [ ) |
number sign (#) | question mark (?) | tilde (~) |
Examples
In the following example, the default display format is shown, where file filehex256 contains hexadecimal bytes 00 to ff. The display skips the first 192 bytes of this file.
+--------------------------------------------------------------------------------+ |User: ZFILE hex -s 192 filehex256 | | | |System: FILE0001I 09:41:23 START OF DISPLAY FROM hex -s 192 filehex256 | | 000000c0- c0c1c2c3 c4c5c6c7 c8c9cacb cccdcecf {ABCDEFG HI...... | | 000000d0- d0d1d2d3 d4d5d6d7 d8d9dadb dcdddedf }JKLMNOP QR...... | | 000000e0- e0e1e2e3 e4e5e6e7 e8e9eaeb ecedeeef \.STUVWX YZ...... | | 000000f0- f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 01234567 89...... | | 00000100 | | END OF DISPLAY | +--------------------------------------------------------------------------------+
In the following example, the -f parameter is used to re-create the default ZFILE hex display format as shown in the previous example. File filehex256 contains hexadecimal bytes 00 to ff. The display skips the first 192 bytes of this file. File SampleFormatFile contains the following three lines:
"%08.8_Ax\n" "%08.8_ax" "- " 4/1 "%02.2x" " " 4/1 "%02.2x" " " 4/1 "%02.2x" " " 4/1 "%02.2x" " " 8/1 "%_p" " " 8/1 "%_p" "\n"
+---------------------------------------------------------------------------------------------+ |User: ZFILE hex -s 192 -f SampleFormatFile filehex256 | | | |System: FILE0001I 09:41:23 START OF DISPLAY FROM hex -s 192 -f SampleFormatFile file... | | 000000c0- c0c1c2c3 c4c5c6c7 c8c9cacb cccdcecf {ABCDEFG HI...... | | 000000d0- d0d1d2d3 d4d5d6d7 d8d9dadb dcdddedf }JKLMNOP QR...... | | 000000e0- e0e1e2e3 e4e5e6e7 e8e9eaeb ecedeeef \.STUVWX YZ...... | | 000000f0- f0f1f2f3 f4f5f6f7 f8f9fafb fcfdfeff 01234567 89...... | | 00000100 | | END OF DISPLAY | +---------------------------------------------------------------------------------------------+
In the following example, file filehex256 contains hexadecimal bytes 00 to ff and is displayed using the lowercase hexadecimal format. The display skips the first 192 bytes of this file and shows only 16 bytes of data.
+--------------------------------------------------------------------------------+ |User: ZFILE hex -x -n16 -s192 filehex256 | | | |System: FILE0001I 09:41:23 START OF DISPLAY FROM hex -x -n16 -s192 filehex256 | | 000000c0 c0 c1 c2 c3 c4 c5 c6 c7 | | 000000c8 c8 c9 ca cb cc cd ce cf | | 000000d0 | | END OF DISPLAY | +--------------------------------------------------------------------------------+
In the following example, file filehex256 contains hexadecimal bytes 00 to ff and is displayed using both the EBCDIC character format and the lowercase hexadecimal character format. The display skips the first 192 bytes of this file and shows only 16 bytes of data.
+--------------------------------------------------------------------------------+ |User: ZFILE hex -cx -n16 -s192 filehex256 | | | |System: FILE0001I 09:41:23 START OF DISPLAY FROM hex -cx -n16 -s192 filehex256 | | 000000c0 { A B C D E F G | | 000000c0 c0 c1 c2 c3 c4 c5 c6 c7 | | 000000c8 H I ca cb cc cd ce cf | | 000000c8 c8 c9 ca cb cc cd ce cf | | 000000d0 | | END OF DISPLAY | +--------------------------------------------------------------------------------+
Related Information
See ZDFIL-Display File for more information about the ZDFIL command.