View previous topic :: View next topic |
Author |
Message |
tdevwm1 Beginner
Joined: 27 Mar 2008 Posts: 3 Topics: 2
|
Posted: Fri Oct 31, 2008 1:04 pm Post subject: Getting Rid Of Commas in TSO |
|
|
Hi,
I want to get rid of commas in a file. I know commas are special characters in TSO.
Is there a way to mass delete them using a TSO command?
does not work. The app complains this is an 'incomplete string'. The comma appears to act as a parser or delimiter here, not as a character to edit.
Anyone know of a method to remove them?
Any incite is appreciated.
Regards,
WCM |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Oct 31, 2008 1:09 pm Post subject: |
|
|
tdevwm1,
try this x'6b' is comma in hex
Code: |
c all x'6b' '' .b .e
|
|
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sat Nov 01, 2008 7:41 am Post subject: |
|
|
you received the incomplete string message because you used quotes(") to delimit your search string and singlequotes(') to delimit your replacement string. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Sat Nov 01, 2008 5:33 pm Post subject: |
|
|
dbzTHEdinosauer,
The command
is actally treated as two commands -
Error message is coming because the first one is incomplete. It has nothing to with single quotes as that part is not processed at all.
So you need to use hex value as kolusu described.
Diba |
|
Back to top |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Sat Nov 01, 2008 9:28 pm Post subject: |
|
|
I don't have access to a mainframe, but I'm sure I've codedin the past and it's worked fine. _________________ ....Terry |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Sun Nov 02, 2008 5:00 am Post subject: |
|
|
Diba, you are wrong.
A Change command has numerous parameters. Search String, Change String, Function (all, nx, x, etc..), line range (line number or labels), and column range.
Suggest you do some reading. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
|
Back to top |
|
 |
CraigG Intermediate
Joined: 02 May 2007 Posts: 202 Topics: 0 Location: Viginia, USA
|
Posted: Sun Nov 02, 2008 7:50 pm Post subject: |
|
|
It may depend on the "command delimiter" parameter on the ISPF setting menu. Mine is set to ; and if try to use a ; in a change command then I get the incomplete string message. |
|
Back to top |
|
 |
flatearther Beginner
Joined: 19 Apr 2007 Posts: 13 Topics: 2 Location: Bethesda, MD
|
Posted: Mon Nov 03, 2008 12:31 am Post subject: |
|
|
As long as you don't mix single and double quotes you'll be fine.
c ',' ' ' all
works with no problems (they're all single quotes).
OT - how do you get the green-screen-type lines to appear in these posts? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Nov 03, 2008 12:57 pm Post subject: |
|
|
My apologies Dick.
After reading CraigG's post I realise that I got confused between ',' and ';'.
Diba. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Mon Nov 03, 2008 2:14 pm Post subject: |
|
|
no problem Diba, I did not take it personnally.
I was just suprised with your post since you are an experienced developer. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
arnold57 Beginner
Joined: 01 Oct 2004 Posts: 30 Topics: 0
|
Posted: Mon Nov 03, 2008 2:40 pm Post subject: |
|
|
Your command
should work in ISPF edit. Both quotes and double quotes are valid and can be mixed.
You may have set a comma as your command delimeter. Type SETTINGS to see what your command delimiter is. If comma is your command delimiter, you can change it, or use hex x'6b', as Kolusu suggests. |
|
Back to top |
|
 |
flatearther Beginner
Joined: 19 Apr 2007 Posts: 13 Topics: 2 Location: Bethesda, MD
|
Posted: Mon Nov 03, 2008 9:03 pm Post subject: |
|
|
Thanks Dick, I guess I've always used the Quick Reply and never noticed. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Nov 06, 2008 3:06 am Post subject: |
|
|
after a little reflection (and pulling my head out of my ass):
arnold57 - good catch, learned something.
mixing double-quotes and single-quotes as string delimiters does indeed work. thx
Diba, my apologies, you were right and I was wrong.
a comma being the OP's command delimiter indeed caused his command line string to be two commands and not one.
tough being an old fart. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
|
|