String type definition for properties of abstractRestClient that have a getter set. This can be safely used in a getter call as a variable for the abstractRestClient object.
Type for the mode option of the mount file-system API.
This interface defines the options that can be sent into the recall data set function.
z/OSMF options for recall of migrated data sets. See the z/OSMF REST API publication for complete details.
Defaults to be used as options for the different types of data sets that can be created
Specifies all the defaults to create non-vsam data sets
Specifies the defaults used by the Zos Files API to create a data set used for binaries
Specifies the defaults used by the Zos Files API to create a blank data set
Specifies the defaults used by the Zos Files API to create a data set used for C code
Specifies the defaults used by the Zos Files API to create a classic data set
Specifies the defaults used by the Zos Files API to create a partitioned data set
Specifies the defaults used by the Zos Files API to create a sequential data set
Specifies the defaults used by the Zos Files API to create a VSAM cluster
Constants to be used by the API
Maximum value for primary and secondary allocation
Maximum numbers of characters to allow for the continuation character on AMS statements
Maximum length of an AMS statement
Maximum numbers of days for which to retain a dataset.
Minimum numbers of days for which to retain a dataset.
Specifies the z/OS data set and file REST interface
Indicator of an AMS request
Indicator of the depth parameter for files operations
Indicator of a data set request
Indicator the query parameters used to qualify the request
Indicator of a members request
Indicator of the filesystem behavior parameter for files operations
Indicator of a ds file name
Indicator of the group parameter for files operations
Indicator of a z/OS mfs
Indicator of the modification time parameter for files operations
Indicator of the name parameter for files operations
Indicator of a USS File request
Indicator of the permission octal mask parameter for files operations
Indicator of the size parameter for files operations
Indicator of the symlink behavior parameter for files operations
Indicator of the file type parameter for files operations
Indicator of the user parameter for files operations
Indicator of a USS File request
Indicator of a z/OS file system request
The set of allocation unit choices for VSAM files
The set of dataset organization choices for VSAM files
Messages to be used as command responses for different scenarios
Message indicating that all data sets matching the provided patterns are archived.
Message indicating that the AMS commands was executed successfully
Message indicating the attributes are used during data set creation
Messaging indicating an attributes file was not found
Message to be used when throwing an imperative error during data set creation
Message to be used when throwing an imperative error during data set creation
Message indicating that the data set was created successfully
Message indicating that the data set has been renamed successfully.
Message indicating that file is uploaded to data set successfully
Message indicating that the data sets matching pattern were listed successfully
Message indicating that the data set was copied was aborted
Message indicating that the data set was copied was aborted
Message indicating that the data set was copied was aborted
Message indicating that the data set was copied was aborted
Message indicating that the data set was copied successfully
Message indicating that the data set was deleted successfully
Message indicating that the data set was deleted successfully.
Message indicating that the following data sets failed to properly download
Message indicating that the data set was downloaded successfully
Message indicating that the data set was downloaded successfully
Message indicating that the data set member was copied was aborted
Message indicating that the data set was migrated successfully.
Message indicating that the data set was recalled successfully.
Message indicating that the data set was recalled successfully.
Message indicating that the data sets matching pattern was downloaded successfully
Message indicating an error parsing an attributes file
Message indicating an error reading an attributes file
Message indicating that some or all data sets failed to download
Message indicating that the file system was mounted successfully.
Message indicating that the file system was unmounted successfully.
Message indicating invalid 'create' command 'alcunit' option
Messaging indicating invalid syntax in .zosattributes file
Message indicating invalid 'create' command 'dsntype' option
Message indicating invalid 'create' command 'dsorg' option
Message indicating an invalid 'create' command option
Message indicating an invalid 'mount' command option
Message indicating invalid 'mount' command 'mode' option
Message indicating that directory blocks cannot be zero if the data set organization is 'PO'
Message indicating that directory blocks must be zero if the data set organization is 'PS'
Message indicating invalid 'create' command 'perms' option
Message indicating invalid 'create' command 'recfm' option
Message indicating that the AMS commands was too long to be passed to z/OS MF
Message indicating the maximum allocation quantity has been exceeded
Message indicating that the following members failed to properly download
Message indicating that data set objects were not passed.
Message indicating that the data set "like" name is required
Message indicating that the data set name is required
Message indicating that the data set type is required
Message indicating that the file system name is required
Message indicating the 'create' command options is null or undefined
Message indicating the 'mount' command options is null or undefined
Message indicating that an expected file system option was not supplied.
Message indicating that the input directory is required
Message indicating that the input directory path is required
Message indicating that the input file is required
Message indicating that the mount point is required
Message indicating that patterns were not passed.
Message indicating that the payload is required
Message indicating 'create' command 'primary' option is required
Message indicating 'create' command 'lrecl' option is required
Message indicating that the request type is required
Message indicating that required table parameters are missing for file list
Message indicating that the AMS statements is required
Message indicating that the USS Dir name is required
Message indicating that the USS directory name is required
Message indicating that the USS File name is required
Message indicating that the an expected VSAM option was not supplied.
Message indicating that an expected ZFS option was not supplied.
Message indicating that no data sets remain to be downloaded after the excluded ones were filtered out.
Message indicating that no data sets remain to be downloaded after the excluded ones were filtered out.
Message indicating that no data sets remain to be downloaded after the excluded ones were filtered out.
Message indicating that the no members were found
Message indicating that a failure has happened in the NodeJS File System API
Message indicating that only empty partitioned data sets match the provided patterns
Message indicating that input path is not a directory
Message indicating that some data set downloads failed
Message indicating that the data type is unsupported for USS files
Message indicating that the data set type is unsupported
Message indicating that attempt to upload a directory to a data set member
Message indicating that attempt to upload a directory with multiple files to a physical sequential data set
Message indicating that the uss file or directory crated successfully.
Message indicating that the uss directory was uploaded successfully
Message indicating that the USS file or directory was deleted successfully
Message indicating that the uss file was downloaded successfully
Message indicating that the uss file was downloaded successfully
Message indicating that the uss file was uploaded successfully
Message indicating that the an expected VSAM option was not supplied.
Message indicating that the ZFS was created successfully
Message indicating that the ZFS was deleted successfully
Generated using TypeDoc
z/OS Files Package
Contains APIs to interact with files and data sets on z/OS (using z/OSMF files REST endpoints).
API Examples
Create a dataset
import { ProfileInfo } from "@zowe/imperative"; import { Create, CreateDataSetTypeEnum, ICreateDataSetOptions } from "@zowe/zos-files-for-zowe-sdk"; (async () => { // Load connection info from default z/OSMF profile const profInfo = new ProfileInfo("zowe"); await profInfo.readProfilesFromDisk(); const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true }); const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); const dataset = "ZOWEUSER.PUBLIC.NEW.DATASET"; const dataSetType = CreateDataSetTypeEnum.DATA_SET_CLASSIC; const options: ICreateDataSetOptions = { primary: 10, secondary: 1, alcunit: "TRK", lrecl: 80 }; const response = await Create.dataSet(session, dataSetType, dataset, options); console.log(response); })().catch((err) => { console.error(err); process.exit(1); });
Download all datasets in a partitioned dataset
import { ProfileInfo } from "@zowe/imperative"; import { Download, IDownloadOptions } from "@zowe/zos-files-for-zowe-sdk"; (async () => { // Load connection info from default z/OSMF profile const profInfo = new ProfileInfo("zowe"); await profInfo.readProfilesFromDisk(); const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true }); const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); const dataset = "ZOWEUSER.PUBLIC.YOUR.DATASET.HERE"; const options: IDownloadOptions = { failFast: false }; const response = await Download.allMembers(session, dataset, options); console.log(response); })().catch((err) => { console.error(err); process.exit(1); });
List datasets on z/OS
import { ProfileInfo } from "@zowe/imperative"; import { IListOptions, List } from "@zowe/zos-files-for-zowe-sdk"; (async () => { // Load connection info from default z/OSMF profile const profInfo = new ProfileInfo("zowe"); await profInfo.readProfilesFromDisk(); const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true }); const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); const dataset = "ZOWEUSER.*"; const options: IListOptions = {}; const response = await List.dataSet(session, dataset, options); for (const obj of response.apiResponse.items) { if (obj) console.log(obj.dsname.toString()); } })().catch((err) => { console.error(err); process.exit(1); });
Upload a file to Unix System Services
import { ProfileInfo } from "@zowe/imperative"; import { IUploadOptions, Upload } from "@zowe/zos-files-for-zowe-sdk"; (async () => { // Load connection info from default z/OSMF profile const profInfo = new ProfileInfo("zowe"); await profInfo.readProfilesFromDisk(); const zosmfProfAttrs = profInfo.getDefaultProfile("zosmf"); const zosmfMergedArgs = profInfo.mergeArgsForProfile(zosmfProfAttrs, { getSecureVals: true }); const session = ProfileInfo.createSession(zosmfMergedArgs.knownArgs); const localFile = "C:/Users/zoweuser/Documents/testFile.txt"; const remoteLocation = "/u/zoweuser/file.txt"; const options: IUploadOptions = { binary: true }; const response = await Upload.fileToUssFile(session, localFile, remoteLocation, options); console.log(response); })().catch((err) => { console.error(err); process.exit(1); });