Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Splitting dataset and checking for empty dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Tue Nov 11, 2008 3:31 pm    Post subject: Splitting dataset and checking for empty dataset
Reply with quote

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
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Nov 11, 2008 4:02 pm    Post subject: Reply to: Splitting dataset and checking for empty dataset
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Tue Nov 11, 2008 4:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Nov 11, 2008 4:54 pm    Post subject: Reply to: Splitting dataset and checking for empty dataset
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Tue Nov 11, 2008 6:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Wed Nov 12, 2008 11:43 am    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Wed Nov 12, 2008 12:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ssk1711

New User


Joined: 16 Jun 2008
Posts: 40
Location: bangalore

PostPosted: Wed Nov 12, 2008 4:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Nov 12, 2008 5:49 pm    Post subject: Reply to: Splitting dataset and checking for empty dataset
Reply with quote

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
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Mon Jul 06, 2009 4:48 pm    Post subject: Reply to: Splitting dataset and checking for empty dataset
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Jul 06, 2009 5:00 pm    Post subject: Reply to: Splitting dataset and checking for empty dataset
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us