regarding routine activity

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

vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

regarding routine activity

Post by vijaykumar »

hi,
my design is jobactivity------>routine activity.
iam calling keymanagement next value function in the routine activity.
In routine activity tab.
name value expression
ARG1 'job1'.

when i go to director, i can view the message, Routine activity started and finished, status=1, executed ok.
if i want to see the o/p data is it possible to view data from sequence.
since i have called the routine , i want to see the sequence numbers generated, is it possible from sequence, is there any way to see the sequence numbers generated.plz help me gurus

cheers;
vijay
y_suresh
Participant
Posts: 12
Joined: Wed Oct 06, 2004 1:16 pm

Re: regarding routine activity

Post by y_suresh »

vijaykumar wrote:hi,
my design is jobactivity------>routine activity.
iam calling keymanagement next value function in the routine activity.
In routine activity tab.
name value expression
ARG1 'job1'.

when i go to director, i can view the message, Routine activity started and finished, status=1, executed ok.
if i want to see the o/p data is it possible to view data from sequence.
since i have called the routine , i want to see the sequence numbers generated, is it possible from sequence, is there any way to see the sequence numbers generated.plz help me gurus

cheers;
vijay

Where are u using the generated values .. you can add this in ur job transformer out put to Flat File and see as view data .
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Re: regarding routine activity

Post by I_Server_Whale »

vijaykumar wrote:hi,
my design is jobactivity------>routine activity.
iam calling keymanagement next value function in the routine activity.
In routine activity tab.
name value expression
ARG1 'job1'.

when i go to director, i can view the message, Routine activity started and finished, status=1, executed ok.
if i want to see the o/p data is it possible to view data from sequence.
since i have called the routine , i want to see the sequence numbers generated, is it possible from sequence, is there any way to see the sequence numbers generated.plz help me gurus

cheers;
vijay
I guess some things are just incorrigible. :wink:

No, you cannot view data in a "job sequence".
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Inside the routine you can use DSLogEvent() function to spit out the value of KeyMgtGetNextValue() to the job sequence's log.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Re: regarding routine activity

Post by narasimha »

I_Server_Whale wrote:I guess some things are just incorrigible. :wink:
I guess Whale is referring to this postwhere he took the pain to format your post.

Please format your posts properly and use proper case.
Make it more readable!
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

hi Gurus,

thanks very much, i got a reply that we can attach the o/p of routine activity to transformer and get connected to sequential file or flat file.
but here when used
file--->open--->new sequencer job, i can't find transformer or flat file stages, how can i connect the o/p of routine activity to falt file, is it possible , plz gurus help me.

cheers;
vijay
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

There is no sequential file stage in a Job Sequence.
Why not do a little research on what DSGuru2b said about the DSLogEvent() function
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

hi gurus,

where should i use this function, i tried to add a column in the routines activity, plz help me where should i use this function.

in this case JOB1-----> name of the job activity
job3------>name of the sequence.

functon format:
LOG ERROR=DSlog Event(job1, DSJ.LOGINFO, SEQUENCE GENERATED,JOB1).
plz help me where should i specify the function and is my format of the function used correct.

plz help me gurus.

cheers;
vijay
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Post by kris »

Not sure why do you want to see it from Job Sequence, but If you are interested only in seeing what the current sequence number is:

You can see all the entrees in SDKSequences from a hashed file stage view. Put a hashed file stage on a server job diagram window, In outputs page configure file name to SDKSequences and enter 2 columns(names doesn't matter) seed_name and seed_value and view data.

You can query SDKSequences hashed file from DataStage Administrator command interface too. Search on SDKSequences should give you enough info.

Kris~
~Kris
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

inside your routine. Add a line at the end. Something like

Code: Select all

val=KeyMgtGetNextValue('MyJob1') 
EventMsg="The sequence value is :":val
Call DSLogEvent(DSJ.MET, DSJ.LOGINFO , EventMsg)
Ans=Val
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

hi gurus,
i went to designer and copied the code of KEYMANAGEMENTGETNEXT VALUES and created a new routine and added lines to it.

when i go to director i see the message

13:13:45: Job_Activity_0 (JOB job1) finished, status=1 [Finished OK]

13:13:46: Routine_Activity_1 (ROUTINE DSU.KeyMgtGetNextValue1) started

13:13:46: Exception raised: @Routine_Activity_1, BASIC routine is not cataloged: DSU.KeyMgtGetNextValue1
iam getting error BASIC ROUTINE IS NOT CATALOGED.

plz help me gurus

cheers;
vijay
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

vijaykumar wrote:hi gurus,
i went to designer and copied the code of KEYMANAGEMENTGETNEXT VALUES and created a new routine and added lines to it.

vijay
WHAT LINES DID YOU ADD? YOU NEED TO MENTION THAT AS WELL.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Did you compile your routine. Did you test it out before using it in the job?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

HI,
i created new routine, i just copied the code of KEYMANGEMENTNEXTVALUE, re-named as keymgtnextvalue1 and added extra lines like

val=KeyMgtGetNextValue('job1')

EventMsg="The sequence value is :" :val

call DSLogEvent(DSJ.MET,DSJ.LOGINFO,EventMsg)

Ans=val.

i didn't write arguements.
iam compiling the server routine, iam getting error, referenced by another component.
keymgtgetnextvalue-no object code produced.

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

Re: regarding routine activity

Post by ray.wurlod »

vijaykumar wrote: i want to see the sequence numbers generated, is it possible from sequence, is there any way to see the sequence numbers generated.plz
From sequence, no.

There is no View Data capability in a job sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply