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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copy a set of 1000 lines from one member to another member
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 Moderator


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

PostPosted: Sat Jun 11, 2005 8:33 pm    Post subject:
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    Post subject: thank you
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 Moderator


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

PostPosted: Sat Jun 11, 2005 9:41 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts after TBSARG: Row 370 from 1000 Pedro TSO/ISPF 1 Fri Apr 14, 2017 2:32 am


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