Page 3 of 3

Re: Finding out the name of a tape dataset

PostPosted: Mon Sep 19, 2011 1:16 am
by steve-myers
enrico-sorichetti wrote:...under BPXWDIN the token MSG(2) is valid and it refers to a FILE DESCRIPTOR ...
the content of file descriptor 2, will tell why and if the allocation failed ...
The 2 in MSG(2) is not a valid file descriptor. In this context a "file descriptor" is a DD name, and 2 is not a valid DD name. See the documentation for the MSG(...) token in this link.

Re: Finding out the name of a tape dataset

PostPosted: Mon Sep 19, 2011 1:50 am
by Robert Sample
From the link pointed to by steve myers:
Table 4. Additional keys used for dynamic allocation

MSG (WTP | default.S99MSG.|
stemname | fdnum)







Directs allocation messages to
your job log (WTP), a REXX stem,
or a file identified by a file
descriptor number. If this key is
not specified, messages will be
returned in the S99MSG. stem, if
possible. If BPXWDYN was not
called from a REXX environment,
the messages will be lost.

when fdnum (which is valid as shown above) is set to 2, Unix System Services, like Unix systems in general, will place messages on the STDERR output (wherever that may be pointing). MSG(2) is NOT a DD name nor a data set name but a file descriptor number and is perfectly valid for BPXWDYN.