View previous topic :: View next topic
|
Author |
Message |
Kumaresan.nk
New User
Joined: 22 Mar 2010 Posts: 31 Location: Chennai
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|