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

Sort issue with Synctool


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1702
Location: Australia

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

Hi,

I believe you.


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

Moderator Emeritus


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

PostPosted: Tue Feb 23, 2010 11:22 am
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: 2481
Location: @my desk

PostPosted: Tue Feb 23, 2010 12:08 pm
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
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

Superior Member


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

PostPosted: Tue Feb 23, 2010 3:29 pm
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: 1702
Location: Australia

PostPosted: Tue Feb 23, 2010 4:46 pm
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

Superior Member


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

PostPosted: Tue Feb 23, 2010 5:25 pm
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: 1702
Location: Australia

PostPosted: Tue Feb 23, 2010 5:30 pm
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

Superior Member


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

PostPosted: Tue Feb 23, 2010 5:51 pm
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: 496
Location: USA

PostPosted: Tue Feb 23, 2010 8:58 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Feb 23, 2010 9:55 pm
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: 2481
Location: @my desk

PostPosted: Tue Feb 23, 2010 10:06 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
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
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top