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
 

 

Sort on VSAM file

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

New User


Joined: 20 Apr 2006
Posts: 2

PostPosted: Thu Jun 08, 2006 11:15 am    Post subject: Sort on VSAM file
Reply with quote

Hi

I have one vsam file with the fields empno,empname,salary.
where as empno is the key field.now i want display the top ten salaried persons empno,empname,salary from that vsam file . how to do that?
i think now u all get the need for sorting the vsam files
Back to top
View user's profile Send private message

sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 182
Location: hyderabad

PostPosted: Thu Jun 08, 2006 12:14 pm    Post subject:
Reply with quote

Hi,
What you need to do is sort the VSAM file on SALARY field in decending order and then use the STARTREC command to get the filrst 10 records.

Thanks
Krishy
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: Thu Jun 08, 2006 9:12 pm    Post subject:
Reply with quote

What is the position, length and format of the empno field?
What is the position, length and format of the empname field?
What is the position, length and format of the salary field?
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: Thu Jun 08, 2006 9:12 pm    Post subject:
Reply with quote

Quote:
then use the STARTREC command to get the filrst 10 records.


That would be ENDREC, not STARTREC.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 182
Location: hyderabad

PostPosted: Fri Jun 09, 2006 1:16 pm    Post subject:
Reply with quote

Thank you Frank for correcting me.

Thank you
Kirshy
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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