MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieve records with count higher than n

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Tue May 08, 2012 2:55 pm    Post subject: Retrieve records with count higher than n Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 08, 2012 3:35 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
cyberuser
Beginner


Joined: 15 Oct 2005
Posts: 29
Topics: 12

PostPosted: Tue May 08, 2012 3:41 pm    Post subject: Reply with quote

thanks a lot kolusu it worked pretty well.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group