IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

icetool SUBSET for first 100 record


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Mon May 28, 2012 9:56 pm
Reply with quote

I ran the below ICETOOL statement to copy the first 100 records of a large dataset:
Code:
SUBSET FROM(ICEIN) TO(ICEOUT) - 
INPUT KEEP RRN(1,100)

I assumed it would copy the first 100 records and then quit. Instead ICETOOL read the entire dataset which took a while since it was a large dataset:
Code:
ICE055I 0 INSERT 0, DELETE 62855791         
ICE054I 0 RECORDS - IN: 62855891, OUT: 100 


I could have done a SORT COPY with STOPAFT=100. Does anyone know why ICETOOL read the entire dataset?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon May 28, 2012 11:00 pm
Reply with quote

You told it to. Or rather, you didn't tell it not to. FIRST(100)
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Tue May 29, 2012 1:18 am
Reply with quote

Thanks. The FIRST(100) does what I expected it to do.

When I code the RRN(1,100) then ICETOOL invokes an E15 user exit program. What puzzles me is why this program doesn't do some simple math and determine that once it has sent out 100 records that there is no need to read more records since nothing more will get written.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue May 29, 2012 10:56 pm
Reply with quote

Given the umpteen variations of the different operands which can be mixed and matched, it is NOT just "simple math"! I built in some short cuts for special operands such as FIRST(n), but to build in short cuts for every possible variation was prohibitive. Keep in mind that for a general purpose utility, what non-developers see as "simple" often isn't "simple" for the guy who has to actually develop it, and there are many tradeoffs.

Nothing stops you from using a simple DFSORT job with STOPAFT=n if you understand how that works.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top