Specifications

Chapter 7. Using awscmd 87
TAPE 0280 ATTACHED TO ZVMTEST 028F
Ready;
oscmd ls -al
STDOUT output-------
total 21699469
drwxrwxr-x 2 zvmtest zvmtest 4096 Aug 7 20:51 .
drwdr-xr-x 8 zvmtest zvmtest 4096 Aug 7 20:37 ..
-rw-rw-r-- 1 zvmtest zvmtest 2846431232 Jul 8 09:58 530OPT.ckd
-rw-rw-r-- 1 zvmtest zvmtest 2846431232 Jul 8 10:08 530PAG.ckd
(etc to list all the entries in the current Linux directory)
STDERR output----
COMMAND return code ----
0
Ready;
7.2 z/OS usage
Using the awscmd device with z/OS is more challenging than using it with z/VM for several
reasons:
򐂰 Tape drives are not readily manipulated by TSO users.
򐂰 z/OS wants to check tape volumes for labels, even if you specify a no-label tape volume.
򐂰 For practical purposes, an assembly program must be written to utilize the awscmd
functions.
You can write your own program. You may want to examine the sample program we have
provided in 7.2.1, “Sample z/OS program for awscmd” on page 88. This program looks for a
PARM field on the EXEC JCL statement and sends this as the command to Linux. If no PARM
field is present, it opens DDname SYSIN and sends the first line as the Linux command and
sends any additional lines as stdin for the Linux command. Output from the awscmd function
is printed on DDNAME SYSPRINT. A JCL DD statement is needed to allocate the
pseudo-tape drive for awscmd. Our example uses address 580 for the pseudo-tape because
this is a known 3480 address for our z/OS system.
Our devmap contains:
[manager]
name awscmd 20
device 560 3480 3480
Our sample program requires that an MVS initiator be enabled for BLP processing. This can
be done by changing the JES2 startup parameters or (for the duration of an IPL) by entering
the following command on the MVS console:
$T JOBCLASS(A),BLP=YES (you might want to use jobclass other than A)
We then mount a tape on the pseudo-tape drive for continued use. This avoids having to
respond to a mount message every time the sample program is run. The MVS command:
MOUNT 560,VOL=(NL,123456)
followed by the zPDT command:
$ ready 560
provides the necessary setup.