Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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 MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 10 Tue Sep 05, 2017 4:24 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us