Migrate server routines to parallel

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Migrate server routines to parallel

Post by kumarjit »

Hi there.

I am undertaking a project assignment to convert a set of Server Routines into parallel ones, but I have never worked on routines before, and I am totally unaware of the server routine constructs.

The logic of one of the server routines that I need to replicate is given below.
This routine will run a job(I am interpreting this a executing the DSJOB command) that reads records from a source file and loads it into a target table.

I am not able to find an tutorial/IBM documentation in this regard.
Its an earnest request to all to give me a lead/share any online resource to get things rolling at least. :)

Warm Regards,
Kumarjit,
Pain is the best teacher, but very few attend his class..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why? The places where those server routines are used really don't support parallel versions. :? And there is no "given below", wondering if you meant to post the BASIC code.

What kind of help are you looking for, the BASIC reference? If so, there is this online reference and as it mentions you also have (or can get) the InfoSphere DataStage BASIC Reference Guide pdf.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumarjit
Participant
Posts: 99
Joined: Fri Oct 12, 2012 7:47 am
Location: Kolkata

Post by kumarjit »

@Craig: The answer for "Why" would be a decision by the client and my company, I am only a way to implement it.
As far as providing a sample logic goes, I cannot paste the actual server routine code here in this forum, hence I quoted it as a "logic" of the code piece rather than code itself.
Furthermore, I'm neither knowledgeable of the BASIC programming constructs for server routines, nor do I know how to write a Parallel routine which can be called from within a parallel transformer and can perform functions such as validating the existence of a file in a file path, or running a Datastage job, or retrieving the details of the last run of a job .

My question was: I need guidance to try if this kind of server to parallel migration of routines is possible. If so, is there any specific documentation that can help me analyze the existing server routines and re write it as a parallel one.

Regards,
Kumarjit.
Pain is the best teacher, but very few attend his class..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Wow, that sucks for you to draw the short straw for the task, this is especially tough for someone with no knowledge of neither the 'before' nor the 'after' product. Never mind that this is (in my humble opinion) a complete waste of time and resources. Moving on...

To again attempt to answer your question, at its most simple: no, there isn't any kind of specific "routine migration" document that I've even seen or heard of. I've provided what exists for the BASIC side and there is all kinds of documentation on what is needed to create PX routines in C++ and call them from the parallel framework. Search here and online at the official IBM sites are your friend for that.

In your shoes I'd be involving your official support provider and be asking them, see if they've helped people do this in the past and have any such documentation they would be willing to share.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From the "How do I create a C++ routine and call it from DataStage?" department, this should be a good starting point. It's for 8.5 but I don't believe the specifics have changed, if you dig around there you should be able to find the 11.x version of this documentation.

General question to the home audience - has this changed at all in the later releases?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No changes to how parallel routines are implemented.

The ONLY guaranteed way to "convert" server routines to parallel routines is to reverse-engineer the logic of the routine into a set of algorithms (a manual process) then write the C++ code to implement those algorithms (another manual task).

You can garner some ideas by looking at the C++ source code that is produced when expressions in a Transformer stage are compiled.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Every example you have given for a routine is a single task / sequential operation. There are no benefits of rewriting them into parallel routines. Sorry, but I think your client needs guidance as to why not to waste time and effort on this. What is it Ray always says... resist stupid requirements!
Choose a job you love, and you will never have to work a day in your life. - Confucius
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

chulett wrote:General question to the home audience - has this changed at all in the later releases?
Nope. Other than changing the supported compiler (which may require that you tweak your makefile), nothing have really changed in this area.

BTW, the 11.5 doc:

http://www.ibm.com/support/knowledgecen ... ml?lang=en

-T.J.
Post Reply