Icetool example for splitting a file into many conditionally



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Icetool example for splitting a file into many conditionally

Postby smitamixa » Fri Feb 20, 2015 9:09 pm

I have one file. The records of that file needs to be separated into multiple files [more than 80] depending on the 1st four character of that record. Could icetool be used and what would be the syntax. Can some one give me the JCL.

Regards,
Smita Pattnaik
smitamixa
 
Posts: 3
Joined: Fri Feb 20, 2015 9:03 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Icetool example for splitting a file into many conditionally

 

Re: Icetool example for splitting a file into many condition

Postby BillyBoyo » Fri Feb 20, 2015 9:58 pm

You can use an ordinary SORT COPY operation, with "more than 80" OUTFIL statements using INCLUDE= or OMIT= for record select. Have one OUTFIL with SAVE to collect any records which don't live somewhere in the selection.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Icetool example for splitting a file into many condition

Postby smitamixa » Fri Feb 20, 2015 10:07 pm

Thanks Billy for the quick response. Is there any limit on number of files that can be generated using sort? How is icetool advantageous than sort?
smitamixa
 
Posts: 3
Joined: Fri Feb 20, 2015 9:03 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Icetool example for splitting a file into many condition

Postby BillyBoyo » Fri Feb 20, 2015 10:57 pm

There's a limit, but it is the number of DDnames, which relates to the TIOT size for your system. If it is 32K, 1,600+ shouldn't be a problem for something simple, although there are some limits about the amount of code you have.

ICETOOL does lots of useful stuff, mostly by telling DFSORT to do part of it. A lot of "complicated" things can be done in straight DFSORT. ICETOOL has a number of useful operators to do things which would be obtuse in SORT itself (RESIZE, for instance).

ICETOOL operators can also be combined in one set of control cards, so you can do multiple operations in one step to produce a combined result.

If you wanted to copy 86 files to 86 other files, that could be done in one ICETOOL step. You want to split a single file into 80+, which SORT is going to do for you without needing to wrap ICETOOL around it.

Have a look at the DFSORT Getting Started guide.

These users thanked the author BillyBoyo for the post:
smitamixa (Fri Feb 20, 2015 11:00 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Icetool example for splitting a file into many condition

Postby smitamixa » Fri Feb 20, 2015 11:01 pm

Billy,

Is there any advantage of using icetool over sort for simple splitting like this one?
smitamixa
 
Posts: 3
Joined: Fri Feb 20, 2015 9:03 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Icetool example for splitting a file into many condition

Postby BillyBoyo » Fri Feb 20, 2015 11:15 pm

No. You'd specify an ICETOOL COPY with a USING(xxxx) and have an xxxxCNTL DDname, and that would contain everything you had in a a SORT step, so no advantage at all. Because you're splitting the file on conditions, and ICETOOL doesn't do that (because SORT does it). ICETOOL complements SORT by enabling the combination of standard operations to produce a result in a single step, and by offering functionality which would be a real pain to do in SORT.

Plain DFSORT can do many, many things.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post