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

Copy a set of 1000 lines from one member to another member


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sasi.palani

New User


Joined: 01 Jun 2005
Posts: 14

PostPosted: Sat Jun 11, 2005 4:20 pm
Reply with quote

How to copy a set of 1000 lines from one member to another member
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Jun 11, 2005 8:33 pm
Reply with quote

You can use a DFSORT job like this to copy the first 1000 lines of a member to another member:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=pds1(member),DISP=SHR
//SORTOUT DD DSN=pds2(member),DISP=OLD
//SYSIN DD *
   OPTION COPY,STOPAFT=1000
/*


If it's not the first 1000 lines you want to copy, you can use SKIPREC and STOPAFT in the OPTION statement, or STARTREC and ENDREC in the OUTFIL statement. For example, if you want to copy lines 21-1020, you can use:

Code:

   OPTION COPY,SKIPREC=20,STOPAFT=1000


or:

Code:

   OPTION COPY
   OUTFIL STARTREC=21,ENDREC=1020
Back to top
View user's profile Send private message
sasi.palani

New User


Joined: 01 Jun 2005
Posts: 14

PostPosted: Sat Jun 11, 2005 9:10 pm
Reply with quote

but u r telling how to copy set of records from middle , iam asking about jcl codes . suppose if my jcl has 2000 lines , iam in a position to copy 300 to 600 lines from one jcl to my jcl in the middle of that 2000 lines.
how i can do that . i think it wont do for lines . it will work for records .

plz confirm me . and that too we should not any jcls for this task we have to do in the tso itself.


plz anyone give me exact solution .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Jun 11, 2005 9:41 pm
Reply with quote

Sasi,

Why didn't you explain in more detail what you wanted to do in the first place? I gave you a solution based on the question you asked in your first post. I can't read your mind to know that the question you asked in your first post did not describe what you actually want to do.

If you need to do this in TSO, why didn't you post it in the TSO Forum rather than in the JCL Forum? Please try to be more clear in your posts so you don't waste peoples' time (and then complain when they don't give you the "right" answer because you didn't ask the "right" question).
Back to top
View user's profile Send private message
durga_prasad

New User


Joined: 17 May 2005
Posts: 7
Location: Melbourne

PostPosted: Sun Jun 12, 2005 5:44 pm
Reply with quote

Frank Yaeger wrote:
Sasi,

Why didn't you explain in more detail what you wanted to do in the first place? I gave you a solution based on the question you asked in your first post. I can't read your mind to know that the question you asked in your first post did not describe what you actually want to do.

If you need to do this in TSO, why didn't you post it in the TSO Forum rather than in the JCL Forum? Please try to be more clear in your posts so you don't waste peoples' time (and then complain when they don't give you the "right" answer because you didn't ask the "right" question).


Sasi
You can do in various ways:
If you would like to copy from the begining of the jcl, just open a jcl member and place your cursor on first line on number and then type C1000 and place your cursor on command prompt, then say CUT and press Enter.

Example

EDIT AA.BB.CC(MEMBER1)......................
Command====> CUT
C10000 //U2456789 JOB 'ACCOUNT', NOTIFY=U245678
110000 //......
120000 //......

then open a member where u want to copy, and on new member, type PASTE on command prompt. But you need to place curson on line number and type A if you want to copy after that line. see below, if you want to copy those 1000 lines after 2nd line.

EDIT AA.BB.CC(MEMBER2)................
Command====> PASTE
110000 //
A20000 //
130000 //.........

Please be noted that the installation must have CUT and PASTE macros defined, otherwise this doesn't work. But most sites will have these macros.

Hope this will help you, even though i didn't cut and paste actual from mainframe.

Dp
Back to top
View user's profile Send private message
sasi.palani

New User


Joined: 01 Jun 2005
Posts: 14

PostPosted: Tue Jun 14, 2005 3:48 pm
Reply with quote

Thank you ,

This is what exactly i need .

Thanks a lot for ur usefull tips
Back to top
View user's profile Send private message
pkmainframe

New User


Joined: 14 Jun 2005
Posts: 16
Location: India

PostPosted: Tue Jun 14, 2005 5:21 pm
Reply with quote

In case if the above solution doesn't works (cut & paste), other alternate
way is use bolck command

EDIT AA.BB.CC(MEMBER2)................
Command====> PASTE
CC10000 //




CC20000//
A20000 //
130000 //.........

yuo should know the line from begin to end line no. this will work any any environment of TSO
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 VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top