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

Finding Non-ascii characters?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rehan

New User


Joined: 13 May 2007
Posts: 6
Location: India

PostPosted: Sun Nov 15, 2009 7:45 pm
Reply with quote

Hi Friends,
Can any one tell is there a way to find non-ascii chracters in a seq file?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 15, 2009 7:58 pm
Reply with quote

If the sequential file is on the mainframe, ALL CHARACTERS ARE NON-ASCII. Mainframes use EBCDIC, not ASCII.
Back to top
View user's profile Send private message
rehan

New User


Joined: 13 May 2007
Posts: 6
Location: India

PostPosted: Sun Nov 15, 2009 8:09 pm
Reply with quote

thanx for replying what i need is my files are sent for printing and the printing system identifies only ASCII characters and the recently printing system has identified junk values in the file
can u tell me how to avoid this in future?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 15, 2009 8:24 pm
Reply with quote

First, you have to find out which characters the printer doesn't support -- the upper and lower case letters and numbers are always supported, but the special characters can be problems.

Then, you need to write code (program or SORT statements) that examine each and every character of your file and replace any of the invalid characters with something valid (such as a space).

Then, be aware that scanning a file character by character is a time-consuming process and there's not a whole lot you can do to reduce the amount of time it takes.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Nov 15, 2009 10:57 pm
Reply with quote

Hello,

Suggest you look at the process that generates the file to be sent and make sure there are no invalid characters in the data. Two of the biggest causes of this is uninitialized data in the output or sending a binary or packed-decimal value.

As Robert mentioned, it is quite expensive passing an entire file and looking at every character to be sure it is acceptable.

Far better to create the file correctly in the first place.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Finding Assembler programs PL/I & Assembler 5
Search our Forums:

Back to Top