Specifications
© Copyright IBM Corp. 2009, 2013. All rights reserved. 85
Chapter 7. Using awscmd
The awscmd device manager provides a “device” that appears to System z software as a tape
drive. Its function is to send commands (and data) to the underlying Linux and then receive
the output from the Linux command. Any Linux command may be sent, including those that
could destroy the Linux system. Obviously, this device manager should be used with care and
may not be appropriate for a zPDT environment that can be accessed by untrusted users.
Configuration is similar to other device managers:
[manager]
name awscmd 20
device 560 3480 3480
device 561 3480 3480
The CUNUMBR (which is 20 in this example) is an arbitrary hexadecimal number (up to four
hex digits) that cannot duplicate the CUNUMBR used with any other device manager. We
show two devices here, but typically only one is needed. The device type can be 3420, 3422,
3480, 3490, or 3590; these are the tape device types emulated by zPDT. The device number
(560, 561) should match a corresponding device type in your z/OS IODF. (Any device number
may be used with z/VM.)
The intended operation is as follows:
1. A rewind is issued to the device.
2. The desired Linux command (expressed in EBCDIC) is written to the device.
3. Any stdin data to be used by the Linux command is written to the device.
4. EBCDIC to ASCII translation is done automatically.
5. A tape mark is written to the device.
6. At this point, the awscmd device manager submits the command (and data) to Linux
through a shell that does not appear on the Linux window. The current Linux directory for
the command is the directory that was used to start zPDT.
7. When the awscmd function completes there are four files on the pseudo-tape device:
– The command file that was submitted to Linux (with redirection operands that were
automatically added by awscmd)
7










