View previous topic :: View next topic
|
Author |
Message |
sachin.mandaliya
New User
Joined: 17 Jan 2007 Posts: 24 Location: India
|
|
|
|
Hi,
I have requirement of selecting first 1000 records from one file to another file.
Is it possible thru SORT? How can I do it?
Please help me for that. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There are multiple examples in both the jcl (syncsort) and dfsort parts of the forum. If you find something that is not clear, post what you found and your question about it. |
|
Back to top |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
With DFSORT, you can use:
Code: |
SORT FIELDS=COPY,STOPAFT=1000
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Sachin,
Here are two equivalent ways to do that with DFSORT and DFSORT's ICETOOL:
DFSORT
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY,STOPAFT=1000
/*
|
DFSORT's ICETOOL
Code: |
//S2 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) KEEP INPUT FIRST(1000)
/*
|
|
|
Back to top |
|
|
sachin.mandaliya
New User
Joined: 17 Jan 2007 Posts: 24 Location: India
|
|
|
|
Hi All,
Thank you all. It has helped me and now my probelem is solved. |
|
Back to top |
|
|
|