View previous topic :: View next topic |
Author |
Message |
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Fri Jun 02, 2006 9:17 am Post subject: How to move a line one column to the left |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Fri Jun 02, 2006 9:27 am Post subject: |
|
|
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 |
|
 |
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Fri Jun 02, 2006 9:34 am Post subject: |
|
|
Thank you kolusu for the quick response. I will give it a try and let you know. |
|
Back to top |
|
 |
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Fri Jun 02, 2006 9:40 am Post subject: |
|
|
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 |
|
 |
jyoung Beginner
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
|
Posted: Fri Jun 02, 2006 9:46 am Post subject: |
|
|
Koluso,
Never mind I found the BNDS command. Unless you have a better way. Thank you. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Jun 02, 2006 10:59 am Post subject: |
|
|
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 |
|
 |
|
|