View previous topic :: View next topic
|
Author |
Message |
sasi.palani
New User
Joined: 01 Jun 2005 Posts: 14
|
|
|
|
How to copy a set of 1000 lines from one member to another member |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
sasi.palani
New User
Joined: 01 Jun 2005 Posts: 14
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
durga_prasad
New User
Joined: 17 May 2005 Posts: 7 Location: Melbourne
|
|
|
|
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 |
|
|
sasi.palani
New User
Joined: 01 Jun 2005 Posts: 14
|
|
|
|
Thank you ,
This is what exactly i need .
Thanks a lot for ur usefull tips |
|
Back to top |
|
|
pkmainframe
New User
Joined: 14 Jun 2005 Posts: 16 Location: India
|
|
|
|
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 |
|
|
|