Naming a Master File

In this section:

Master File names for FOCUS and fixed-format sequential data sources can be up to 64 characters long on z/OS, UNIX, and Windows platforms. Except where noted, this length is supported in all functional areas that reference a Master File.


Top of page

x
Using Long Master File Names on z/OS

In the z/OS environment, file and member names are limited to eight characters. Therefore, longer Master File names are assigned eight-character names to be used when interacting with the operating system. Use the following to implement Master File names longer than eight characters:


Top of page

x
Member Names for Long Master File Names in z/OS

How to:

Reference:

The DYNAM ALLOC command with the LONGNAME option automatically creates a member for the long Master File name in the PDS allocated to ddname HOLDMAST.

The member name consists of three parts: a prefix consisting of the leftmost characters from the long name, followed by a left brace character ({), followed by an index number. This naming convention is in effect for all long Master Files allocated using DYNAM or created using the HOLD command. The length of the prefix depends on how many long names have a common set of leftmost characters:

This process can continue until the prefix is one character and the index number is six characters. If you delete one of these members from the HOLDMAST PDS, the member name will be reused for the next new long name created with the same prefix.



Example: Long Master File Names and Corresponding Member Names

The following table lists sample long names with the corresponding member names that would be assigned under z/OS.

Long Name

Member Name

EMPLOYEES_ACCOUNTING
EMPLOY{0
EMPLOYEES_DEVELOPMENT
EMPLOY{1
EMPLOYEES_DISTRIBUTION
EMPLOY{2
EMPLOYEES_FINANCE
EMPLOY{3
EMPLOYEES_INTERNATIONAL
EMPLOY{4
EMPLOYEES_MARKETING
EMPLOY{5
EMPLOYEES_OPERATIONS
EMPLOY{6
EMPLOYEES_PERSONNEL
EMPLOY{7
EMPLOYEES_PUBLICATIONS
EMPLOY{8
EMPLOYEES_RESEARCH
EMPLOY{9
EMPLOYEES_SALES
EMPLO{00
EMPLOYEES_SUPPORT
EMPLO{01


x
Syntax: How to Implement a Long Master File Name in z/OS

To relate the short name to its corresponding long name, the first line of a long Master File contains the following attribute

$ VIRT = long_filename

where:

long_filename

Is the long name, up to 64 characters.



x
Syntax: How to Allocate a Long Master File Name in z/OS
DYNAM ALLOC DD ddname LONGNAME long_filename DS physical_filename

where:

ddname

Is the one-character to eight-character member name in a PDS allocated to DD MASTER.

long_filename

Is the long Master File name. The DYNAM command creates a copy of the short Master File in the PDS allocated to DD HOLDMAST. The member in HOLDMAST conforms to the eight-character naming convention for long names. The Master File has the $ VIRT attribute on the top line, which contains the long name.

Note: The copy, not the member ddname, is the Master File used when you reference the long name in a request.

physical_filename

Is the data set name of the FOCUS or fixed-format sequential data source.

After you have allocated the long name, you can reference the data source using the long Master File name or the short ddname.



x
Syntax: How to Free an Allocation for a Long Master File Name
DYNAM FREE LONGNAME long_filename

where:

long_filename

Is the long Master File name.

After issuing the DYNAM FREE LONGNAME command, you cannot reference the data source using the long Master File name. However, you can reference it using the short ddname that was specified in the DYNAM ALLOC command.



Example: Using a Long Master File Name on z/OS

To reference the EMPLOYEE data source as EMPLOYEE_DATA, dynamically allocate the long name:

DYNAM ALLOC DD EMPLOYEE LONGNAME EMPLOYEE_DATA -
  DS USER1.EMPLOYEE.FOCUS SHR REU

You can now issue a request using the long name:

TABLE FILE EMPLOYEE_DATA
PRINT CURR_SAL
BY LAST_NAME BY FIRST_NAME
END

The output is:

LAST_NAME        FIRST_NAME         CURR_SAL
---------        ----------         --------
BANNING          JOHN             $29,710.00
BLACKWOOD        ROSEMARIE        $21,790.00
CROSS            BARBARA          $27,072.00
GREENSPAN        MARY              $9,010.00
IRVING           JOAN             $26,872.00
JONES            DIANE            $18,490.00
MCCOY            JOHN             $18,490.00
MCKNIGHT         ROGER            $16,110.00
ROMANS           ANTHONY          $21,130.00
SMITH            MARY             $13,210.00
                 RICHARD           $9,510.00
STEVENS          ALFRED           $11,010.00

In this example, the long Master File will exist in the HOLDMAST PDS as member EMPLOY{0. The index number after the bracket depends on the number of existing long Master Files containing the same first six leftmost characters. The content of the EMPLOYEE_DATA Master File is virtually identical to the short Master File used in the allocation. The only difference is the $ VIRT keyword on line one, which contains the long name. The FILENAME parameter also contains the long name, up to 64 characters.

$ VIRT=EMPLOYEE_DATA
$ Created from EMPLOYEE      MASTER
FILENAME=EMPLOYEE_DATA,
SUFFIX=FOC
SEGNAME=EMPINFO,  SEGTYPE=S1
 FIELDNAME=EMP_ID,    ALIAS=EID, FORMAT=A9,  $
 FIELDNAME=LAST_NAME, ALIAS=LN,  FORMAT=A15, $
         .
         .
         .


x
Reference: Usage Notes for Long Master File Names

WebFOCUS