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 

How to move a line one column to the left

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
jyoung
Beginner


Joined: 10 Nov 2005
Posts: 36
Topics: 2
Location: Flint, MI

PostPosted: Fri Jun 02, 2006 9:17 am    Post subject: How to move a line one column to the left Reply with quote

In CMS when we deleted a colum everything to the right of that column would move to the left, but in ISPF I am not able to duplicate that.

I tried
c p'=' '' 1 all

I wanted this to change all values in column 1 with nothing so that all lines would move one column to the left. What happens instead is only part of the line moves to the left. What am I missing? (besides a brain). Thank you.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jun 02, 2006 9:27 am    Post subject: Reply with quote

jyoung,

Assuming your data looks like this

Code:

****** ***************************** Top of Data *
000001 ALINE-1                                   
000002 BLINE-2                                   
000003 CLINE-3                                   
000004 DLINE-4                                   
000005 ELINE-5                                   
****** **************************** Bottom of Data


You need to use the line command ((n where n stands for the no: of positions you want to move.
ex:
Code:

****** ***************************** Top of Data **
((1    ALINE-1                                     
000002 BLINE-2                                     
000003 CLINE-3                                     
000004 DLINE-4                                     
0((    ELINE-5                                     
****** **************************** Bottom of Data


will produce

Code:

****** ***************************** Top of Data *
000001 LINE-1                                     
000002 LINE-2                                     
000003 LINE-3                                     
000004 LINE-4                                     
000005 LINE-5                                     
****** **************************** Bottom of Data


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jyoung
Beginner


Joined: 10 Nov 2005
Posts: 36
Topics: 2
Location: Flint, MI

PostPosted: Fri Jun 02, 2006 9:34 am    Post subject: Reply with quote

Thank you kolusu for the quick response. I will give it a try and let you know.
Back to top
View user's profile Send private message
jyoung
Beginner


Joined: 10 Nov 2005
Posts: 36
Topics: 2
Location: Flint, MI

PostPosted: Fri Jun 02, 2006 9:40 am    Post subject: Reply with quote

Kolusu,
That worked perfectly. If I want to delete columun 5 and have the line shift left how would I specify that. Thank you.
Back to top
View user's profile Send private message
jyoung
Beginner


Joined: 10 Nov 2005
Posts: 36
Topics: 2
Location: Flint, MI

PostPosted: Fri Jun 02, 2006 9:46 am    Post subject: Reply with quote

Koluso,
Never mind I found the BNDS command. Unless you have a better way. Thank you.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Jun 02, 2006 10:59 am    Post subject: Reply with quote

BNDS is the best, but in situations where you don't want to use it, you can do commands like
Code:
c ' ' $ all 5 80;c ' ' '' all 5 80; c $ ' ' all 5 80

This, of course, assumes that you know there are not any $ symbols in that portion of the code.

I only mention this because it is a useful technique in edit macros, and it keeps you from forgetting to reset the changed bounds.

I should add that the reason it is useful in edit macros is that in a macro, the single CHANGE command is much faster than looping through lines doing SHIFT commands. Online though, (( is faster and easier.
Back to top
View user's profile Send private message Visit poster's website
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
Page 1 of 1

 
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