IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ISPF Edit column/line range command


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
DonanferMaztho

New User


Joined: 06 Dec 2007
Posts: 9
Location: Brazil

PostPosted: Fri Jun 20, 2008 11:26 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sat Jun 21, 2008 1:30 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sat Jun 21, 2008 12:58 pm
Reply with quote

Try a combination of editor labels and BNDS command.

O.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Mon Jun 23, 2008 3:33 pm
Reply with quote

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
View user's profile Send private message
DonanferMaztho

New User


Joined: 06 Dec 2007
Posts: 9
Location: Brazil

PostPosted: Wed Jun 25, 2008 11:58 pm
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jun 28, 2008 6:36 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jun 28, 2008 7:33 pm
Reply with quote

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
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Thu Jul 17, 2008 1:03 am
Reply with quote

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
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Thu Jul 17, 2008 1:09 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 17, 2008 1:09 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Routing command Address SDSF to other... TSO/ISPF 2
Search our Forums:

Back to Top