Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Using the TITLE option of the OPEN statement

You can use the TITLE option of the OPEN statement to identify the data set to be associated with a PL/I file, and, optionally, to provide additional characteristics of that data set.

Read syntax diagramSkip visual syntax diagram>>-TITLE--(expression)-----------------------------------------><
 

The expression must yield a character string with the following syntax:

Read syntax diagramSkip visual syntax diagram>>-+-alternate_ddname---------------+--------------------------><
   |           .------------------. |
   |           V                  | |
   '-/filespec---+--------------+-+-'
                 '-,--dd_option-'
 

alternate_ddname
The name of an alternate DD_DDNAME environment variable. An alternate DD_DDNAME environment variable is one not named after a file constant. For example, if you had a file named INVENTRY in your program, and you establish two DD_DDNAME environment variables—the first named INVENTRY and the second named PARTS—you could associate the file with the second one using this statement:
open file(Inventry) title('PARTS');
filespec
Any valid file specification on the system you are using. The maximum length of filespec is 1023 characters.
dd_option
One or more options allowed in a DD_DDNAME environment variable.

For more about options of the DD_DDNAME environment variable, see Specifying characteristics using DD_DDNAME environment variables.

Here is an example of using the OPEN statement in this manner with a z/OS DSN:

open file(Payroll) title('/June.Dat,append(n),recsize(52)');

Note the required leading forward slash in the TITLE option. This leading forward slash indicates that what follows is a file name (rather than a DD name). In this case, June.Dat refers to an MVS dataset.

If June.Dat is an HFS file, the example would look like this:

open file(Payroll) title('//u/USER/June.Dat,append(n),recsize(52)');

Note the two forward slashes in the TITLE option: the first indicates that what follows is a file name (rather than a DD name), and the second is the start of the fully-qualified HFS file name.

Relative HFS file names can also be specified in place of fully-qualified names. In the following example:

open file(Payroll) title('./June.Dat,append(n),recsize(52)');

The dataset name June.Dat will be prefixed with the pathname of the current z/OS UNIX directory.

With this form, PL/I obtains all DD information either from the TITLE expression or from the ENVIRONMENT attribute of a file declaration - a DD_DDNAME environment variable is not referenced.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)