View previous topic :: View next topic
|
Author |
Message |
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Can any one please tell me how to execute a line command? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
... execute a line command... |
Can you provide more details? A line command where? To do what? |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Try to enter the command next to the ... (guess what) ... line.
O. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I think the OP means a line command from an ISPF EDIT macro. I don't think that's possible. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Its not normally possible enter a line command from a rexx program. But for many line commands, you can do the same function from a rexx program, without having to mimic those keystrokes.
So, what line commands did you want to issue? From what panel? |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
I want to move some columns....
For example:
Suppose i want to move particular 10 lines to a fixed position. That i want to apply all members in a PDS. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
rajesh_m wrote: |
Suppose i want to move particular 10 lines to a fixed position. That i want to apply all members in a PDS. |
Do you mean that you want to insert lines at a given position, or to move lines from another position within the same member to the given position of the same member ? |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
expat wrote: |
rajesh_m wrote: |
Suppose i want to move particular 10 lines to a fixed position. That i want to apply all members in a PDS. |
Do you mean that you want to insert lines at a given position, or to move lines from another position within the same member to the given position of the same member ? |
No need to insert new lines. Just i need to move the existing lines. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please give an example of your original input file, and what you would like the result to be. |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Hi Expat,
Please look into the following example.
000100 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000200 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000300 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000400 ........12345678998765432123456789.........
000500 ........12345678998765432123456789.........
000600 ........12345678998765432123456789.........
000700 ........12345678998765432123456789.........
000800 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000900 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
I am having 40 members like this in a PDS. I want to move only that specified 4 lines. In every member that line numbers are fixed.
After doing manipulation the four lines should move to 10th column.
Can we do this with macro. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Perhaps you meant the 'tenth line'.
Sorry, do not have system today, so cannot see my examples... but it is something like this (untested):
Code: |
/*rexx */
Address ISREDIT
"MACRO"
"LABEL 4 = .a"
"LABEL 7 = .b"
"LABEL 10 = .c"
"CUT .a .b"
"PASTE after .c"
"DELETE .a .b"
|
|
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Hi Pedro,
My intention is not move to tenth line. Your macro is working fine for row wise. Same thing in a reverse way, it should be able to work on column wise. I hope you got my point. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Code: |
000100 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000200 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000300 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000400 ........12345678998765432123456789.........
000500 ........12345678998765432123456789.........
000600 ........12345678998765432123456789.........
000700 ........12345678998765432123456789.........
000800 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000900 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
|
is this what You want ??
Code: |
****** 0 1
****** 12345678901234567890
000100 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000200 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000300 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000400 ........12345678998765432123456789.........
000500 ........12345678998765432123456789.........
000600 ........12345678998765432123456789.........
000700 ........12345678998765432123456789.........
000800 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
000900 ........ABCDEFGHIJKLNMOPQRSTUVWXYZ.........
|
You can use the shioft operator to shift right 9 columns |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Hi enrico,
You are exactly correct. That is my requirement. Thankyou very much for your response. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
I want to move only that specified 4 lines. |
Your use of terminology mislead me. You meant shift instead of move. Move is a different line command. |
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Sorry pedro..... Is there any possibility to achieve this functionality. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
You should become familiar with the "Edit and Edit Macros" manual. There is a chapter for 'edit macros'
Use te SHIFT macro instruction! It would be something like this:
Code: |
/*rexx*/ Address ISREDIT; "MACRO"
Do a = 4 to 7
"SHIFT ) " a " 10"
End |
|
|
Back to top |
|
|
rajesh_m
New User
Joined: 15 Apr 2008 Posts: 39 Location: India
|
|
|
|
Thank you very much pedro it is working fine. Your help is really appreciatable. |
|
Back to top |
|
|
|