Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : programming pearls - The fastest algorithm can frequently be replaced by one that is almost as fast and much easier to understand.

Google
 
Web mainframegurukul.com

Welcome to the mainframegurukul forums.

You are currently viewing our mainframe forums as a guest which gives you limited access to view most discussions, articles. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support at admin@mainframegurukul.com


Need to check count of file records and abend if >10.

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL
  View previous topic :: View next topic  
Author Message
rahul_kolhe
Member


Joined: 08 Nov 2006
Posts: 12

PostPosted: Fri Nov 17, 2006 2:01 am    Post subject: Need to check count of file records and abend if >10. Reply with quote

Hi,

I want to check the number of records count in file and if count is more than 10 then needs to return abend.

How could we attend this thru JCL, Do not want to write prog.

Thanks,
Back to top
View user's profile Send private message

Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 487
Location: San Jose, CA

PostPosted: Fri Nov 17, 2006 2:32 am    Post subject: Reply with quote

Would you settle for a RC=12 rather than an abend?
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rahul_kolhe
Member


Joined: 08 Nov 2006
Posts: 12

PostPosted: Sat Nov 18, 2006 12:11 am    Post subject: Reply with quote

Yes, I will.
Back to top
View user's profile Send private message
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 487
Location: San Jose, CA

PostPosted: Sat Nov 18, 2006 1:11 am    Post subject: Reply with quote

Here's a DFSORT/ICETOOL job that will set RC=12 if the input file has more than 10 records, or RC=0 otherwise.

Code:

//S1   EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file
//TOOLIN DD *
* Set RC=12 if > 10 records, else RC=0
COUNT FROM(IN) HIGHER(10)
/*


For more information, see the "Set RC=12 or RC=4 if file is empty, has more than n records, etc " Smart DFSORT Trick at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rahul_kolhe
Member


Joined: 08 Nov 2006
Posts: 12

PostPosted: Sat Nov 18, 2006 2:14 am    Post subject: Reply with quote

thank you.

Have a good weekend!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> JCL 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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts EZtrv+ - Is there a way to suppress ez-code from printing... 4 seagreg 3644 Wed Feb 04, 2009 10:47 am
md_shamsu View latest post
No new posts thanks 0 chintu 1933 Wed Oct 24, 2007 7:06 pm
chintu View latest post
No new posts Reg DFSORT utility. 3 ursvmg 10009 Wed Jan 17, 2007 3:17 am
Frank Yaeger View latest post
No new posts test datase empty 7 nick.mamone 5065 Wed Nov 22, 2006 6:42 pm
justaprogrammer View latest post
No new posts Xpeditor use in batch process 2 nanda_cse 7216 Sun Oct 08, 2006 6:57 pm
nanda_cse View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB