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
 

 

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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm


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