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

ISPF - how to find bad ASCII chars


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mrspredeep

New User


Joined: 30 Jun 2010
Posts: 28
Location: USA

PostPosted: Tue Aug 17, 2010 9:48 pm
Reply with quote

I know that f p'.' searches for non-printable characters
But how do we search for bad characters, for example:
Ý

I want to make sure my file does not have any bad characters where my program is expecting alphabets, numbers or allowed special characters.


Also, how do you type the symbol’¬‘?
Its part of a find command:
F p’¬‘

In the earlier mainframe emulators I used, shift+6 would type this character.

But in my current emulator, shift+6 makes '^', just like in Windows.

Thanks.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Tue Aug 17, 2010 10:01 pm
Reply with quote

Go into VIEW, not EDIT; then

1. Suggest that you
Code:
CHANGE ALL P'>' X'40'     this eliminates all uppercase alphabetics
                          substitute P'@' to eliminate all upper- and lowercase alphabetics
CHANGE ALL P'#' X'40'     this eliminates all numerics
CHANGE ALL '?' X'40'      where ? is an allowable special character
                          repeat for other special characters, as needed
EXCLUDE ALL
F ALL P'¬'


If any lines are displayed, they contain "bad" characters

2. On my emulator the '¬' character is entered via Ctrl+6 - you might give that a try.

Note: Do NOT SAVE after doing this if you use EDIT instead of VIEW. Make notes, then CANCEL the session.

Edited to add: I just noted that you said ASCII characters. The above only works on EBCDIC characters. Sorry about that.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Aug 17, 2010 10:17 pm
Reply with quote

The specific keyboard sequence to generate the '¬' character depends upon your emulator -- check the online help or the manual for the key sequence.

Depending upon the code page in use on your mainframe, the specific character you mention -- Ý -- may actually be a left square bracket ([).

Finally, I assume that this is a one-time situation. You are not going to want to be using TSO/ISPF commands in a production environment to change data files!

Where are these "bad" characters coming from? Why not address them at their source, rather than trying to take care of them after the fact? Especially since there are 256 characters in the EBCDIC collating sequence so you could potentially be attempting to modify a great number of characters.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 17, 2010 10:48 pm
Reply with quote

moving around a lot and being somewhat discouraged trying to figure-out
the key board mapping,

i just remember the keystrokes necessary to access the page with the F p’¬‘
and just go there and cut&paste.
Back to top
View user's profile Send private message
Mrspredeep

New User


Joined: 30 Jun 2010
Posts: 28
Location: USA

PostPosted: Sat Aug 21, 2010 1:15 am
Reply with quote

Ronald Burr, thanks for the steps. I was thinking of doing something similar, but wondered if there is a simpler way. Seems like there is not.

Ctl+6 did not produce ¬ , and the online help was not of much help.

I am using this workaround right now:

I use a key replacement app, called shortkeys. I have set it up so that when I type a certain sequence of characters they would be replaced by ¬.


Robert Sample, yes, it was a one-time situation,and that is why I was using ISPF, and not JCL.

The bad characters were coming from outside our system, so I do not have the option of tackling them at the source.
Back to top
View user's profile Send private message
Mrspredeep

New User


Joined: 30 Jun 2010
Posts: 28
Location: USA

PostPosted: Sat Aug 21, 2010 1:18 am
Reply with quote

Ronald Burr, I tried your sequence of steps, and it spaced out all characters except / and the bad character, I dont know why.

Probably / was not counted as one of the special characters.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Sat Aug 21, 2010 1:45 am
Reply with quote

That was the intent - space out all of the characters EXCEPT any that were "bad" or that you left out of your CHANGE '?' X'40' list as being acceptable special characters. If '/' is an acceptable character, then CHANGE '/' X'40' ALL in addition to the other changes.

The intent was not to EDIT the file and CORRECT all of the 'bad' characters, merely to see if there WERE any. If you find some, then you will have to make note of what their hex representation(s) is/are, CANCEL the session, then go back in to an EDIT session and fix them.
Back to top
View user's profile Send private message
Mrspredeep

New User


Joined: 30 Jun 2010
Posts: 28
Location: USA

PostPosted: Mon Aug 23, 2010 10:32 pm
Reply with quote

Oh, okay, my mistake :-)
I didnt realise I had to find and space out each special character individually.

Thanks for the help.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top