View previous topic :: View next topic
|
Author |
Message |
Faizanazam
New User
Joined: 06 Apr 2024 Posts: 7 Location: United States
|
|
|
|
Hi ,
Is there a way to identify if a mainframe file is Binary or ASCII ?
We have to SFTP the file from Mainframe to Windows server and file is coming from different application , its a huge file and we are not sure if any data can be binary or not ,
Just checking , if there is any easy way to find out. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
In any case it's binary, but may contain only EBCDIC/ASCII characters. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
If you have DFSORT in your shop, and z/OS 2.4+, you can try a RegEx against the dataset. Make use of character class [:cntrl:] |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2131 Location: USA
|
|
|
|
Joerg.Findeisen wrote: |
If you have DFSORT in your shop, and z/OS 2.4+, you can try a RegEx against the dataset. Make use of character class [:cntrl:] |
Also, you can try to open the dataset in ISPF VIEW/EDIT session. For non-EBCDIC data you'll see the message about "non-printable characters".
ASCII data are not considered as valid text data in z/OS. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1329 Location: Bamberg, Germany
|
|
|
|
Thanks for the update. ISPF of course can also be used, have a look on the available pattern masks. |
|
Back to top |
|
|
|