MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Has your system installed DFSORT?
If it's true try with:
Code: |
//*---------------------------------------------------
//* ICETOOL UTILITY
//*---------------------------------------------------
//STEP010S EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
SELECT FROM(INDD) TO(OUTDD) ON(1,8,CH) ALLDUPS
//INDD DD DISP=SHR,DSN=MYINPUT
//OUTDD DD DISP=(,CATLG,DELETE),LRECL=80,RECFM=FB,
// SPACE=(XXX,(XX,XX),RLSE),
// DSN=MYOUTPUT |
where "ON(1,8,CH)" is the length(start,length,format) of the key that you want search.
If you need also the other record you can modify that step with:
Code: |
...
SELECT FROM(INDD) TO(OUTDD) ON(1,8,CH) ALLDUPS -
DISCARD(OTHERDD)
//INDD DD DISP=SHR,DSN=MYINPUT
//OUTDD DD DISP=(,CATLG,DELETE),LRECL=XX,RECFM=XX,
// SPACE=(XXX,(XX,XX),RLSE),
// DSN=MYOUTPUT
//OTHERDD DD DISP=(,CATLG,DELETE),LRECL=XX,RECFM=XX,
// SPACE=(XXX,(XX,XX),RLSE),
// DSN=DISCARDD |
p.s. = all the fields with xx depend of your need and remember that for VB input data start in position 5. |
|