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

Could ICETOOL be used to sort in a certain way?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Absinthia

New User


Joined: 10 Jan 2008
Posts: 36
Location: CHINA

PostPosted: Mon Apr 21, 2008 9:09 am
Reply with quote

Hi,everyone,I have a dataset like this.

Code:
mm 1  abcd                             2008-03-21
mm 3  abcd                             2008-03-21
mm 4  abcd                             2008-03-21
mm 1  abcd                             2008-03-21
mm 3  abcd                             2008-03-21
mm 4  abcd                             2008-03-21


I want to use ICETOOL to make the dataset like this

Code:
mm 1  abcd                             2008-03-21
mm 4  abcd                             2008-03-21
mm 3  abcd                             2008-03-21
mm 1  abcd                             2008-03-21
mm 4  abcd                             2008-03-21
mm 3  abcd                             2008-03-21


Maybe it is a little tricky,could anyone help me with it?
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: Mon Apr 21, 2008 11:11 am
Reply with quote

Hello,

Quote:
Maybe it is a little tricky,could anyone help me with it?
Maybe there needs to be a better definition of the requirement. . .

You show the "4"s being sorted ahead of the "3"'s and otherwise nothing changes. I suspect that the data posted is not representative of all of the data that might be in the input.

What needs to happen if there are 2's, 5's etc in the input? Is that "field" only 1 byte long?

Please post all of the "rules" for your reqirement as well as some more comprehensive data.

Also, post the recfm and lrecl of the input and output along with the columns that contain "control" information.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Apr 21, 2008 11:40 am
Reply with quote

Hi,
try this
Code:
//ALTSEQ   EXEC PGM=SORT                                               
//SORTIN   DD *                                                         
MM 1  ABCD                             2008-03-21                       
MM 3  ABCD                             2008-03-21                       
MM 4  ABCD                             2008-03-21                       
MM 1  ABCD                             2008-03-21                       
MM 3  ABCD                             2008-03-21                       
MM 4  ABCD                             2008-03-21                       
//SORTOUT  DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSIN    DD *                                                         
  INREC IFTHEN=(WHEN=(4,1,CH,EQ,C'1'),                                 
  OVERLAY=(81:SEQNUM,3,ZD,START=1,INCR=3)),                             
        IFTHEN=(WHEN=(4,1,CH,EQ,C'3'),                                 
  OVERLAY=(81:SEQNUM,3,ZD,START=3,INCR=3)),                             
        IFTHEN=(WHEN=(4,1,CH,EQ,C'4'),                                 
  OVERLAY=(81:SEQNUM,3,ZD,START=2,INCR=3))                             
     SORT FIELDS=(81,3,BI,A)   
     OUTREC BUILD=(1,80)
                                       


Gerry
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 -> DFSORT/ICETOOL

 


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 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
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top