Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ISPF Edit column/line range command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: ISPF Edit column/line range command
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

Senior Member


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

PostPosted: Sat Jun 21, 2008 1:30 am    Post subject: Reply to: ISPF Edit column/line range command
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: 2360
Location: Israel

PostPosted: Sat Jun 21, 2008 12:58 pm    Post subject:
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: 743
Location: Germany

PostPosted: Mon Jun 23, 2008 3:33 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Sat Jun 28, 2008 7:33 pm    Post subject:
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    Post subject:
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    Post subject:
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: 7933
Location: Bellevue, IA

PostPosted: Thu Jul 17, 2008 1:09 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us