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
 

 

CUT & PASTE in ISPF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
subramsa

New User


Joined: 15 Apr 2005
Posts: 16
Location: Bangalore, India

PostPosted: Fri Jan 13, 2006 4:04 pm    Post subject: CUT & PASTE in ISPF
Reply with quote

Hi,
I have PS file in which fields are separated by spaces like below

AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE

My requirement is, i need to CUT CCCC field and place it next to DDDD,
so that my PS file will look like


AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE


Is there any way i can do this in ISPF using CUT / PASTE command.

Many thanks for your help

With Regards
Saikrishnan.S
icon_smile.gif
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Fri Jan 13, 2006 4:12 pm    Post subject: Re: CUT & PASTE in ISPF
Reply with quote

subramsa,

Generally in your Emulator itself you will be having options to cut in BLOCK MODE.

Check out Copy Mode & Cut Mode options in your emulator tools.

Regards,

Priyesh.
Back to top
View user's profile Send private message
subramsa

New User


Joined: 15 Apr 2005
Posts: 16
Location: Bangalore, India

PostPosted: Fri Jan 13, 2006 4:20 pm    Post subject:
Reply with quote

Hi Priyesh.

Emulator doesn't help, becos if the length of the file is > 80, then its very difficult to align the fields after the CUT /PASTE (using Emulator method).

I would like to know any BOND command or LINE command in ISPF which can perform this operation.

Many thanks
subramsa
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Jan 16, 2006 2:41 am    Post subject:
Reply with quote

Hi Sai,

You didn't mention the size of your file. If it's not too big, I've used this approach on many occasions:

At the end of your orig file add a line of "*", giving:
Code:

AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
**************************

Copy the orig file after the "*" line, giving:
Code:

AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
**************************
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE

Enter .a on the 1st line of the dupe copy of file; .b on the last line
On the cmd line enter c all .a .b p'=' '' 10 14. The '' are 2 single quotes w/no space between them. That yields:
Code:

AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
**************************
AAAA BBBB DDDD EEEE
AAAA BBBB DDDD EEEE
AAAA BBBB DDDD EEEE
AAAA BBBB DDDD EEEE
AAAA BBBB DDDD EEEE

On the cmd line enter: bnd 16 xxx (xxx = lrecl of your file)
On the 1st line of the dupe copy of the file enter ))5 on the last line )). That yields:
Code:

AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
AAAA BBBB CCCC DDDD EEEE
**************************
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE

On the cmd line enter: bnd 1 24
On the 1st line of the orig copy of the file enter ))5 on the last line )). That yields:
Code:

     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
**************************
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE
AAAA BBBB DDDD      EEEE

Enter cc on the 1st line of the orig copy of file; cc on the last line
Enter oo on the 1st line of the dupe copy of file; oo on the last line. That yields:
Code:

     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
     AAAA BBBB CCCC DDDD
**************************
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE

Delete the orig file and the "*" line. That yields:
Code:

AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE
AAAA BBBB DDDD CCCC EEEE

Simple, huh? icon_rolleyes.gif There may be other ways to skin this particular cat, but the approach seems sound, ... unless I typoed something or other.

Oh! Did I mention you should save the orig file before you start this? icon_lol.gif
Back to top
View user's profile Send private message
subramsa

New User


Joined: 15 Apr 2005
Posts: 16
Location: Bangalore, India

PostPosted: Mon Jan 16, 2006 3:14 pm    Post subject:
Reply with quote

Hi Jack ...

Many Many thanks for you help. Will check and get back.


Regards
Sai
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Jan 28, 2006 11:06 pm    Post subject:
Reply with quote

HEY Sai,

You said you'd get back to us. It's been almost 2 wks now.

WHAZZUP?
Back to top
View user's profile Send private message
philepeo

New User


Joined: 18 Nov 2005
Posts: 4

PostPosted: Sun Feb 05, 2006 7:32 am    Post subject: Re: CUT & PASTE in ISPF
Reply with quote

you could also try on the command line doing - c 'cccc dddd' 'dddd cccc' all
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Feb 06, 2006 1:28 am    Post subject:
Reply with quote

Hi Philepeo,

The AAAA etc. is generic. It can be QMFX or M234 or #@?% or whatever.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts More ISPF RFE's to vote for prino TSO/ISPF 1 Tue Apr 19, 2016 12:06 am


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