---
title: "Hierarchical file system (HFS) in Mainframe UNIX (2 of 2)"
description: "HFS files system to support UNIX on mainframe. Read more all details."
url: https://srinimf.com/2015/09/28/hierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2/
date: 2015-09-28
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2018/07/pexels-photo-1230150-e1535211646937.jpeg?fit=500%2C375&ssl=1
categories: ["Categories", "UNIX"]
tags: ["HFS files in Mainframe"]
type: post
lang: en
---

# Hierarchical file system (HFS) in Mainframe UNIX (2 of 2)

[Hierarchical File System](https://srinimf.com/2015/08/26/hierarchical-file-system-hfs-in-mainframe-unix-1-of-2/) is a UNIX compliant file system that runs under z/OS UNIX System Services. HFS has been functionally stabilized and will eventually be dropped from support. zFS is IBM’S preferred file system for Unix System Services files.

HFS file have DSTYPE=HFS and can be allocated using the IEFBR14 utility

```
//S1 EXEC  PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//DDNAME1  DD DSN=AX540.TEST1.HFS,
//            DISP=(NEW,CATLG),
//            SPACE=(1,(50,50,1)),AVGREC=K,
//            DSNTYPE=HFS
//*
```

The file information is a bit confusing as it looks like a cross between a PDS and a PDSE, but the difference is that the DSNTYPE is HFS as specified above.

HFS data sets contain a UNIX tree structure that makes sense to OMVS utilities, but not to Z/OS utilities in general. For example HFS files cannot be copied with IEBCOPY. **[You need to](https://srinimf.com/2012/05/11/5-tso-cmmands-you-need-to-know/) OMVS COPYTREE utility [to copy](https://srinimf.com/2015/09/30/how-to-copy-hfs-files-to-zfs-files-in-mainframe/) an HFS file. From TSO option 6, enter the following command : n.b. this is a foreground copy so it will lock your session out until it completes.**

Copytree /source/directory/path  target/directory/path

- Before you can use a new HFS it has to be mounted.

**To do this –**

- Use the command TSO ISHELL to get into OMVS Set up the DIRECTORY structure for your new file system. Select ‘FILE Systems’ from the top line menu and select the ‘Mount’ option. Update the following fields

MOUNT POINT (UNIX path)

FILE SYSTEM NAME (zOS dataset name)

FILE SYSTEM TYPE – HFS

Hit ‘Enter’ and your new file system should be mounted. You can use the MOUNT TABLE option from the *FILESYSTEMS* menu to check.

*Ref:lascon*

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F09%2F28%2Fhierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2018%2F07%2Fpexels-photo-1230150-e1535211646937.jpeg%3Ffit%3D500%252C375%26ssl%3D1&description=Hierarchical%20file%20system%20%28HFS%29%20in%20Mainframe%20UNIX%20%282%20of%202%29)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/09/28/hierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/09/28/hierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/09/28/hierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/09/28/hierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Hierarchical%20file%20system%20%28HFS%29%20in%20Mainframe%20UNIX%20%282%20of%202%29&body=https%3A%2F%2Fsrinimf.com%2F2015%2F09%2F28%2Fhierarchical-file-system-hfs-in-mainframe-unix-1-of-2-2%2F&share=email)
-

### Like this:

Like Loading…
