IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Override PARTNUM in JCL and reuse same SQL in 100 jobs


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandramouliravi

New User


Joined: 27 Apr 2009
Posts: 26
Location: addison

PostPosted: Wed Aug 05, 2009 3:19 pm
Reply with quote

Hi,

I need to run 100 jobs loading 100 different partitions of same table.
So can i create generic SQL like this.
I want to override PARTNUM in JCL and reuse same SQL in 100 jobs.
I do not know how to override PARTNUM from JCL step.
Could you please help me.

LOAD CNTLCARD
--------------------

Load .....
............
...............
in to EMPLOYEE
PART &PARTNUM.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Aug 05, 2009 4:02 pm
Reply with quote

Ravi,

You have said, your idea, i like to know what you have done so far like, the example you have given looks like a load card. So, iam assuming its a load card.

Are you asking like instead of 100 jobs, can i do it with one load card specifying 100 partitions. If that so,

Find the DB2 Utility Reference Guide Manual
a) GooGle
b) IBM MANUALS from the top second link (quick one)

Search for "Loading Partitions".

I think what you need is exactly there.

Quote:
I need to run 100 jobs loading 100 different partitions of same table

I did'nt understand this. Are you having 100 jobs with only one step, which loads only 1 partition.

Specifying all partition together in 1 load card will introduce parallelism, but for 100 partitions, hmmm. Depends on resources available in your environment.

Wait for experts to answer.
For Quick Answer, ask your DBA. Start with WHY ?

Thank You,
Sushanth
Back to top
View user's profile Send private message
chandramouliravi

New User


Joined: 27 Apr 2009
Posts: 26
Location: addison

PostPosted: Wed Aug 05, 2009 5:00 pm
Reply with quote

Hi Sushanth,

I have to create 100 jobs loading seperate partitions each.
This is confirmed. I want to code single Load card for all 100 jobs like
as i have shown above.

I have started with 1st job. In the JCL, I am giving SET PARTNUM='01' and ran the load job. But step does not replace &PARTNUM. in Load card with the value '01'.

So i am wondering what is the right way to code &PARTNUM. in the LOAD card and how can we override in JCL.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Aug 05, 2009 6:54 pm
Reply with quote

Ravi,
Can you show us your JCL & Load cards.
Code:
     Please use the code tag.


Sushanth
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 05, 2009 7:06 pm
Reply with quote

I think that the question is how can the partition id be updated automatically using a symbolic.

Unfortunately the JES interpreter does not resolve variables in control statements, so I think that the OP will need something like a REXX using ISPF file tailoring to build the control statements.
Back to top
View user's profile Send private message
chandramouliravi

New User


Joined: 27 Apr 2009
Posts: 26
Location: addison

PostPosted: Wed Aug 05, 2009 10:31 pm
Reply with quote

Hi Expat,

You got me right. I will use REXX now as symbolic replacement is not working.

Thanks to all for your reply.

Thanks,
Chandramouli
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
Search our Forums:

Back to Top