Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ISPF command to remove spaces between columns

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: ISPF command to remove spaces between columns
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    Post subject: Re: ISPF command to remove spaces between columns
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    Post subject: Reply to: ISPF command to remove spaces between columns
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: 6967
Location: porcelain throne

PostPosted: Thu Jan 21, 2010 2:18 pm    Post subject:
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: 95
Location: India

PostPosted: Thu Jan 21, 2010 2:44 pm    Post subject:
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    Post subject:
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: 401
Location: Mumbai

PostPosted: Thu Jan 21, 2010 9:19 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us