Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Count number of records and set return code.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

PostPosted: Mon Jul 20, 2009 11:29 pm    Post subject: Count number of records and set return code.
Reply with quote

Hi,

Is there a way in sort or iceman through which we can count number fo records in a flat file and based on that set the return code of that step.

For example, in my case I need to count records in a file and then set return code of 16 if the number for records exceeds 100,000.

Please let me know if above is possible.

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

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jul 20, 2009 11:43 pm    Post subject: Reply to: Count number of records and set return code.
Reply with quote

muffirulz,

Check the Smart DFSORT trick "Set RC=12 or RC=4 if file is empty, has more than n records, etc" here

http://www.ibm.com/support/docview.wss?rs=0&uid=isg3T7000094
Back to top
View user's profile Send private message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

PostPosted: Tue Jul 21, 2009 1:07 am    Post subject: Reply to: Count number of records and set return code.
Reply with quote

Hi Skolusu,

The code works fine but it can set only return code of 0 or 12. I need to set it to 16.

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

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jul 21, 2009 2:36 am    Post subject:
Reply with quote

Quote:
I need to set it to 16.


Why? What will RC=16 do that RC=12 won't?
Back to top
View user's profile Send private message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

PostPosted: Wed Jul 22, 2009 9:13 pm    Post subject: Reply to: Count number of records and set return code.
Reply with quote

Thanks Skolusu.

I used the solution from the reference and it worked fine.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us