Using zowe zos-files command To Pull Files With Special Characters
search cancel

Using zowe zos-files command To Pull Files With Special Characters

book

Article ID: 245627

calendar_today

Updated On:

Products

Brightside

Issue/Introduction

Use ZOWE CLI to script pulling some files from the mainframe for off mainframe processing.

Here's a typical command -

zowe zos-files download data-set "SWD.CCD.FUNLOAD.CCD1050" -f "CCD1050.TXT"

This pulls data from mainframe down to the local environment.   However it seems to have problems with the “[“ (x’B1’) and “]” (x’BB’) characters.   These appear at the non-mainframe side as “£” and “¨”.

How to solve the problem ? 

Environment

Release : 3.0

Component : BRIGHTSIDE ZOWE CLI

Cause

Mainframe is using EBCDIC codepage (for example 037 for US, 285 for UK), while local PC is using ASCII codepage. 

Resolution

Use the encoding option with the ZOWE zos-file download command

  • --encoding | --ec (string)

    • Download the file content with encoding mode, which means that data conversion is performed using the file encoding specified.

 

For example, if the mainframe codepage is 285 United Kingdom, use the following command:

zowe zos-files download data-set "SWD.CCD.FUNLOAD.CCD1050" -f -ec 285 "CCD1050.TXT"

 

Additional Information

zowe zos-files command:

https://docs.zowe.org/stable/web_help/docs/zowe_zos-files_download_data-set.html

 

Coded character set identifiers table shows the CCSIDs that are supported in z/OS® Connect:

https://www.ibm.com/docs/en/zos-connect/zosconnect/3.0?topic=properties-coded-character-set-identifiers