Split File Dynamically.



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

Split File Dynamically.

Postby Vineet » Thu Jul 03, 2014 6:56 pm

Hi All,

I have a requirement, where I need to split a big file into multiple files. File size is dynamic in nature i.e. Daily file size may vary. For Example On Monday By Running my process I generate a File having size = 5GB, On Tuesday when Running the process generate file having size = 20MB, On Wednesday File size is 8.5 GB. Below is the The only Infoamtion what I am having:

(1) LRECL of the O/P file which is = 100 & RECFM = FB.
(2) 1 GB of Data need to be Copy to each file.

On Monday When I Run Split Process it should create 5 Files, where each file having Data of 1GB. -----> Actual File size is 5GB
On Tuesday when I Run Split Process it should create 1 Files. ----> Actual file Size is 20 MB
On Wednesday When I Run Split Process it should create 9 Files, where 8 files having Data of 1GB * 8 & 1 File having Data of 500 MB. ---> Actual File Size is 8.5 GB.

How I can do this using SORT. If there is a JCL please share.

Thanks
Kind Rgd'sVineet
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: Split File Dynamically.

Postby BillyBoyo » Thu Jul 03, 2014 10:29 pm

You'll need N named OUTFILs, where N is a reasonable maximum, plus one extra which uses SAVE, as a "bucket" in case the unexpected happens.

You'll need a DDNAME for each in the JCL. You'll need to clear up the empty files afterwards.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Split File Dynamically.

Postby Vineet » Fri Jul 04, 2014 12:40 am

Thanks Billy. can you provide sample JCL for same.

Rgd's
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post