Skip to content

Commit

Permalink
update README and test for get USS file in ASCII_NO_TRAILING_BLANKS mode
Browse files Browse the repository at this point in the history
Signed-off-by: Tian Na <[email protected]>
  • Loading branch information
tiantn committed Jan 3, 2024
1 parent 40a46b4 commit 4d81140
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ await connection.uploadFile(input, '/u/username/hosts');
##### Parameter

* filePath - _string_ - USS file path name.
* transferMode - _TransferMode_ - `TransferMode.ASCII`, `TransferMode.BINARY`. When downloading a text dataset, transferMode should be either `TransferMode.ASCII` so that z/OS FTP service converts `EBCDIC` characters to `ASCII`.
* transferMode - _TransferMode_ - `TransferMode.ASCII`, `TransferMode.BINARY` and `TransferMode.ASCII_NO_TRAILING_BLANKS`. The `TransferMode.ASCII` and `TransferMode.ASCII_NO_TRAILING_BLANKS` asks z/OS FTP service to convert `EBCDIC` characters to `ASCII`. The `TransferMode.ASCII_NO_TRAILING_BLANKS` asks z/OS FTP service to remove trailing blanks.
* stream - _boolean_ - `true` if you want to obtain a [ReadableStream](https://nodejs.org/api/stream.html#stream_readable_streams) of the file content, or `false` to read a full file into memory (in Buffer). The buffer accepts up to 4MB data. For large file, use `stream=true` instead.

##### Return
Expand Down
4 changes: 2 additions & 2 deletions src/__test__/downloadFile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ describe('The method of downloadFile()', () => {
expect(buffer.toString()).toBe(text);
});

it('can get USS file in ASCII_NO_TRAILING_BLANKS mode', async () => {
const text = 'Hello';
it.only('can get USS file in ASCII_NO_TRAILING_BLANKS mode', async () => {
const text = 'Hello\r\n';

const buffer = await accessor.downloadFile(getUSSPath('nodeacc/hello_with_trailingblanks.txt'), TransferMode.ASCII_NO_TRAILING_BLANKS);
expect(buffer.toString()).toBe(text);
Expand Down

0 comments on commit 4d81140

Please sign in to comment.