View previous topic :: View next topic
|
Author |
Message |
rehan
New User
Joined: 13 May 2007 Posts: 6 Location: India
|
|
|
|
Hi Friends,
Can any one tell is there a way to find non-ascii chracters in a seq file? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
If the sequential file is on the mainframe, ALL CHARACTERS ARE NON-ASCII. Mainframes use EBCDIC, not ASCII. |
|
Back to top |
|
|
rehan
New User
Joined: 13 May 2007 Posts: 6 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|