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

Split bigger file in 2GB sizes


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

New User


Joined: 18 Aug 2008
Posts: 98
Location: India

PostPosted: Tue Mar 16, 2010 1:50 pm
Reply with quote

Hi
I want to split a bigger file in 2 GB files . Say if the file size is 16GB, I want to split it in 8 files. The size of the bigger file will vary. it can be 3 GB or it may extend to 30GB as well. How I can achieve this.
Regards
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Mar 16, 2010 2:09 pm
Reply with quote

Hi,
Frank\Kolusu Will be able assist you better but to get yourself started there are few similar topics already discussed you can check on those
www.ibmmainframes.com/viewtopic.php?t=31904&highlight=split+file+size
www.ibmmainframes.com/viewtopic.php?t=33204&highlight=split+file+size
www.ibmmainframes.com/viewtopic.php?t=38468&highlight=split+file+size
www.ibmmainframes.com/viewtopic.php?t=41768&highlight=split+file+size
ibmmainframes.com/viewtopic.php?t=35814&highlight=split+dynamically
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 Mar 16, 2010 11:04 pm
Reply with quote

tomehta,

What is the RECFM and LRECL of the input file?

Can you hardcode the maximum number of output DD statements, or do you need to generate the correct number of DD statements dynamically?

How many records do you want in each output file?
Back to top
View user's profile Send private message
tomehta

New User


Joined: 18 Aug 2008
Posts: 98
Location: India

PostPosted: Thu Mar 18, 2010 5:24 pm
Reply with quote

Hi Frank,
Q:
Quote:
What is the RECFM and LRECL of the input file?

Ans :
Code:
LRECL=32000,RECFM=VB

Q
Quote:
: Can you hardcode the maximum number of output DD statements, or do you need to generate the correct number of DD statements dynamically?

Ans : I will prefer it to be dynamic however hardcoded ia also ok. Kinda nice to have icon_smile.gif
Q :
Quote:
How many records do you want in each output file?

Ans : No such criteria, only constraint is of 2 GB. As I have to transfer these file using a in house bulit protocol.

Hope I am able to answer your questions.

Thanks
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: Thu Mar 18, 2010 10:29 pm
Reply with quote

Since your input file is VB, I assume that means different records can have different lengths. So it sounds like you want to write a set of records whose lengths adds up to 2GB to an output file, then write the next set of records whose lengths adds up to 2GB to another output file, etc.

DFSORT does NOT have any built-in functions to do this kind of thing.
I'd suggest you write a program or exit with the appropriate logic.
Back to top
View user's profile Send private message
tomehta

New User


Joined: 18 Aug 2008
Posts: 98
Location: India

PostPosted: Fri Mar 19, 2010 8:21 pm
Reply with quote

Hi Frank,
Say I keep it FB , in that case can we do it thru DFSORT ?

Appreciate your help.

thanks
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: Fri Mar 19, 2010 11:01 pm
Reply with quote

Quote:
Say I keep it FB , in that case can we do it thru DFSORT ?


Yes, in that case you can determine how many records you need for the 2GB filesize as n=2GB/LRECL. Then you can use DFSORT's SPLIT1R=n option on OUTFIL to split the file into multiple output data sets each with that number of records, e.g.

Code:

    OUTFIL SPLIT1R=64000,
      FNAMES=(OUT01,OUT02,OUT03,...)
Back to top
View user's profile Send private message
Deepa.m

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Fri Aug 20, 2010 11:22 pm
Reply with quote

All,

Mine is similar requirement and at the end i want to create a control file with the filename and record count

aaa.bbb.file1 00064000
aaa.bbb.file2 00064000
aaa.bbb.file3 00000340
aaa.bbb.file4 00000000
aaa.bbb.file5 00000000

Say i create 12 static files always.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Mon Aug 23, 2010 10:06 pm
Reply with quote

Deepa.m wrote:
All,

Mine is similar requirement and at the end i want to create a control file with the filename and record count


Deepa ,

you canNOT have a DSN qualifier with numeric. ie.

aaa.bbb.file1.00064000 is not valid. You can have aaa.bbb.file1 C064000

Remember that the max length of a DSN qualifier is 8 bytes, and the first should be alphabetic which will leave you with 7 bytes for getting the count.

So suggest that you look into alternative ways of specifying the counts.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 24, 2010 12:03 am
Reply with quote

Hello,

I believe the file names and counts are to be placed in one output file as the content of that file. . .

Possibly, i misunderstand.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 24, 2010 12:21 am
Reply with quote

And the next request will be how to use that file for something.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top