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

Splitting File To 'N' Files.


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

New User


Joined: 22 Mar 2010
Posts: 31
Location: Chennai

PostPosted: Wed Jun 23, 2010 2:59 pm
Reply with quote

Hi,

I have a requirement, where we have a file with a large number of data. The input file is of lenth 500. We have to split this file in to different files depending upon the COMPANY CODE (Length 4). But there is no definite number of company codes. That is we can get 4 types of company code one day and the other day there might be 10 types of company codes. The company code might range from 0001 to 9999. I went thru the previous topics of dynamic allocation, but cdn't find anything useful related to my requirement.

Please help me how to get this done.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 23, 2010 3:17 pm
Reply with quote

If you have DFSORT installed, click HERE to get an idea.

Not sure why this was moved from JCL to DFSORT without first establishing the sort product being used.

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
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 Jun 23, 2010 3:20 pm
Reply with quote

You will have to make a pass through the data and determine how many different COMPANY CODE's it contains. You will have to then build a set of matching SORT control parameters and the matching DD statements. These will all have to be used in a subsequent job to actually perform the split.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 23, 2010 3:44 pm
Reply with quote

this question has only been asked and answered about 10 times on this board.

I am as lazy as the TS and will not bother to search.

and using 'dynamic allocation' as keywords in a search for sort
is dumber than mud.

since the TS has not bothered to provide enough info for a 'custom' solution,
he/she should look at DFSORT Tricks
look for Split a file to n output files dynamically.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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
Search our Forums:

Back to Top