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

DFSORT/ICETOOL SORTING RECORDS IN DESIRED FORMAT


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

New User


Joined: 21 Jan 2009
Posts: 2
Location: hyd

PostPosted: Wed Jan 28, 2009 6:40 pm
Reply with quote

Input:
Code:

A   B   C   D   E


for this input i want to get the output as bellow

Output:
Code:

A   B   C   D   E   
B   A   C   D   E
C   A   B   D   E
D   A   B   C   E
E   A   B   C   D


Is this Possible?
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Wed Jan 28, 2009 6:54 pm
Reply with quote

This should work for you:


Code:

//ICETOOL  EXEC PGM=ICETOOL                           
//TOOLMSG  DD  SYSOUT=*                               
//DFSMSG   DD  SYSOUT=*                               
//TOOLIN   DD  *                                     
COPY FROM(INPUT) TO(OUTFILE) USING(CTL1)             
//SYSOUT   DD  SYSOUT=*                               
//SYSUDUMP DD  SYSOUT=*                               
//INPUT    DD  *                                     
A B C D E                                             
//OUTFILE  DD  DSN=...  output file (FB/80)                               
//CTL1CNTL DD  *                                     
 OUTFIL FNAMES=OUTFILE,                               
   BUILD=(1:1,2,3:3,2,5:5,2,7:7,2,9:9,2,80:X,/,       
          1:3,2,3:1,2,5:5,2,7:7,2,9:9,2,/,           
          1:5,2,3:1,2,5:3,2,7:7,2,9:9,2,/,           
          1:7,2,3:1,2,5:3,2,7:5,2,9:9,2,/,           
          1:9,2,3:1,2,5:3,2,7:5,2,9:7,2)         
/*
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Jan 28, 2009 11:59 pm
Reply with quote

Sukku_mar3,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN             
//SYSOUT   DD SYSOUT=*                 
//SORTIN   DD *                       
A   B   C   D   E                     
//SORTOUT  DD SYSOUT=*                 
//SYSIN    DD *                       
  SORT FIELDS=COPY                     
  OUTFIL BUILD=(01,80,/,               
                05,04,01,04,09,72,/,   
                09,04,01,08,13,68,/,   
                13,04,01,12,17,64,/,   
                17,04,01,16,21,60)     
/*
Back to top
View user's profile Send private message
sukku_mar3

New User


Joined: 21 Jan 2009
Posts: 2
Location: hyd

PostPosted: Thu Jan 29, 2009 10:54 am
Reply with quote

thank u for ur reply,
But actually my input is
A B C D..........Y Z.

Just to know how to proceed only I have given the input as
A B C D E

If I proceed in your way,It will be lengthy.
We cannot do every time for a lengthy record like this kind of overlapping right.
I want to know whether is there any otherway (like any keyfiends that we can consider) to shorten this process.
Can you help me out in this.
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: Thu Jan 29, 2009 9:42 pm
Reply with quote

Quote:
I want to know whether is there any otherway (like any keyfiends that we can consider) to shorten this process.


What process? What keyfields? You haven't explained anything about what you're trying to do. Maybe if you did, we could come up with a more relevant solution.

Your Subject title mentions sorting, but you haven't explained where "sorting" fits into this.

Do you only have one input record or do you have multiple input records?

Give a better explanation of what you're trying to do with a better example.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top