IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to give two or more in the sort utility


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Wed Jun 01, 2005 4:03 pm
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
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
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Jun 02, 2005 8:27 pm
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:

Use [URL] BBCode for External Links

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts REASON 00D70014 in load utility DB2 6
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top