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.
Joined: 14 Mar 2007 Posts: 8593 Location: Back in jolly old England
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.
Joined: 26 Apr 2004 Posts: 4650 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.