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

CUT & PASTE in ISPF


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1448
Location: Chicago, IL

PostPosted: Fri Jan 13, 2006 4:12 pm
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Is there a way to close VSAM files us... CICS 8
No new posts step by step trace 4 ISPF dialog call... TSO/ISPF 17
Search our Forums:

Back to Top