Create matching WORKDIR by running job HFIMKDIR

The HFIMKDIR job creates a work directory to be used with the server. It is supplied in the sample library hlq.SHFISAM1.

HFIMKDIR creates a directory hierarchy in the following form:

/etc/hfi/v11/hfisrv1
You can alter this to suit your site. You must update the WORKDIR statement in the server configuration to refer to the created directory. A unique path is recommended.
Tip: Do not use /tmp as a directory location.

The files in the work directory must be owned by the user ID of the ZCC server. The HFIMKDIR job issues the chown command to set the owner of the files and any sub-directories within the work directory. It is recommended to use a unique work directory that is not used by other program products. The file system containing the work directory must allow the user ID to be changed through the SETUID attribute. If the file system is mounted with the NOSETUID attribute, the APF extended attribute set by the HFIMKDIR job is ignored, resulting in abend code EC6 when connecting to the ZCC server.

Note: The HFIMKDIR job is expected to run with superuser authority. That is, HFIMKDIR must have READ access in the FACILITY class to BPX.SUPERUSER and BPX.FILEATTR.APF. The job will try to set the sticky bit attribute and the APF extended attribute. If these file attributes are not set correctly, attempts to start sessions using the ZCC server might fail with authorization errors or abend code EC6. After running this job you can check the extended file attribute in the job output or use the ls -E z/OS® UNIX command. For more information, see the HFIMKDIR sample member.

As an alternative to running the HFIMKDIR job, you can manually create the working directory and its contents by executing the following steps in z/OS® UNIX System Services:

  1. Start an OMVS session as superuser.
  2. Create the working directory. For example:
    mkdir /etc/hfi/v11/hfisrv1
  3. Create the set of session files in the working directory using the touch command:
    touch HFMCSEP Z Data Tools
    touch HFIVRFY Z Common Components
  4. Set the APF file attributes for Z Data Tools session files:
    extattr +a HFMCSEP
  5. Set the file ownership of the work directory and session files:
    chown <HFISRV> /etc/hfi/v11/hfisrv1
    chown <HFISRV> /etc/hfi/v11/hfisrv1/HFMCSEP
    chown <HFISRV> /etc/hfi/v11/hfisrv1/HFIVRFY
    Where <HFISRV> is the user ID that will run the ZCC server started task.
  6. Set the file permissions for the work directory and session files:
    chmod 755 /etc/hfi/v11/hfisrv1
    chmod 755 HFMCSEP
    chmod 755 HFIVRFY
  7. Set the sticky bit file attribute for all session files:
    chmod +t HFMCSEP
    chmod +t HFIVRFY