IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Mainframe Dataset Binary or ASCII


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Faizanazam

New User


Joined: 06 Apr 2024
Posts: 7
Location: United States

PostPosted: Tue Jun 04, 2024 4:38 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Jun 04, 2024 9:40 am
Reply with quote

In any case it's binary, but may contain only EBCDIC/ASCII characters.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Jun 04, 2024 10:23 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2131
Location: USA

PostPosted: Tue Jun 04, 2024 6:05 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1329
Location: Bamberg, Germany

PostPosted: Tue Jun 04, 2024 8:19 pm
Reply with quote

Thanks for the update. ISPF of course can also be used, have a look on the available pattern masks.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts Reading Empty Dataset DFSORT/ICETOOL 5
No new posts Email attachment from mainframe is empty PC Guides & IT News 9
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Need help In Mainframe Automation AF/... CLIST & REXX 14
Search our Forums:

Back to Top