View previous topic :: View next topic
|
Author |
Message |
Mrspredeep
New User
Joined: 30 Jun 2010 Posts: 28 Location: USA
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Mrspredeep
New User
Joined: 30 Jun 2010 Posts: 28 Location: USA
|
|
|
|
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 |
|
|
Mrspredeep
New User
Joined: 30 Jun 2010 Posts: 28 Location: USA
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
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 |
|
|
Mrspredeep
New User
Joined: 30 Jun 2010 Posts: 28 Location: USA
|
|
|
|
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 |
|
|
|