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

ISPF command to remove spaces between columns


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Thu Jan 21, 2010 12:38 pm
Reply with quote

Hi Team,

Can u please let me know any TSO/ISPF commands to achieve the below:

Asis:
===
In a PS i have the data like this

001741 092
001741 092
001741 092
001741 092
001741 092
001741 092
001741 092
001741 092
001741 092

to be:
the data format i need is in below

001741092
001741092
001741092
001741092
001741092
001741092
001741092
001741092
001741092
Back to top
View user's profile Send private message
Nanda Krishna

New User


Joined: 30 Nov 2005
Posts: 19
Location: Bangalore

PostPosted: Thu Jan 21, 2010 1:17 pm
Reply with quote

Hi, if you have same value in the last three fields, you can use the following cmd ...

Code:
C ALL  ' 092'  '092'  7


Please note that i am using space followed by 092 in the first place and 7 is the column position.
Back to top
View user's profile Send private message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Thu Jan 21, 2010 2:07 pm
Reply with quote

Hi tried to excecute the command but its giving the mesg no '092' not found.Can you please tell me where exactly i need to give spaces.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jan 21, 2010 2:18 pm
Reply with quote

apsar.kogatam,

based on the information supplied:


Code:
CHG ALL ' ' ''
Back to top
View user's profile Send private message
rajesh_mbt

New User


Joined: 27 Mar 2006
Posts: 97
Location: India

PostPosted: Thu Jan 21, 2010 2:44 pm
Reply with quote

This will help to replace the space for you query!

Code:
C ALL '001741 092' '001741092'
Back to top
View user's profile Send private message
Mazahar

New User


Joined: 11 Dec 2007
Posts: 82
Location: hyderabad

PostPosted: Thu Jan 21, 2010 6:17 pm
Reply with quote

apsar.kogatam

You can use

Code:
   c all 7 ' ' ''


as your example shows you have space at 7th column. Observe that after 7 there is a space,single quote,space,single quote,space,singlequote,singlequote
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Thu Jan 21, 2010 9:19 pm
Reply with quote

if you need to remove multiple spaces, the trick is to change all spaces to a character that is not in the file, remove them as needed and then change the remaining changed characters back to spaces, eg:
Code:

C " " "#" ALL
C " " "" ALL 8
C "#" " " ALL

If you don't do this, the editor won't shift all the data over. If you need data shifted only in certain columns, use the BOUNDS command in conjunction with this technique
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top