Skip to content

File Conversion Services

The XML Services API provides file conversion services to import/export between z/OS PDS libraries and z/OS Unix HFS directories and files on the z/OS host. The following specific HFS file conversion functions are supported for general use:

  • Import a PDS Member into HFS — FILE SERVICE IMPORT

  • Export an HFS File to a PDS Library — FILE SERVICE EXPORT

Import a PDS Member into HFS — FILE SERVICE IMPORT

This function imports a native z/OS PDS (Partitioned Data Set) or PDSE (PDS Extended) library member into the z/OS Unix Hierarchical File System (HFS) as a standalone HFS file on the host. Access permissions for the resources requested must first be defined for you in your mainframe security system.

The XML service/scope/message names for a message to import a PDS member as an HFS file are:

<service name="file">
<scope name="service">
<message name="import">

These tags appear in both requests and replies. Case is significant.

FILE SERVICE IMPORT Requests

Data structure details for the <request> tag appear in Exhibit 8-19. All subtags are required.

Exhibit 8-19 FILE SERVICE IMPORT <request> Data Structure

Subtag Use Occurs Data Type & Length Values & Dependencies
<compression> Required 1 String (1) Compress the target file during import?
Y = Yes, compress the target HFS file.
N = No, do not compress the target file.
E = Expand the target HFS file if the source PDS member is compressed.
<mvsDsnLib> Required 1 String (1024), variable Fully qualified dataset name of source z/OS PDS/PDSE library. (Omit member name.)
<pathName> Required 1 String (1024), variable Name of the imported target HFS file, prefixed by path from installation root.
<pdsMember> Required 1 String (8), variable Name of PDS/PDSE library member to be imported.
<replace> Required 1 String (1) If an HFS file with the desired name already exists in the target location, should it be replaced with the imported file?
Y = Yes, replace an existing HFS file of the same name with the imported file.
N = No, cancel import if another HFS file with the desired name already exists.

FILE SERVICE IMPORT Results

No <result> data structure is returned in response to an XML HFS file import request. However, the reply message does return a standard <response> data structure to indicate the success or failure of the request.

Successful requests have a return code of 00. Unsuccessful requests have a return code of 04 or higher.

Export an HFS File to a PDS Library — FILE SERVICE EXPORT

This function exports an HFS file from the z/OS Unix Hierarchical File System (HFS) to a native z/OS PDS (Partitioned Data Set) or PDSE (PDS Extended) library member on the host. Access permissions for the resources requested must first be defined for you in your mainframe security system.

The XML service/scope/message names for a message to export an HFS file as a PDS library member are:

<service name="file">
<scope name="service">
<message name="export">

These tags appear in both requests and replies. Case is significant.

FILE SERVICE EXPORT Requests

Data structure details for the <request> tag appear in Exhibit 8-20. All subtags are required.

Exhibit 8-20 FILE SERVICE EXPORT <request> Data Structure

Subtag Use Occurs Data Type & Length Values & Dependencies
<compression> Required 1 String (1) Compress the target file during import?
Y = Yes, compress the target HFS file.
N = No, do not compress the target file.
E = Expand the target HFS file if the source PDS member is compressed.
<mvsDsnLib> Required 1 String (1024), variable Fully qualified dataset name of target z/OS PDS/PDSE library. (Omit member name.)
<pathName> Required 1 String (1024), variable Name of the source HFS file to export, prefixed by path from installation root.
<pdsMember> Required 1 String (8), variable Name of target PDS/PDSE library member to receive exported HFS file.

FILE SERVICE EXPORT Results

No <result> data structure is returned in response to an XML HFS file export request. However, the reply message does return a standard <response> data structure to indicate the success or failure of the request.

Successful requests have a return code of 00. Unsuccessful requests have a return code of 04 or higher.