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 to give two or more in the sort utility

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

New User


Joined: 24 May 2005
Posts: 9

PostPosted: Wed Jun 01, 2005 2:04 pm    Post subject: how to give two or more in the sort utility
Reply with quote

i have a doubt that how to sort two or more files by
using external sort
plz anyone give syntax
thanks in advance
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Jun 01, 2005 4:03 pm    Post subject: Re: how to give two or more in the sort utility
Reply with quote

laxmi:

1. What do the files look like (LRECL, RECFM)?

2. What is the key or keys you wish to sort on (position, length, type)?

3. What is the desired output format (i.e. same LRECL and RECFM as the input)?
Back to top
View user's profile Send private message
laxmi

New User


Joined: 24 May 2005
Posts: 9

PostPosted: Thu Jun 02, 2005 11:01 am    Post subject: hai
Reply with quote

for example my files are FILE1 , FILE2 having the below data


FILE1

2SINDHU
1SIRI
6AKSHAYA
3PHANI
5RAM
4VIJAY

FILE2

10PREM
7GIRI
9ABDUL
8DEVI

NOW I WANT TO SORT BASED ON THE OFFSETS OF TWO FILES
to get the output of below

1siri
2sindhu
3phani
4vijay
5ram
6akshaya
7giri
8devi
9abdul
10prem
in the third file
Back to top
View user's profile Send private message
subhash gowda
Warnings : 1

New User


Joined: 02 Jun 2005
Posts: 12

PostPosted: Thu Jun 02, 2005 4:57 pm    Post subject:
Reply with quote

if ur file parameter and field parameter of the both file are same,then do the df sort for both the file and merge the both the file,then u can get the desired output
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 02, 2005 8:27 pm    Post subject:
Reply with quote

Iaxmi,

You didn't give the LRECL and RECFM of the two input files. So let's assume they both have RECFM=FB and the same LRECL (e.g. 80). Then you can use the following DFSORT job to sort the two files:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   input file1
//     DD DSN=...   input file2
//SORTOUT DD DSN=...   output file
//SYSIN DD *
  SORT FIELDS=(...)
/*


Now if your data really looks like you've shown and you have 1-digit numbers in position 1 (e.g. 1) and 2-digit numbers (e.g. 10) in positions 1-2, then you'd have to use a SORT statement like this to sort on those numbers correctly:

Code:

   SORT FIELDS=(1,2,UFF,A)


You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's new UFF format. Only DFSORT has this format, so if you don't have DFSORT, you won't be able to use it. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/

I assume you don't really want to change the data from uppercase to lowercase as you show in your example, but if you do, DFSORT can do that as well.

If this doesn't answer your question, then you need to be more specific about what you want to do.
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 Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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