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

Mainframe flat file splitting if maximum size limit reached


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Wed Jan 23, 2013 8:49 pm
Reply with quote

I have a file say 'MF.ABC'. If it reaches size of say 500 MB then we need to split this file into two files to avoid SIZE issue during FTP.

We are trying to FTP MF.ABC file but maximum allowable size is 500 MB, if it exceeds then FTP get failed. Due to which we need to split this file if above SIZE limit reaches.

Please let me know if any other details required.

Thanks,
Yogeshwar (Yogi)
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 23, 2013 8:55 pm
Reply with quote

I don't personally know of anyway to directly check if a file exceeds a particular number of bytes. I'd suggest checking for a maximum record count.
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: Wed Jan 23, 2013 9:11 pm
Reply with quote

Which SORT product do you use? What is the RECFM and LRECL? What processing do you already have of the file so that something new doesn't cost "extra" resources?
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu Jan 24, 2013 6:30 pm
Reply with quote

Bill,

We are using SYNCSORT product. RECFM is FB and LRECL is 1000 for this file.
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: Thu Jan 24, 2013 6:52 pm
Reply with quote

So, consult your documentation for SPLIT, SPLIT1R and SPLITBY (if they all exist for Syncsort).

500mb of 1000-byte records is a certain number. You have various options to arrange for multiple files which could be transferred separately.

I'd arrange for headers (logical name, logical number, business/data date) and trailers (count on file) at a minimum, so that the receiver knows that files are logically the same data. Stuff like that.
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu Jan 24, 2013 6:58 pm
Reply with quote

You mean to say get record count for 500 MB (since its 1000 byte LRECL) and once we got record count go ahead with SORT using SPLIT option to split, right?
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: Thu Jan 24, 2013 7:59 pm
Reply with quote

Yep. You have a limit in MB for the transfer (site specific). It is "easy" to calculate a number of records which would keep you within the limit. If there are "groups" of records which need to be kept together, that is not a problem as we've already answered a couple of those recently.

So, yes, but I'm also saying do it properly, with "controls" around it, so that if there is a mess-up on the receiving system, you are covered because you've provided controls over the data.
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu Feb 07, 2013 6:34 pm
Reply with quote

My apology for delay in reply.

This file is not having any Header and Trailer and also we didn't need to group any specific records.

I guess now I need to first find how many records in 500 MB for 1000 LRECL file of FB type. If any pointers over how to calculate record in 500 MB will be helpful.

Secondly, I need to split file based on number of records. Say if there are 1 Million record for 500 MB file size. So for very 1 million record there will be new file to be created. If we are getting total 9 million record in file, then this file need to be splitted into 9 difdifferent files having 1 million records each.
The records in this file may vary and some time come to say 9 million and some time 20 million and we need to split this file accordingly, is there anyway we can achieve this one whether thru JCL/SORT or COBOL?

Please let me know if I missed something and requirement is not clear.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Feb 07, 2013 6:44 pm
Reply with quote

If you do not know how to calculate the number of records, then you belong in Beginner's and Students Forum no matter how much "experience" you have.

For a disk file on a 3390 device, half-track blocking means 27 1,000-byte records will fit in each block. This means 54 records per track and 810 records per cylinder. If you can figure out how many 1,000-byte records will occur in 500 MB, you can finish the computations yourself.

If using tape, the numbers are different but the calculation is the same (although, obviously, tracks and cylinders are not part of the calculation).
Back to top
View user's profile Send private message
yogeshwar_ade

Active User


Joined: 31 Aug 2006
Posts: 103
Location: INDIA

PostPosted: Thu Feb 07, 2013 7:18 pm
Reply with quote

My miss Rob, I missed the basic rule and posted the query in hurry.
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: Thu Feb 07, 2013 7:28 pm
Reply with quote

500mb = 500,000,000 (approx). LRECL 1000. Equals 500,000 records.

You specify multiple OUTFIL datasets (at least 40 is you might have 20 million records, but I'd allow for "growth" as well, if there can be any).

You'd need to know how many files were output, remove the rest, and process those with data.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top