View previous topic :: View next topic
|
Author |
Message |
shanudarling Warnings : 1 New User
Joined: 20 Dec 2006 Posts: 55 Location: noida
|
|
|
|
My requirement is that I have a cursor which fetches approximately 20 Lakh records. I have to split the no. of records fetched by the cursor into 4 and write them to 4 separate files i.e. 4 files containing 5 lakh records each. This needs to be done using a JCL.
Can anyone help me with this? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
can't do CURSORs with a batch job ('a JCL' is improper terminology)
1. you need four SELECTs.
you could order the SELECT
and provide WHERE clauses in each to 'split' the returned rows'.
2. use one SELECT
and follow the unload step with a DFSORT/SYNCSORT that splits the output of the unload. |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
Hi Shanu,
Is there any condition based on which you want to "split" ???
Can you tell? |
|
Back to top |
|
|
|