prashantshinde
New User
Joined: 25 Nov 2005 Posts: 49 Location: Pune
|
|
|
|
I have the Flat file with RECFM = VB.
The records are Eno,Ename,Salary.I do not know the
length of Ename field and Salary starts imediately after the Ename field , like:
100011PRASHANT15000
100054AVINASHJAIN12000
100032MOHITSHARMA17000
100012HEMANT10000
Now I want the file to sort on ' Salary '.
Can anyone suggest the way ? |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Prashant,
You can use the following DFSORT job to 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 DFSORT's PARSE function. If you have DFSORT, but 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=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//SORTOUT DD DSN=... output file (VB)
//SYSIN DD *
INREC PARSE=(%01=(ABSPOS=11,FIXLEN=6,
STARTAT=C'0',STARTAT=C'1',STARTAT=C'2',STARTAT=C'3',
STARTAT=C'4',STARTAT=C'5',STARTAT=C'6',STARTAT=C'7',
STARTAT=C'8',STARTAT=C'9')),
BUILD=(1,4,5:%01,11:5)
SORT FIELDS=(5,6,UFF,A)
OUTREC BUILD=(1,4,5:11)
/*
|
|
|