View previous topic :: View next topic
|
Author |
Message |
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Hi
I got a requirement like-
"One of our Job gives an output dataset, which is processed by a Java application. whenever, the number of records in the dataset is less than 10000, the java application will process it successfully. If the number of records in the dataset is more than 10000, then we have to split the output data set into number of dataset each containing less than 10000 records."
Note:- Also we know, the number of records in output file will not exceed 100,000 records.
solution what I thought about is-
"we will split the output dataset in to 10 dataset in the first step and the next step will delete the empty datasets"
Note:- we have SYNCSORT in our shop
Question:- Will this solution is efficient enough or is there any other simple way of meeting this requirement ?
Thanks a lot. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Ssk,
Quote: |
we will split the output dataset in to 10 dataset in the first step and the next step will delete the empty datasets"
|
Is this an one time requirement?
Quote: |
Will this solution is efficient enough or is there any other simple way of meeting this requirement ?
|
This is for sure not the best approach. You will have to dynamically find the no of records and split accordingly. Instead of spliting adn then deleting. |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
I was also thinking that the dynamic approach to splitting the file would be the best to go about this issue. However I am not aware of how to use SYNCSORT to find the number of records and allocate it dynamically.
Would you please guide me to that? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Ssk,
Quote: |
However I am not aware of how to use SYNCSORT to find the number of records and allocate it dynamically.
|
I would go for REXX for this requirement.
For SYNCSORT, wait for ALISSA to respond. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
However I am not aware of how to use SYNCSORT to find the number of records and allocate it dynamically. |
ssk1711,
You might want to see this previous topic. |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Thanks Arun.
I gone thru the link and the JCL. The JCL generates another JCL that will have the split statements (the number of split statements is dynamically generated) in it. This generated JCL needs to be submitted either manually or thru the next step in the first JCL.
But, In our shop, we are not suppose to submit a JCL in production and also, we should not submit a JCL thru another JCL (only the scheduler will submit JCL ) !
So, give this case, how can we split it in a same JOB using SYNCSORT (since we have SYNCSORT in our shop)
Thanks, |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
ssk1711,
For dynamic allocation, you'll have to create the DD statements dynamically. That means at least some part of your jcl will be different every time depending on the input record count.
One possibility I see is to split this into two jobs. In the first job write the DD statements into a pds member as well as the sort card for the second job. "INCLUDE" the member in your second job. Even if it is doable I personally feel it a bit complex and difficult to maintain. So going for REXX might be an easy solution for this. It's upto you to decide. |
|
Back to top |
|
|
ssk1711
New User
Joined: 16 Jun 2008 Posts: 40 Location: bangalore
|
|
|
|
Thanks Arun.
Even, one of my team member gave that idea. But finally we have decided to do it with REXX.
Thanks once again. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Ssk,
Quote: |
But finally we have decided to do it with REXX. |
Great. Do code and post if you find any issues. |
|
Back to top |
|
|
sajjan jindal Warnings : 1 New User
Joined: 09 Sep 2007 Posts: 60 Location: india
|
|
|
|
Senthil,
I suppose you must have posted your solution here, so that anyone else looking for the same problem could have found it helpful.
Are we here to only post the question or to give the solutions as well. I believe it should be Give and take,rather than being just take and take. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Sajjan,
Quote: |
Are we here to only post the question or to give the solutions as well. I believe it should be Give and take,rather than being just take and take. |
Exactly.
But no point as it's been almost 8 months since the last post on this topic. |
|
Back to top |
|
|
|