MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting Rid Of Commas in TSO
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
tdevwm1
Beginner


Joined: 27 Mar 2008
Posts: 3
Topics: 2

PostPosted: Fri Oct 31, 2008 1:04 pm    Post subject: Getting Rid Of Commas in TSO Reply with quote

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?
Code:

c  all  ","  ''  .b  .e
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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Oct 31, 2008 1:09 pm    Post subject: Reply with quote

tdevwm1,

try this x'6b' is comma in hex

Code:

c all x'6b' ''  .b  .e
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sat Nov 01, 2008 7:41 am    Post subject: Reply with quote

Code:

c  all  ","  ''  .b  .e

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
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Sat Nov 01, 2008 5:33 pm    Post subject: Reply with quote

dbzTHEdinosauer,

The command
Code:
c  all  ","  ''  .b  .e


is actally treated as two commands -
Code:
c  all  "
"  ''  .b  .e


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
View user's profile Send private message Send e-mail
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Sat Nov 01, 2008 9:28 pm    Post subject: Reply with quote

I don't have access to a mainframe, but I'm sure I've coded
Code:
c ',' ' ' all
in the past and it's worked fine.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Sun Nov 02, 2008 5:00 am    Post subject: Reply with quote

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
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Sun Nov 02, 2008 1:04 pm    Post subject: Reply with quote

I don't have access to mainframe either but unlike Terry I remember that comma did not work as part of string, and that should be reason why Kolusu gave hex solution.

But as suggested by Dick I did some reading and ISPF manual does indicate that comma is allowed, but no example is provided. And I am confused now. So I will wait for someone to try the comand suggested by Terry to confirm if it works or not. And if it doesn't then why does the manual indicate something on contrary.

Here is the ISPF link - http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispedt03/1.3.4.1.1?ACTION=MATCHES&REQUEST=change+comma&TYPE=FUZZY&SHELF=EZ239908&DT=19990720125310&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

Diba.
Back to top
View user's profile Send private message Send e-mail
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Sun Nov 02, 2008 7:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
flatearther
Beginner


Joined: 19 Apr 2007
Posts: 13
Topics: 2
Location: Bethesda, MD

PostPosted: Mon Nov 03, 2008 12:31 am    Post subject: Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Nov 03, 2008 5:58 am    Post subject: Reply with quote

http://www.mvsforums.com/helpboards/faq.php#21
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Nov 03, 2008 12:57 pm    Post subject: Reply with quote

My apologies Dick.

After reading CraigG's post I realise that I got confused between ',' and ';'.

Diba.
Back to top
View user's profile Send private message Send e-mail
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Nov 03, 2008 2:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
arnold57
Beginner


Joined: 01 Oct 2004
Posts: 30
Topics: 0

PostPosted: Mon Nov 03, 2008 2:40 pm    Post subject: Reply with quote

Your command

Code:
c  all  ","  ''  .b  .e


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
View user's profile Send private message
flatearther
Beginner


Joined: 19 Apr 2007
Posts: 13
Topics: 2
Location: Bethesda, MD

PostPosted: Mon Nov 03, 2008 9:03 pm    Post subject: Reply with quote

Thanks Dick, I guess I've always used the Quick Reply and never noticed.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Nov 06, 2008 3:06 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group