The task is used to retrieve a single text or binary file from z/OS® via FTP.
The task supports Build Extensions Debugging Attributes and Build Extensions General Attributes, as well as, its own task specific attributes. Click on a link for more information on the common attributes.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| binaryFile |
If true, a binary transfer is performed. If false (the default), a text transfer is performed.
|
No |
| deleteFile |
If true, the z/OS file is deleted after the file is successfully transferred. If false (the default), the z/OS file is not deleted.
|
No |
| property | The name of the Ant property in which to return the path to the fetched file. | No |
| work |
The work directory for the zOSFetch build. The transferred file will be written to the work directory by zOSFetch. If this attribute is not specified, it will default to the ".work" sub-directory of the base directory. For example: if the base directory is C:\MyFolder\base\ the work directory will be C:\MyFolder\base\.work\.
|
No |
| fileName | Override value for the local file name. The default file name is the last token of the data set name when zosDataset is specified and the member name when zosLibrary is specified. | No |
| fileType | Override value for the local file type. The default file type is "txt" for a text transfer and "bin" for a binary transfer. | No |
| zosCodePage | Specifies the name of the z/OS FTP code page to use when retrieving a file. If a code page is not specified, the default code page is used. The default code page is locally defined on the specified z/OS system. | No |
| zosDataset | Specifies the name of the z/OS sequential data set to fetch. Specify either the zosDataset or the zosLibrary attribute. One of the two attributes is required. Specifying both attributes is invalid. | Yes* |
| zosHost | Specifies the URL of the z/OS host. | Yes |
| zosLibrary | Specifies the name of the z/OS PDS data set where the member to be fetched is located. Specify either the zosDataset or the zosLibrary attribute. One of the two attributes is required. Specifying both attributes is invalid. | Yes* |
| zosMember | Specifies the name of the member to fetch. If zosLibrary is specified, zosMember is required. | Yes* |
| zosPassword | Specifies the encrypted password to use when logging onto the z/OS system. | Yes |
| zosUser | Specifies the user ID for authentication to the z/OS system. | Yes |
Encrypted passwords can be generated by the zOSPassword task or by the zImportGetPassword Java application. To generate an encrypted password with the zOSPassword task refer to the zOSPassword Task Reference. To generate an encrypted password with the zImportGetPassword Java application, issue the following command from a Windows command prompt window:
java -classpath path_to_jar\com.ibm.team.enterprise.smpe.build.scmutilities.jar
com.ibm.team.enterprise.smpe.toolkit.internal.zimport.util.zImportGetPassword pw
substituting "path_to_jar" with the actual path to the jar file, "pw" with the actual password, and substituting the jar bundle version (_1.0.0.v20161214_0308) with the one in the version of the toolkit you installed. You will need to navigate to the jar in your file system to get the actual jar name.
<?xml version="1.0" encoding="UTF-8"?>
<project name="zOSFetch" default="main" xmlns:es="antlib:com.ibm.team.enterprise.smpe.toolkit">
<target name="main" description="main">
<es:zOSFetch
zosHost="nasw.pok.ibm.com"
zosLibrary="DREILLY.REXX.EXEC"
zosMember="TST$ZOSF"
zosPassword="-5e993fc4f3b23dd11502775ded3804a0"
zosUser="DREILLY"
/>
<es:zOSFetch
zosHost="nasw.pok.ibm.com"
zosDataset="DREILLY.SUPERC.LIST"
zosPassword="-5e993fc4f3b23dd11502775ded3804a0"
zosUser="DREILLY"
/>
</target>
</project>