Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Split bigger file in 2GB sizes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Split bigger file in 2GB sizes
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    Post subject:
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
http://www.ibmmainframes.com/viewtopic.php?t=31904&highlight=split+file+size
http://www.ibmmainframes.com/viewtopic.php?t=33204&highlight=split+file+size
http://www.ibmmainframes.com/viewtopic.php?t=38468&highlight=split+file+size
http://www.ibmmainframes.com/viewtopic.php?t=41768&highlight=split+file+size
http://ibmmainframes.com/viewtopic.php?t=35814&highlight=split+dynamically
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 Mar 16, 2010 11:04 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Mar 18, 2010 10:29 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Mar 19, 2010 11:01 pm    Post subject:
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
Warnings : 1

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Fri Aug 20, 2010 11:22 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Aug 24, 2010 12:03 am    Post subject:
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    Post subject:
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    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 SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us