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

Sort 2 input files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Dasarathy

New User


Joined: 20 May 2014
Posts: 5
Location: india

PostPosted: Wed Aug 27, 2014 1:04 pm
Reply with quote

I need to sort 2 different input files and sorted output also should be in 2 different files. How can i do this in a single sort step?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 27, 2014 1:27 pm
Reply with quote

Show some sample input, expected output, output you receive from what you have tried, RECFM and LRECL.
Back to top
View user's profile Send private message
Dasarathy

New User


Joined: 20 May 2014
Posts: 5
Location: india

PostPosted: Wed Aug 27, 2014 2:21 pm
Reply with quote

We dont have enough steps in the JOB.. we have to complete it in 1 step...
Back to top
View user's profile Send private message
Dasarathy

New User


Joined: 20 May 2014
Posts: 5
Location: india

PostPosted: Wed Aug 27, 2014 2:34 pm
Reply with quote

Code:
//STEP02   EXEC PGM=SYNCTOOL                                           
//TOOLMSG   DD SYSOUT=*                                                 
//DFSMSG    DD SYSOUT=*                                                 
//SORTIN1   DD DSN=TCR201.PRL.V2DG510.CARD.MEMBER.UNLD.G0001V00,       
//             DISP=SHR                                                 
//SORTIN2   DD DSN=TCR201.PRL.V2DG520.COPTNEFO.FILE.G0001V00,           
//             DISP=SHR                                                 
//OUT1      DD DSN=TCR201.PRL.V2DG520.COPTNEFO.FILE.SORT,               
//             DISP=(NEW,CATLG,DELETE),                                 
//             UNIT=SYSDA,                                             
//             DATACLAS=STANDARD                                       
//OUT2      DD DSN=TCR201.PRL.V2DG510.CARD.MEMBER.UNLD.SORT,           
//             DISP=(NEW,CATLG,DELETE),                                 
//             UNIT=SYSDA,                                             
//             DATACLAS=STANDARD                                       
//TOOLIN    DD *                                                       
  SELECT FROM(SORTIN1) TO(OUT1)  ON(1,40,CH)  -                         
                           ALLDUPS                                     
  SELECT FROM(SORTIN2) TO(OUT2)  ON(20,40,CH) -                         
                           ALLDUPS                   
//*
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 27, 2014 2:42 pm
Reply with quote

The JOB should be split. In my opinion, jobsteps should never get near the maximum. Not even close. Not even far away, but far, far away. Makes things much easier.

If you want to add two different SORTs to an existing ICETOOL step to keep the number of steps in a job down, you can do that, but you're making things more complex and more difficult to restart.
Back to top
View user's profile Send private message
Dasarathy

New User


Joined: 20 May 2014
Posts: 5
Location: india

PostPosted: Wed Aug 27, 2014 2:49 pm
Reply with quote

Yeah but we have no other go.. The above snippet doesnt work... Can u please rectify the flaws..?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 27, 2014 3:15 pm
Reply with quote

No, I have no real clue what you want. Why are you using SELECT instead of ICETOOL's SORT operator if you just want to sort the files?

Plus, I have no way of knowing in what way it didn't work.

If you answer the earlier questions and say what is wrong with your current approach, we may get somewhere.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 27, 2014 4:16 pm
Reply with quote

Please learn to use the code tags, example below, to make our lives easier when looking at what you post

Code:
[code] Put your stuff
in here [/code]


Also suggest paying attention to detail as it looks from the dataset names that you really want SORTIN1 to go to OUT2

I'm confused too
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
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
Search our Forums:

Back to Top