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
 
Using Sort and include cond in single step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Tue Apr 08, 2014 5:47 pm    Post subject: Using Sort and include cond in single step
Reply with quote

Hi.. i was trying to split a file based on some conditions using INCLUDE statement like below.(I am using syncsort 1.4.0 )
Code:

OPTION COPY                                                         
OUTFIL FILES=01,INCLUDE=(80,3,CH,EQ,C'A01')
OUTFIL FILES=02,INCLUDE=(80,3,CH,NE,C'A01')

Till this point its fine and simple.
however I am trying to SORT the files based on some fields as well in one shot using SORT FIELDS=(24,10,CH,A) along with include conditions.
This is not the correct way ,so getting syntax error. Tried like below also
Code:

OUTFIL FILES=02               
SORT FIELDS=(24,10,CH,A)     
INCLUDE COND=(80,1,CH,EQ,C'A')
                             
OUTFIL FILES=01               
SORT FIELDS=(12,1,CH,A)       
INCLUDE COND=(80,1,CH,NE,C'A')


But getting DUPLICATE STATEMENT FOUND.
Could you please suggest any way...!
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Apr 08, 2014 6:18 pm    Post subject: Reply to: Using Sort and include cond in single step
Reply with quote

Because you have duplicate SORT statements.

You can only have one SORT in a single step.

You can do one SORT and do the split, and SORT in another step for the second file. Or, especially with a lot of records, you can create an extra key, populated depending on your selection, and SORT on that key, to get both orders at once.
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Tue Apr 08, 2014 6:25 pm    Post subject: Reply to: Using Sort and include cond in single step
Reply with quote

Hi Bill.. Thanks for the clarification.!!.. Will do that...
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 -> SYNCSORT 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 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 it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

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