1) How to Create the records into equal parts i.e 5000 records in File A, Next 5000 records in File B,...Last 5000 records in File E. Behalf of creating the multiple records(For Example : 25000) in single file,
2) I need to schedule the jobs Manually(Not using ZEKE Scheduler) i.e First File A will be sending 5000 records to Message Queue. then Second File B should start sending next set of 5000 records to Message Queue only when File A return code = 00, Third File C should start sending next set of 5000 records to message queue only when File B return code = 00, Fourth File D should start sending next set of 5000 records to message queue only when File C return code = 00, Finally File E will start sending the 5000 records to message Queue only when File D return code = 00.
_________________
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
Hello,
To do what you want, have each "job" submit the next job thru the internal reader (there are many topics in the forum about using the internal reader).
I don't know how a file sets a condition code. . . If you explain, someone may have a suggestion.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
viveksurya wrote:
1) Using SORT, here is the code which will divide the input file into 5 output each having 5000 records
Surely if you use the same value for ENDREC= then each of the files will contain exactly the same records, the first 5000, rather than the full 25000 records being equally split.
pushparaj v
This can be done using a sort product and has already been asked very frequently, so you should be able to search the forum to find some really good examples on how to do this.
This is a link to the DFSORT smart tricks documentation which has an example of how to achieve your goal.
Please click HERE to access it.
However, 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 should be posted in the JCL forum. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in you site.