Job Template

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
zam62
Participant
Posts: 42
Joined: Tue Apr 29, 2003 12:21 pm

Job Template

Post by zam62 »

IS there an easy way to create a job template so when I create a new server job I can have a few default parameters and pre/post job activities?


David Abbey
dabbey@gfs.com
"...Rise Above..."
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure - just create one. [:D]

Seriously, we have a 'BlankJob' with all of the default parameters and activities attached. The job gets opened and then 'Saved As' a new name immediately to prevent spoilage, and work continues from there. If I was really worried about it, I suppose I could make the 'templace' read-only.

[?] I don't recall - if I open a read-only job and then save it under a new name, is the new job read-only as well?

-craig
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, if the template is read-only, the copy of it is also read-only (DS 5.1 and later, anyway). [V]
I manage this by having read-only templates, and an administrator-only utility (written in DataStage BASIC) to toggle the read-only state of the copy. The administrator performs the check-out part of source code control!

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

You can also easily create a new job with parameters
of your choosing via Parameter Manager
(PM). You can download PM at http://www.tools4datastage.com/downloads.asp.
Also you can view a tutorial on PM that has a section
specifically dedicated to creating new jobs via PM (that
specific section is entitled "Adding Parameters
to a New DataStage Job") at http://www.datastagexchange.com/PM/PMTutorial.htm.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

David

I have BASIC code which will copy all the parameters from one job to another. Let me know if you want it.

Thanks Kim.


Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com
MAT
Participant
Posts: 65
Joined: Wed Mar 05, 2003 8:44 am
Location: Montréal, Canada

Post by MAT »

Hi all,

I have a question for Ray regarding the post he made earlier about read-only jobs.
We want to ship the projects we are developping to our clients and tester in read-only mode. The easiest way to do that would be with the use of Version Control but the managers do not want us to use anything else than what already exists for version tracking. So I am wondering if you could tell me a little more about where you can toggle the read-only mode of jobs.

Thanks

MAT
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Every design-time object record in the Repository has a (publicly documented) column called READONLY. This may contain "NRO" (= not read only!) or some other value. Any value other than "NRO" means that the object is read only.
To toggle an object from a read-only state to an editable stage involves setting this column's value to "NRO" for the applicable records.
It's this last bit that's tricky; identifying the correct records! [;)] That's a longer answer than I have time for right now. You'd typically create a Job or Routine to do it.
Can I make the point, though, that Version Control fits within the category "what already exists for version tracking"? It's right there on the DataStage CD.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps Ray will smack me down for this, [:I] but this is the procedure I was given by Ascential Support to change the Read Only status of a job. Don't try this at home, boys and girls. And BTW, you need to know the *number* of the job you want to change the status of, not just the name - you can get that info from DS_JOBS. Assuming your job is *not* in a read-only status...

From the Universe Shell (uvsh):
* LOGTO the project you need to work in, if necessary.
* ED DS_JOBOBJECTS J#jobno#ROOT (substitute in your job number, leave in the back-slashes)
* You should see "116 lines long" and be at a prompt.
* Press ENTER.
* You should see 0001: NRO and be back at a prompt.
* Type "R RO" without the quotes to do the string replacement.
* Type "FI" to write the changes out to the 'file'.
* Type "Q" to quit.

Reverse the replacement ("R NRO") to remove the read-only status. Be careful with stuff like this! [}:)] If something doesn't come up as expected, just "Q" on out of there and maybe try starting over.

-craig
Post Reply