View previous topic :: View next topic |
Author |
Message |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Tue May 08, 2012 2:55 pm Post subject: Retrieve records with count higher than n |
|
|
Hello,
I've question on the following situaiton:
FB, LRECL 82 file with the following info:
Code: | ----+----1----+----2----+----3----+-
ZZZZ ZZZZ 00593738 25/03/12
ZZZZ ZZZZ 00000100 25/03/12
ZZZZ ZZZZ 00003000 25/03/12
ZZZZ ZZZZ 00000000 25/03/12 |
I would like to retrieve only the records with count higher than 100.
I'm using the following, and not sure why keet getting all records
//TOOLIN DD *
COPY FROM(IN) TO(OUT) USING(FLT1)
//FLT1CNTL DD *
INCLUDE COND=(17,8,CH,NE,00000000)
/*
Could you help me on this, pls? |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue May 08, 2012 3:35 pm Post subject: |
|
|
cyberuser,
Use the following DFSORT JCL which will give you the desired results.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
----+----1----+----2----+----3----+----4----+-
ZZZZ ZZZZ 00593738 25/03/12
ZZZZ ZZZZ 00000100 25/03/12
ZZZZ ZZZZ 00003000 25/03/12
ZZZZ ZZZZ 00000000 25/03/12
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(17,8,ZD,GT,100)
//* |
The output from the above job is
Code: |
ZZZZ ZZZZ 00593738 25/03/12
ZZZZ ZZZZ 00003000 25/03/12
|
_________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
cyberuser Beginner
Joined: 15 Oct 2005 Posts: 29 Topics: 12
|
Posted: Tue May 08, 2012 3:41 pm Post subject: |
|
|
thanks a lot kolusu it worked pretty well. |
|
Back to top |
|
 |
|
|