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

Sort records in Ascending Order


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

New User


Joined: 09 Feb 2007
Posts: 4
Location: India

PostPosted: Wed Feb 28, 2007 7:03 pm
Reply with quote

Hi,

I have a file, i need to keep in order, Could you please any one help to solve this.

My requirement is

Input File:

Line10
xxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyy
ddddddddddddddddd
Line01
dddddddddddddddd
dddddddddddddddd
yyyyyyyyyyyyyyyy
Line11
eeeeeeeeeeeeeeeee
yyyyyyyyyyyyyyyy
djfjflfjsdfjsdf
dflsdkfjsdlfj
Line02
sdfsddfsdfsdf
sdfsdfsfdsfwerewr

Out put file should be like the follwing(it should be Sorted order based on LINE01/02/03....

Line01
dddddddddddddddd
dddddddddddddddd
yyyyyyyyyyyyyyyy
Line02
sdfsddfsdfsdf
sdfsdfsfdsfwerewr
Line10
xxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyy
ddddddddddddddddd
Line11
eeeeeeeeeeeeeeeee
yyyyyyyyyyyyyyyy
djfjflfjsdfjsdf
dflsdkfjsdlfj

If any suggestion, Please welcome

Many thanks in advance
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: Wed Feb 28, 2007 9:15 pm
Reply with quote

What is the RECFM and LRECL of the input file?
Back to top
View user's profile Send private message
rama9

New User


Joined: 09 Feb 2007
Posts: 4
Location: India

PostPosted: Fri Mar 02, 2007 12:07 pm
Reply with quote

Hi,

Thanks for your reply..

RECFM= FB and LRECL=80
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: Fri Mar 02, 2007 9:39 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:

Use [URL] BBCode for External Links

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN       DD DSN=...  input file (FB/80)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT      DD DSN=...  output file (FB/80)
//TOOLIN   DD *
SPLICE FROM(IN) TO(T1) ON(81,8,ZD) -
  WITHALL WITH(1,80) KEEPBASE USING(CTL1)
SORT FROM(T1) TO(OUT) USING(CTL2)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD)),
        IFTHEN=(WHEN=(1,4,CH,EQ,C'Line'),
                OVERLAY=(81:SEQNUM,8,ZD,98:1,8)),
        IFTHEN=(WHEN=NONE,
                OVERLAY=(89:SEQNUM,8,ZD,98:8X,
                         81:81,8,ZD,SUB,89,8,ZD,M11,LENGTH=8))
/*
//CTL2CNTL DD *
  OPTION EQUALS
  SORT FIELDS=(98,8,UFF,A)
  OUTREC BUILD=(1,80)
/*
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 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top