Before/after stage routines

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Before/after stage routines

Post by admin »

Dear all

Before/after stage routines provide a single parameter for use at execution time. What hints or tricks do people use where its appropriate or necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you must
not disclose, copy or take any action in reliance of this transmission.

Although this message and its contents have been scanned for viruses and no
viruses were detected, no responsibility whatsoever is accepted by the
Company, or any of its offices or companies for any loss or damage
arising in any way from receipt or use thereof.

If you have received this email in error please delete this message and notify the Polk System Administrator at postmaster@polkglobal.com.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

I havent used this much, but one thing I can think of, is to move the control from the job to the before / after job routine shell script.

If you have more than one thing to do, put it in the shell script, so that you still run one shell script as a before / after job routine, but the script then goes and executes more than one command.

Dirk

-----Original Message-----
From: Ricketts, James [mailto:JAMES.RICKETTS@POLK.CO.UK]
Sent: Wednesday, October 17, 2001 9:38 AM
To: datastage-users@oliver.com
Subject: Before/after stage routines


Dear all

Before/after stage routines provide a single parameter for use at execution time. What hints or tricks do people use where its appropriate or necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission.

Although this message and its contents have been scanned for viruses and no viruses were detected, no responsibility whatsoever is accepted by the Company, or any of its offices or companies for any loss or damage arising in any way from receipt or use thereof.

If you have received this email in error please delete this message and notify the Polk System Administrator at postmaster@polkglobal.com.



==========================================================
This message contains information intended for the perusal, and/or use (if so stated), by the stated addressee(s) only. The information is confidential and privileged. If you are not an intended recipient, do not peruse, use, disseminate, distribute, copy or in any manner rely upon the information contained in this message (directly or indirectly). The sender and/or the entity represented by the sender shall not be held accountable in the event that this prohibition is disregarded. If you receive this message in error, notify the sender immediately by e-mail, fax or telephone representations contained in this message, whether express or implied, are those of the sender only, unless that sender expressly states them to be the views or representations of an entity or person, who shall be named by the sender and who the sender shall state to represent. No liability shall otherwise attach to any other entity or person. ==========================================================
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi,

Define all required parameters as job parameters and use it with #parameter# in befer/after stage/job routines. It should work.

Rgds
Saravanan




"Ricketts, James"
cc:
Subject: Before/after stage routines
17-Oct-2001 03:37
Please respond to
datastage-users

Sender Info:
No Sender Info
found in the
address Book






Dear all

Before/after stage routines provide a single parameter for use at execution time. What hints or tricks do people use where its appropriate or necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission.

Although this message and its contents have been scanned for viruses and no

viruses were detected, no responsibility whatsoever is accepted by the Company, or any of its offices or companies for any loss or damage arising in any way from receipt or use thereof.

If you have received this email in error please delete this message and notify the Polk System Administrator at postmaster@polkglobal.com.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi James,

What do you think about concatenate the different parameters that you have to use and parse it in the Before/after stage routines?

Best RGDS to everyone

Giovanni Boccia
Sales Engineer
Direzione Industria e Servizi
Datamat - Enabling Your Future
----- Original Message -----
From: "Ricketts, James"
To:
Sent: Wednesday, October 17, 2001 9:37 AM
Subject: Before/after stage routines


> Dear all
>
> Before/after stage routines provide a single parameter for use at
> execution time. What hints or tricks do people use where its
> appropriate
or
> necessary to provide multiple parameters?
>
> Cheers
> James
>
>
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you are not the intended addressee, you must not
> disclose, copy or take any action in reliance of this transmission.
>
> Although this message and its contents have been scanned for viruses
> and
no
> viruses were detected, no responsibility whatsoever is accepted by the
> Company, or any of its offices or companies for any loss or damage
> arising in any way from receipt or use thereof.
>
> If you have received this email in error please delete this message
> and notify the Polk System Administrator at postmaster@polkglobal.com.
>
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Right idea, but...

The #parameter# construct will only work if it is directly referenced in the call of the routine, which doesnt get you around the one parameter limit.

You could still use the idea of a job parameter, but inside the routine, call DSGetJobInfo to check if the required job parameter exists and then DSGetParamInfo to get the parameter value.

In the case of a before job routine, alternatively, you can put whatever code you like directly into the job control and this will execute before the stages in the job.


Then of course, as someone else suggested, you can concatenate with a separator like @VM (or anything else you like) and then decompose the string in the routine.

Food for thought.

-----Original Message-----
From: Saravanan_Thirugnanam@singaporeair.com.sg
[mailto:Saravanan_Thirugnanam@singaporeair.com.sg]
Sent: Wednesday, 17 October 2001 6:04 PM
To: datastage-users@oliver.com
Subject: Re: Before/after stage routines


Hi,

Define all required parameters as job parameters and use it with #parameter# in befer/after stage/job routines. It should work.

Rgds
Saravanan




"Ricketts, James"
cc:
Subject: Before/after stage
routines
17-Oct-2001 03:37
Please respond to
datastage-users

Sender Info:
No Sender Info
found in the
address Book






Dear all

Before/after stage routines provide a single parameter for use at execution time. What hints or tricks do people use where its appropriate or necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission.

Although this message and its contents have been scanned for viruses and no

viruses were detected, no responsibility whatsoever is accepted by the Company, or any of its offices or companies for any loss or damage arising in any way from receipt or use thereof.

If you have received this email in error please delete this message and notify the Polk System Administrator at postmaster@polkglobal.com.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Hi,

Im not using Datastage for the moment so I cannot test,
but if I remember right it should be possible to define a
function and therethrough send multiple variables to a
routine. The command is something like "deffun"...

I cannot remember but You could search in the help, there
should be something, or maybe this rings a bell for someone
else?

Hope this helps, sorry not to be more exact.

Regards,
Per


---------------------------------------------------------
Right idea, but...

The #parameter# construct will only work if it is directly
referenced in the
call of the routine, which doesnt get you around the one
parameter limit.

You could still use the idea of a job parameter, but inside
the routine,
call DSGetJobInfo to check if the required job parameter
exists and then
DSGetParamInfo to get the parameter value.

In the case of a before job routine, alternatively, you can
put whatever
code you like directly into the job control and this will
execute before the
stages in the job.


Then of course, as someone else suggested, you can
concatenate with a
separator like @VM (or anything else you like) and then
decompose the string
in the routine.

Food for thought.

-----Original Message-----
From: Saravanan_Thirugnanam@singaporeair.com.sg
[mailto:Saravanan_Thirugnanam@singaporeair.com.sg]
Sent: Wednesday, 17 October 2001 6:04 PM
To: datastage-users@oliver.com
Subject: Re: Before/after stage routines


Hi,

Define all required parameters as job parameters and use it
with
#parameter# in befer/after stage/job routines. It should
work.

Rgds
Saravanan




"Ricketts, James"
cc:
Subject:
Before/after stage
routines
17-Oct-2001 03:37
Please respond to
datastage-users

Sender Info:
No Sender Info
found in the
address Book






Dear all

Before/after stage routines provide a single parameter for
use at
execution time. What hints or tricks do people use where
its appropriate
or
necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are
confidential and
intended solely for the use of the individual or entity to
whom they
are addressed. If you are not the intended addressee, you
must
not disclose, copy or take any action in reliance of this
transmission.

Although this message and its contents have been scanned for
viruses and no

viruses were detected, no responsibility whatsoever is
accepted by the
Company, or any of its offices or companies for any loss or
damage
arising in any way from receipt or use thereof.

If you have received this email in error please delete this
message and
notify the Polk System Administrator at
postmaster@polkglobal.com.







-----------------------------------------------
Right idea, but...

The #parameter# construct will only work if it is directly
referenced in the
call of the routine, which doesnt get you around the one
parameter limit.

You could still use the idea of a job parameter, but inside
the routine,
call DSGetJobInfo to check if the required job parameter
exists and then
DSGetParamInfo to get the parameter value.

In the case of a before job routine, alternatively, you can
put whatever
code you like directly into the job control and this will
execute before the
stages in the job.


Then of course, as someone else suggested, you can
concatenate with a
separator like @VM (or anything else you like) and then
decompose the string
in the routine.

Food for thought.

-----Original Message-----
From: Saravanan_Thirugnanam@singaporeair.com.sg
[mailto:Saravanan_Thirugnanam@singaporeair.com.sg]
Sent: Wednesday, 17 October 2001 6:04 PM
To: datastage-users@oliver.com
Subject: Re: Before/after stage routines


Hi,

Define all required parameters as job parameters and use it
with
#parameter# in befer/after stage/job routines. It should
work.

Rgds
Saravanan




"Ricketts, James"
cc:
Subject:
Before/after stage
routines
17-Oct-2001 03:37
Please respond to
datastage-users

Sender Info:
No Sender Info
found in the
address Book






Dear all

Before/after stage routines provide a single parameter for
use at
execution time. What hints or tricks do people use where
its appropriate
or
necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are
confidential and
intended solely for the use of the individual or entity to
whom they
are addressed. If you are not the intended addressee, you
must
not disclose, copy or take any action in reliance of this
transmission.

Although this message and its contents have been scanned for
viruses and no

viruses were detected, no responsibility whatsoever is
accepted by the
Company, or any of its offices or companies for any loss or
damage
arising in any way from receipt or use thereof.

If you have received this email in error please delete this
message and
notify the Polk System Administrator at
postmaster@polkglobal.com.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

That single parameter is a string.
It can contain any value you please.
Including delimited values that the routine itself can parse.

-----Original Message-----
From: Ricketts, James [mailto:JAMES.RICKETTS@POLK.CO.UK]
Sent: Wednesday, 17 October 2001 17:38
To: datastage-users@oliver.com
Subject: Before/after stage routines


Dear all

Before/after stage routines provide a single parameter for use at execution time. What hints or tricks do people use where its appropriate or necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission.

Although this message and its contents have been scanned for viruses and no viruses were detected, no responsibility whatsoever is accepted by the Company, or any of its offices or companies for any loss or damage arising in any way from receipt or use thereof.

If you have received this email in error please delete this message and notify the Polk System Administrator at postmaster@polkglobal.com.
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

I wonder if the routine calls could be changed to accept n parameters like transformations can or whether this a constraint on the underlying mechanism.

Regarding the insert/update update/insert, where possible you should split the inserts and updates into different links.

Phil


-----Original Message-----
From: David Barham [mailto:david@barham.hm]
Sent: Wednesday, October 17, 2001 11:17 PM
To: datastage-users@oliver.com
Subject: RE: Before/after stage routines


Right idea, but...

The #parameter# construct will only work if it is directly referenced in the call of the routine, which doesnt get you around the one parameter limit.

You could still use the idea of a job parameter, but inside the routine, call DSGetJobInfo to check if the required job parameter exists and then DSGetParamInfo to get the parameter value.

In the case of a before job routine, alternatively, you can put whatever code you like directly into the job control and this will execute before the stages in the job.


Then of course, as someone else suggested, you can concatenate with a separator like @VM (or anything else you like) and then decompose the string in the routine.

Food for thought.

-----Original Message-----
From: Saravanan_Thirugnanam@singaporeair.com.sg
[mailto:Saravanan_Thirugnanam@singaporeair.com.sg]
Sent: Wednesday, 17 October 2001 6:04 PM
To: datastage-users@oliver.com
Subject: Re: Before/after stage routines


Hi,

Define all required parameters as job parameters and use it with #parameter# in befer/after stage/job routines. It should work.

Rgds
Saravanan




"Ricketts, James"
cc:
Subject: Before/after stage
routines
17-Oct-2001 03:37
Please respond to
datastage-users

Sender Info:
No Sender Info
found in the
address Book






Dear all

Before/after stage routines provide a single parameter for use at execution time. What hints or tricks do people use where its appropriate or necessary to provide multiple parameters?

Cheers
James



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this transmission.

Although this message and its contents have been scanned for viruses and no

viruses were detected, no responsibility whatsoever is accepted by the Company, or any of its offices or companies for any loss or damage arising in any way from receipt or use thereof.

If you have received this email in error please delete this message and notify the Polk System Administrator at postmaster@polkglobal.com.
Locked