Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how can i sort the records with name navneet

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

New User


Joined: 09 Oct 2005
Posts: 22
Location: INDIA

PostPosted: Fri Apr 21, 2006 8:52 am    Post subject: how can i sort the records with name navneet
Reply with quote

with sort utility how can i sort the records so that the first record is navneet and then rest other record any records

Can any one tell me what INREC and OUTREC does with some example and where do we use SORT utility in real time.

Thank u icon_cool.gif
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: Fri Apr 21, 2006 8:51 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for. I assumed your "key" was in positions 1-10 and your input file has RECFM=FB and LRECL=80. You can change the job appropriately for other keys and attributes.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
aaa
xxx
navneet
aaa
qqq
rrr
bbb
/*
//SORTOUT  DD SYSOUT=*
//SYSIN    DD    *
* Add 'A' for 'navneet' and 'B' for other records.
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'B')),
        IFTHEN=(WHEN=(1,7,CH,EQ,C'navneet'),OVERLAY=(81:C'A'))
  OPTION EQUALS
* Sort on 'A'/'B' and then name.
  SORT FIELDS=(81,1,CH,A,1,10,CH,A)
* Remove 'A'/'B'.
  OUTREC BUILD=(1,80)
/*


SORTOUT has:

Code:

navneet   
aaa       
aaa       
bbb       
qqq       
rrr       
xxx   


Quote:
Can any one tell me what INREC and OUTREC does with some example and where do we use SORT utility in real time.


INREC reformats records before they are sorted, merged or copied. OUTREC reformats records after they are sorted, merged or copy.
You can use DFSORT for a wide variety of functions.

The best way for you to answer your own questions is to read through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us