|
|
| Author |
Message |
muffirulz
Active User
Joined: 14 Sep 2005 Posts: 50 Location: Kentucky, USA
|
|
|
|
Hi,
I am trying to eliminate duplicate records from a file of Lrecl = 4500.
I am trying to use the following
| Code: |
SORT FIELDS=(1,4500,CH,A)
SUM FIELDS=NONE |
Its giving me the following error
| Code: |
SORT FIELDS=(1,4500,CH,A)
$
ICE017A C CONTROL FIELD DISPLACEMENT OR LENGTH VALUE ERROR
SUM FIELDS=NONE |
I see it might be that the length specified is not acceptable. Is there anyway in which I can perform the sort on the whole file and eliminate the duplicate records.
Thanks, |
|
| Back to top |
|
 |
References
|
Posted: Wed Mar 26, 2008 11:47 pm Post subject: Re: Sort a file with record length 4500 |
 |
|
|
 |
Skolusu
DFSORT Developer
Joined: 07 Dec 2007 Posts: 304 Location: San Jose
|
|
|
|
Muffirulz,
The following DFSORT/ICETOOL jcl will give you the desired results.
| Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=Your 4500 lrecl dataset,
// DISP=SHR
//T1 DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//T2 DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//KEEP DD DSN=YOUR FINAL OUTPUT WITHOUT DUPS,
// DISP=(MOD,CATLG,DELETE)
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//TOOLIN DD *
SELECT FROM(IN) TO(T1) ALLDUPS DISCARD(KEEP) USING(CTL1)-
ON(01,1500,CH) ON(1501,1500,CH) ON(3001,1000,CH)
SPLICE FROM(T1) TO(T2) USING(CTL2) WITH(1,4500) WITHALL -
ON(01,1500,CH) ON(1501,1500,CH) ON(3001,1000,CH)
SELECT FROM(T2) TO(KEEP) FIRST USING(CTL3) -
ON(4501,08,CH) ON(4001,500,CH)
//CTL1CNTL DD *
INREC OVERLAY=(4501:8X)
OUTFIL FNAMES=T1,REMOVECC,
OVERLAY=(4501:SEQNUM,8,ZD),
SECTIONS=(0001,256,SKIP=0L,
0257,256,SKIP=0L,
0513,256,SKIP=0L,
0769,256,SKIP=0L,
1025,256,SKIP=0L,
1281,256,SKIP=0L,
1537,256,SKIP=0L,
1793,256,SKIP=0L,
2049,256,SKIP=0L,
2305,256,SKIP=0L,
2561,256,SKIP=0L,
2817,256,SKIP=0L,
3073,256,SKIP=0L,
3329,256,SKIP=0L,
3585,256,SKIP=0L,
3841,160,SKIP=0L,
TRAILER3=(0001,256,
0257,256,
0513,256,
0769,256,
1025,256,
1281,256,
1537,256,
1793,256,
2049,256,
2305,256,
2561,256,
2817,256,
3073,256,
3329,256,
3585,256,
3841,160,
4501:4501,8))
OUTFIL FNAMES=KEEP,OUTREC=(01,4500)
/*
//CTL2CNTL DD *
SORT FIELDS=(0001,4000,CH,A,
4501,0008,CH,D)
INREC IFTHEN=(WHEN=(4501,8,CH,EQ,C' '),
OVERLAY=(4501:SEQNUM,8,ZD)),
IFTHEN=(WHEN=NONE,
OVERLAY=(4501:8X))
/*
//CTL3CNTL DD *
OUTFIL FNAMES=KEEP,OUTREC=(01,4500)
/* |
Hope this helps...
Cheers |
|
| Back to top |
|
 |
achittu
New User
Joined: 26 Feb 2007 Posts: 11 Location: hyderabad
|
|
|
|
Try the following :
| Code: |
//STEP01 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=Your 4500 lrecl dataset,DISP=SHR
//OUT DD DSN=Your Output Dataset Name
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) NODUPS ON(01,1500,CH) -
ON(1501,1500,CH) ON(3001,1500,CH)
|
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4394 Location: San Jose, CA
|
|
|
|
| Quote: |
Try the following:
... |
achittu,
If you had followed your own advice and tried that, you would have found out that it doesn't work. 4500 bytes is larger than the limit allowed for that kind of thing. |
|
| Back to top |
|
 |
|
|
|