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
 

 

Selecting specific number of records thru SORT.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sachin.mandaliya

New User


Joined: 17 Jan 2007
Posts: 24
Location: India

PostPosted: Wed Jan 21, 2009 12:24 pm    Post subject: Selecting specific number of records thru SORT.
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 21, 2009 8:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Jan 21, 2009 8:26 pm    Post subject: Reply to: Selecting specific number of records thru SORT.
Reply with quote

With DFSORT, you can use:

Code:

   SORT FIELDS=COPY,STOPAFT=1000   
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: Wed Jan 21, 2009 10:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
sachin.mandaliya

New User


Joined: 17 Jan 2007
Posts: 24
Location: India

PostPosted: Thu Jan 22, 2009 10:47 am    Post subject: Reply to: Selecting specific number of records thru SORT.
Reply with quote

Hi All,

Thank you all. It has helped me and now my probelem is solved.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am


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