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
 
Could ICETOOL be used to sort in a certain way?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Could ICETOOL be used to sort in a certain way?
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

Site Director


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

PostPosted: Mon Apr 21, 2008 11:11 am    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Apr 21, 2008 11:40 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL 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 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 OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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