View previous topic :: View next topic
|
Author |
Message |
DonanferMaztho
New User
Joined: 06 Dec 2007 Posts: 9 Location: Brazil
|
|
|
|
Hello MF Masters!!
would like to know if somebody knows how I can select data from a columns range in ISPF EDIT. Follow an example:
=COLS> ----+----1----+----2----+----3----+----4----+----5
000001 XXXX YYYYY ZZZZ
000002 XXXX YYYYY ZZZZ
000003 XXXX YYYYY ZZZZ
000004 XXXX YYYYY ZZZZ
000005 XXXX YYYYY ZZZZ
I need select the info contained into column 15 until 20 (The YYYYY values), and from line 1 until 5, then copy into another dataset member or whatever file. I have to had a new file with the following on it:
=COLS> ----+----1----+----2----+----3----+----4----+----5
000001 YYYYY
000002 YYYYY
000003 YYYYY
000004 YYYYY
000005 YYYYY |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I do not think there is a simple way.
1. use rexx loop to get the lines you want.
2. use LINE macro statement to get the data from editor.
3. use PARSE rexx statement to get the right columns
4. save to new member using EXECIO. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Try a combination of editor labels and BNDS command.
O. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi DonanferMaztho !
Just like Ofer said:
=COLS> ----+----1----+----2----+----3----+----4----+----5
000001 XXXX YYYYY ZZZZ
000002 XXXX YYYYY ZZZZ
Shift Left 5
Bounds 6 80
Shift Left 99
Bounds
And then use Cut/Paste
If you have to do this several times, save the commands in a EditMacro. |
|
Back to top |
|
|
DonanferMaztho
New User
Joined: 06 Dec 2007 Posts: 9 Location: Brazil
|
|
|
|
Thanks a lot ofer71!!
Vielen Dank UmeySan!!!
I didn't had thought about a combination of bounds and shift commands =]]
I was looking for a command line combination, but your tips helps a lot!!
Thanks you all again! |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
My cut & paste enables me to define a "box" with the cursor around the data I want to cut, and then I can paste it at the receiving location.
Is that a Windows option? I know it works for most screens in and outside of ISPF at the shops I've worked in the last few years. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Jack,
Quote: |
Is that a Windows option? |
It is 3270-emulator specific. Many support the box, but some i've used work the "normal" Windows way carrying thru the end of a line when dragged down (like this editor does). |
|
Back to top |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
Just cuious... How could we do the same if we have to pick up multiple columns:
Eg:
Input:
=COLS> ----+----1----+----2----+----3----+----4----+----5
000001 XXXX YYYYY ZZZZ OOOOO $$$$$
000002 XXXX YYYYY ZZZZ OOOOO $$$$$
000003 XXXX YYYYY ZZZZ OOOOO $$$$$
000004 XXXX YYYYY ZZZZ OOOOO $$$$$
000005 XXXX YYYYY ZZZZ OOOOO $$$$$
Output:
=COLS> ----+----1----+----2----+----3----+----4----+----5
000001 YYYYY OOOOO
000002 YYYYY OOOOO
000003 YYYYY OOOOO
000004 YYYYY OOOOO
000005 YYYYY OOOOO
Is it possible to shift column O past column Z?
Thanks |
|
Back to top |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
Sorry guys, I figured that could be done with the same steps above applying the left shift only to the Z column leaving the O in the BNDS.
Thanks! |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Shift left 5, set bnds 7 80, shift left 5, set bnds 16 80, shift left 99, reset bnds
You don't really shift column O past column Z so much as shift Z into the bit bucket and O takes its place. |
|
Back to top |
|
|
|