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 issue with Synctool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Tue Feb 23, 2010 11:17 am    Post subject: Sort issue with Synctool
Reply with quote

Hi All icon_smile.gif,

I am using the following JCL, but the output does not come in specified sort order as given in the below Syctool control card. Please advice...

Code:
//JSTEP010 EXEC PGM=SYNCTOOL           
//**                                   
//TOOLMSG  DD SYSOUT=*                 
//DFSMSG   DD SYSOUT=*                 
//**                                   
//IN       DD DSN=Input dataset...
//            DISP=SHR                 
//*                                   
//OUT      DD SYSOUT=*                 
//**                                   
//TOOLIN   DD *                       
  COPY FROM(IN) TO(OUT) USING(CTL1)   
/*                                     
//CTL1CNTL DD *                       
*                                     
  INCLUDE COND=(424,001,CH,EQ,C'X',AND,
                394,001,CH,EQ,C'Y')   
*                                     
  INREC FIELDS=(395,004,               
                342,026,               
                424,010,                         
                984,010)                         
*                                               
  SORT FIELDS=(001,004,BI,A,                     
               041,010,CH,D,                     
               005,026,CH,D)                     
*                                               
  OUTREC FIELDS=(001:001,004,BI,EDIT=(TTTTTTTTT),
                 010:X,                         
                 011:031,010,                   
                 021:X,                         
                 022:041,010,                   
                 032:X,                         
                 033:005,026)                   
/*                                               


Thanks in advance!
Ramanan R
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Feb 23, 2010 11:21 am    Post subject:
Reply with quote

Hi,

I believe you.


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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 23, 2010 11:22 am    Post subject:
Reply with quote

Hello,

The job will have done what you told it to do. . .

You need to post a bit of sample input, the output you want from the sample input, the "wrong"actual output and the informational data presented by the run.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Tue Feb 23, 2010 12:08 pm    Post subject:
Reply with quote

Its doing what it has been asked to do - COPY. Change the COPY to SORT.
Code:
  COPY FROM(IN) TO(OUT) USING(CTL1) 
Change the above to
Code:
  SORT FROM(IN) TO(OUT) USING(CTL1) 
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Tue Feb 23, 2010 2:39 pm    Post subject:
Reply with quote

Thanks Arun...

Its working perfect... I assume DFSORT/ICETOOL would sort even if it is COPY

Thanks again..
Ramanan R
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Feb 23, 2010 3:29 pm    Post subject:
Reply with quote

Ramanan-R wrote:
Its working perfect... I assume DFSORT/ICETOOL would sort even if it is COPY
No, you need to tell the sort what to do. "SORT ..." and "COPY..." are different functions.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Feb 23, 2010 4:46 pm    Post subject:
Reply with quote

Hi,

from my tests, DFSORT will sort even if you have COPY.


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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Feb 23, 2010 5:25 pm    Post subject:
Reply with quote

Hi Gerry,

if you look at the Chapter 2, sub-topic: Copying Data Sets of DFSORT: Getting Started, it says(emphasis added by me),
Quote:
Copying Data Sets
With DFSORT you can copy data sets directly without performing a sort or merge.
...did you mean something else?

PS. I'm not a DFSort spoke-person, if I've interpreted the manual wrongly, please do correct me.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Feb 23, 2010 5:30 pm    Post subject:
Reply with quote

Hi Anuj,

ran the same JCL with DFSORT and SYNCSORT using
Code:
  COPY FROM(IN) TO(OUT) USING(CTL1) 
and DFSORT sorts the records.


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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Feb 23, 2010 5:51 pm    Post subject:
Reply with quote

Hi Gerry,

I've sent a note to Frank to have a look on this thread - I'm not the correct person, I believe, to comment on this any further (as my shop uses SyncSort these days).
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Feb 23, 2010 8:58 pm    Post subject:
Reply with quote

Yes, SyncSort and DFSort behave differently in this situation. However, if so desired, SyncSort can be modified to perform the SORT in CTLnCNTL when COPY has been specified in TOOLIN.
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: Tue Feb 23, 2010 9:55 pm    Post subject:
Reply with quote

DFSORT's ICETOOL will, in fact, do a SORT in this case. We found that for some reason, people often use a COPY operator instead of a SORT operator when they want to do a SORT, so if we see a SORT statement in that case, we do a SORT. Makes sense to us.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Tue Feb 23, 2010 10:06 pm    Post subject:
Reply with quote

Quote:
Its working perfect
Good to hear it's working. Thanks for letting us know.
Back to top
View user's profile Send private message
Ramanan-R

New User


Joined: 21 Mar 2007
Posts: 66
Location: Chennai, Tamilnadu, India

PostPosted: Wed Feb 24, 2010 12:25 pm    Post subject:
Reply with quote

Thank you all for your information...

Regards,
Ramanan R
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 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 DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm


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