public class CopyToHFS extends java.lang.Object implements IExecute
Usage:
CopyToHFS copyCmd = new CopyToHFS(); copyCmd.setDataset(HLQ + "COBOL"); copyCmd.setMember("EPSNBRVL"); copyCmd.setFile(new File(SRC_DIR + "/epsnbrvl.cbl")); copyCmd.copy();This class also supports chaining:
new CopyToHFS().dataset(HLQ + "COBOL").member("EPSNBRVL").file(new File(SRC_DIR + "/epsnbrvl.cbl")).copy();
Constructor and Description |
---|
CopyToHFS() |
Modifier and Type | Method and Description |
---|---|
CopyToHFS |
append(boolean append)
Set flag indicating if the content of the PDS member should be concatenated to the target HFS file if already exists.
|
CopyToHFS |
convertControlCharacters(boolean convertControlCharacters)
Specify whether the control characters should be converted to
space during copying a PDS member to HFS file.
|
void |
copy()
Executes the CopyToHFS command
|
CopyToHFS |
copyMode(DBBConstants.CopyMode copyMode)
Set the mode used by the copy.
|
CopyToHFS |
dataset(java.lang.String dataset)
Set the data set containing the member to copy
from
|
CopyToHFS |
ddName(java.lang.String ddName)
Set the dd to copy from
|
int |
execute()
Executes the CopyToHFS command
|
CopyToHFS |
file(java.io.File file)
Set the target file on HFS
|
DBBConstants.CopyMode |
getCopyMode()
Return the mode used by the copy.
|
java.lang.String |
getDataset()
Retrieve the data set containing the member
to copy from
|
java.lang.String |
getDdName()
Retrieve the DD to copy from
|
java.io.File |
getFile()
Retrieve the target file on HFS
|
java.lang.String |
getHFSEncoding()
Retrieve the target HFS file encoding.
|
java.lang.String |
getMember()
Retrieve the member to copy from
|
java.lang.String |
getPDSEncoding()
Retrieve the source PDS member encoding.
|
java.lang.String |
getReadOptions()
Retrieve additional read options used by z/OS C library I/O functions.
|
java.lang.String |
getVolser()
Return the volume serial of the data set
|
CopyToHFS |
hfsEncoding(java.lang.String encoding)
Set the target HFS file encoding.
|
boolean |
isAppend()
Retrieve flag indicating if the content of the PDS member should be concatenated to the target HFS file if already exists.
|
boolean |
isConvertControlCharacters()
Return whether the control characters should be converted
to space during copying a PDS member to HFS file.
|
CopyToHFS |
member(java.lang.String member)
Set the member to copy from
|
CopyToHFS |
pdsEncoding(java.lang.String encoding)
Set the source PDS member encoding.
|
CopyToHFS |
readOptions(java.lang.String options)
Set the read options
|
void |
setAppend(boolean append)
Set flag indicating if the content of the PDS member should be concatenated to the target HFS file if already exists.
|
void |
setConvertControlCharacters(boolean convertControlCharacters)
Specify whether the control characters should be converted to
space during copying a PDS member to HFS file.
|
void |
setCopyMode(DBBConstants.CopyMode copyMode)
Set the mode used by the copy.
|
void |
setDataset(java.lang.String dataset)
Set the data set containing the member to copy
from
|
void |
setDdName(java.lang.String ddName)
Set the DD to copy from
|
void |
setFile(java.io.File file)
Set the target file on HFS
|
void |
setHFSEncoding(java.lang.String encoding)
Set the target HFS file encoding.
|
void |
setMember(java.lang.String member)
Set the member to copy from
|
void |
setPDSEncoding(java.lang.String encoding)
Set the source PDS member encoding.
|
void |
setReadOptions(java.lang.String options)
Set additional read options used by z/OS C library I/O functions.
|
void |
setVolser(java.lang.String volser)
Specify the volume serial of the data set
|
CopyToHFS |
volser(java.lang.String volser)
Specify the volume serial of the data set
|
public void copy() throws java.io.IOException
java.io.IOException
- If an error occurred when copying the file.public int execute() throws BuildException
execute
in interface IExecute
BuildException
- If an error occurred when copying the file.public java.io.File getFile()
public void setFile(java.io.File file)
file
- the target filepublic java.lang.String getReadOptions()
public void setReadOptions(java.lang.String options)
options
- Additional z/OS C library I/O function read options.public boolean isAppend()
public void setAppend(boolean append)
false
.append
- - True if PDS member content should be concatenated to existing target HFS file.public void setHFSEncoding(java.lang.String encoding)
encoding
- Target HFS file encoding.public void setPDSEncoding(java.lang.String encoding)
encoding
- Source PDS member encoding.public java.lang.String getHFSEncoding()
public java.lang.String getPDSEncoding()
public java.lang.String getMember()
public void setMember(java.lang.String member)
member
- the member to copypublic java.lang.String getDataset()
public void setDataset(java.lang.String dataset)
dataset
- the data setpublic java.lang.String getDdName()
public void setDdName(java.lang.String ddName)
ddName
- the DD namepublic CopyToHFS dataset(java.lang.String dataset)
dataset
- the datasetpublic CopyToHFS member(java.lang.String member)
member
- the memberpublic CopyToHFS ddName(java.lang.String ddName)
ddName
- the DD namepublic CopyToHFS file(java.io.File file)
file
- the target filepublic CopyToHFS readOptions(java.lang.String options)
options
- the read optionspublic CopyToHFS append(boolean append)
false
.append
- - True if PDS member content should be concatenated to existing target HFS file.public CopyToHFS hfsEncoding(java.lang.String encoding)
encoding
- Target HFS file encoding.public CopyToHFS pdsEncoding(java.lang.String encoding)
encoding
- Source PDS member encoding.public DBBConstants.CopyMode getCopyMode()
TEXT, ASA_TEXT, BINARY, LOAD
. Default value is
TEXT
.public void setCopyMode(DBBConstants.CopyMode copyMode)
TEXT, ASA_TEXT, BINARY, LOAD
. If mode is set to
BINARY
or LOAD
, then hfsEncoding and
pdsEncoding are ignored.copyMode
- set the mode used by the copypublic CopyToHFS copyMode(DBBConstants.CopyMode copyMode)
TEXT, ASA_TEXT, BINARY, LOAD
. If mode is set to
BINARY
or LOAD
, then hfsEncoding and
pdsEncoding are ignored.copyMode
- set the mode used by the copypublic java.lang.String getVolser()
public void setVolser(java.lang.String volser)
volser
- the volume serial of the data setpublic CopyToHFS volser(java.lang.String volser)
volser
- the volume serial of the data setcom.ibm.dbb.build.CopyToHFS
public boolean isConvertControlCharacters()
true
if the control characters should
be converted to space, false
otherwise.public void setConvertControlCharacters(boolean convertControlCharacters)
convertControlCharacters
- true
if the control
characters should be converted to space.public CopyToHFS convertControlCharacters(boolean convertControlCharacters)
convertControlCharacters
- true
if the control
characters should be converted to space.com.ibm.dbb.build.CopyToHFS
<IBM Copyright © 2018 IBM Corp. All Rights Reserved.