Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort 2 input files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Sort 2 input files
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 27, 2014 1:27 pm    Post subject: Reply to: Sort 2 input files
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    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 27, 2014 2:42 pm    Post subject: Reply to: Sort 2 input files
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Aug 27, 2014 3:15 pm    Post subject: Reply to: Sort 2 input files
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 27, 2014 4:16 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us