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
 
Sort Six files mearge to one based on one SEQ ID

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

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Fri Feb 13, 2009 3:19 pm    Post subject: Sort Six files mearge to one based on one SEQ ID
Reply with quote

I want to Sort Six files based on a id present in all files

1,1001,file1,
2,1001,file2,
3,1001,file3,
4,1001,file4,
5,1001,file5,
6,1001,file6,

we need to mearge and put it in sorted order

the problem is its not coming in sorted order
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Feb 13, 2009 3:26 pm    Post subject:
Reply with quote

Hi,

you must be doing something wrong.


Gerry
Back to top
View user's profile Send private message
raki_new

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Fri Feb 13, 2009 3:29 pm    Post subject:
Reply with quote

My sort card is:
SORT FIELDS=(60,15,CH,A,
01,02,CH,A)
OUTREC FIELDS=(5,224),CONVERT
END

Instead of this way
1,1001,file1,
2,1001,file2,
3,1001,file3,
4,1001,file4,
5,1001,file5,
6,1001,file6,

it gets sorted in this way

5,1001,file5,
2,1001,file2,
1,1001,file1,
3,1001,file3,
6,1001,file6,
.. Randomly
But 1001,1002,1003. .. are in order

Hope u get my point
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Feb 13, 2009 3:32 pm    Post subject:
Reply with quote

Hi,

you are sorting and not merging, is the file FB or VB ?


Gerry
Back to top
View user's profile Send private message
raki_new

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Fri Feb 13, 2009 3:38 pm    Post subject:
Reply with quote

The file Is VB..
THe ouput is after merging
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Fri Feb 13, 2009 3:39 pm    Post subject: Reply to: Sort Six files mearge to one based on one SEQ ID
Reply with quote

You are not showing anything useful

You talk about one field, but the sort card quotes 2
the data does not match the sort card
and ... ... ...

show the exact layout and content of the fields
and maybe You might get some help
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Feb 13, 2009 3:44 pm    Post subject:
Reply with quote

Hi,

If your records are VB, then they have a 4-byte RDW followed by the data, you have not allowed for this. 01,02,CH,A is definitely incorrect

Gerry
Back to top
View user's profile Send private message
raki_new

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Fri Feb 13, 2009 3:55 pm    Post subject:
Reply with quote

Code:

//STEP010  EXEC PGM=SORT
//SORTIN   DD DSN=TXXXX.AE.CONTRACT,
//            DISP=SHR
//         DD DSN=TXXXX.AE.PARTY,
//            DISP=SHR
//         DD DSN=TXXXX.AE.AGENT,
//            DISP=SHR
//         DD DSN=TXXXX.AE.TRANS,
//            DISP=SHR
//         DD DSN=TXXXX.AE.CHARGE,
//            DISP=SHR
//         DD DSN=TXXXX.AE.FUND,
//            DISP=SHR
//SORTOUT DD DSN=TSOXXXX.ITASCA.AE(+1),
//        DISP=(NEW,CATLG,DELETE),
//        DATACLAS=DATAF,
//        LRECL=14200,RECFM=VB
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
     SORT FIELDS=(60,15,CH,A,                * ACCOUNT ID
                   01,02,CH,A)               * SORTER KEY
//*                92,8,CH,A)                * COPYBOOK ID
     OUTREC FIELDS=(5,224),CONVERT
     END
/*
//*
Back to top
View user's profile Send private message
raki_new

New User


Joined: 10 Feb 2009
Posts: 26
Location: chennai

PostPosted: Fri Feb 13, 2009 3:56 pm    Post subject:
Reply with quote

The file i gave is just a example
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Fri Feb 13, 2009 4:10 pm    Post subject: Reply to: Sort Six files mearge to one based on one SEQ ID
Reply with quote

until You post more descriptive data we cannot do anything,
the jcl does not add any useful info
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 Feb 13, 2009 9:33 pm    Post subject:
Reply with quote

raki_new,

As Gerry said, since your records are VB, you need to account for the RDW in positions 1-4. The first data byte starts in position 5, not in position 1. Try this:

Code:

   SORT FIELDS=(64,15,CH,A,    * ACCOUNT ID
        05,02,CH,A)            * SORTER KEY
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm

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