This class holds helper functions that are used to copy the contents of datasets through the z/OSMF APIs.

### Hierarchy

- Copy

## Index

### Methods

- convertAlcTozOSMF
- copyPDS
- dataSet
- dataSetCrossLPAR
- dataSetExists
- generateDatasetOptions
- hasIdenticalMemberNames
- isPDS

## Methods

### Static Private convertAlcTozOSMF

- convertAlcTozOSMF(getValue: string): string

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:548

  Converts the ALC value from the format returned by the Get() call to the format used by the Create() call.

  #### Parameters

  - ##### getValue: string

    The ALC value from the Get() call.

  #### Returns string

  - The ALC value in the format used by the Create() call.

### Static copyPDS

- copyPDS(session: AbstractSession, fromPds: string, toPds: string, task: ITaskWithStatus, sourceMemberList?: string[]): Promise<IZosFilesResponse>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:257

  Copy the members of a Partitioned dataset into another Partitioned dataset

  throws

    {ImperativeError} Data set name must be specified as a non-empty string

  throws

    {Error} When the ZosmfRestClient throws an error

  see

    https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.izua700/IZUHPINFO_API_PutDataSetMemberUtilities.htm

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### fromPds: string

  - ##### toPds: string

  - ##### task: ITaskWithStatus

  - ##### Optional sourceMemberList: string[]

  #### Returns Promise<IZosFilesResponse>

  A response indicating the status of the copying

### Static dataSet

- dataSet(session: AbstractSession, __namedParameters: { toDataSetName: string; toMemberName: string }, options: ICopyDatasetOptions): Promise<IZosFilesResponse>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:55

  Copy the contents of a dataset

  throws

    {ImperativeError} Data set name must be specified as a non-empty string

  throws

    {Error} When the ZosmfRestClient throws an error

  see

    https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.izua700/IZUHPINFO_API_PutDataSetMemberUtilities.htm

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### __namedParameters: { toDataSetName: string; toMemberName: string }

    - ##### toDataSetName: string

    - ##### toMemberName: string

  - ##### options: ICopyDatasetOptions

    Options

  #### Returns Promise<IZosFilesResponse>

  A response indicating the status of the copying

### Static dataSetCrossLPAR

- dataSetCrossLPAR(sourceSession: AbstractSession, __namedParameters: { toDataSetName: string; toMemberName: string }, options: ICrossLparCopyDatasetOptions, sourceOptions: IGetOptions, targetSession: AbstractSession): Promise<IZosFilesResponse>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:344

  Copy the contents of a dataset from one LPAR to another LPAR

  throws

    {ImperativeError} Data set name must be specified as a non-empty string

  throws

    {Error} When the ZosmfRestClient throws an error

  #### Parameters

  - ##### sourceSession: AbstractSession

    Source z/OSMF connection info

  - ##### __namedParameters: { toDataSetName: string; toMemberName: string }

    - ##### toDataSetName: string

    - ##### toMemberName: string

  - ##### options: ICrossLparCopyDatasetOptions

    Common options

  - ##### sourceOptions: IGetOptions

    Options for source file

  - ##### targetSession: AbstractSession

  #### Returns Promise<IZosFilesResponse>

  A response indicating the status of the copying o

### Static Private dataSetExists

- dataSetExists(session: AbstractSession, dataSetName: string): Promise<boolean>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:216

  Function that checks if the data set exists

  #### Parameters

  - ##### session: AbstractSession

  - ##### dataSetName: string

  #### Returns Promise<boolean>

### Static Private generateDatasetOptions

- generateDatasetOptions(targetOptions: ICrossLparCopyDatasetOptions, dsInfo: IZosmfListResponse): ICreateDataSetOptions

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:526

  Private function to convert the dataset options from the format returned by the Get() call in to the format used by the Create() call

  #### Parameters

  - ##### targetOptions: ICrossLparCopyDatasetOptions

  - ##### dsInfo: IZosmfListResponse

  #### Returns ICreateDataSetOptions

### Static Private hasIdenticalMemberNames

- hasIdenticalMemberNames(session: AbstractSession, sourceMemberList: string[], toPds: string): Promise<boolean>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:232

  Function that checks if source and target data sets have identical member names

  #### Parameters

  - ##### session: AbstractSession

  - ##### sourceMemberList: string[]

  - ##### toPds: string

  #### Returns Promise<boolean>

### Static isPDS

- isPDS(session: AbstractSession, dataSetName: string): Promise<boolean>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/copy/Copy.ts:198

  Function that checks if a dataset is type PDS

  #### Parameters

  - ##### session: AbstractSession

  - ##### dataSetName: string

  #### Returns Promise<boolean>

Generated using TypeDoc