Not able to compile Sequence job variable 'Trim' not defined

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
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Not able to compile Sequence job variable 'Trim' not defined

Post by naren6876 »

I have used a Nested condition activity in my sequence job. In that expression link i have user 'Trim' and 'Substrings' functions.

When i tried to compile that job it gaves some error message like:

Activity Nested_condition1: Trigger Expression lnk_aa - Variable 'Trim' not defined.

what does it mean?.

Any input will be highly appreciated.

Thanks in advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Could you please post the code in your trigger condition; it sounds like you might have some sort of a syntax error.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And post your exact 7.x version of DataStage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

ArndW wrote:Could you please post the code in your trigger condition; it sounds like you might have some sort of a syntax error.
same job is working fine in Dev region.

When i checked for functions by right click.. I can see only 'Alpha' under String functions.

Why is that so?.

Any idea please.

Thanks in advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Naren6786, my only thought right now is that we still don't know the exact syntax or your ds version.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly... neither question was answered.
-craig

"You can never have too many knives" -- Logan Nine Fingers
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

ArndW wrote:Naren6786, my only thought right now is that we still don't know the exact syntax or your ds version. ...
I'm using ds 7.5 server edition.

Trigger expression is:

Trim(BeginLoop.$Counter) = 'x.sh' Or Trim(BeginLoop.$Counter) ='y.sh' Or Substrings(BeginLoop.$Counter,1,1) = 'Z'


Thanks,
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I can't see anything wrong there at all, except that the SUBSTRINGS function is meant to be used with dynamic arrays; it will work here because you only have one element; but I would prefer to see "BeginLoop.$Counter[1,1] = 'Z'" used instead - neverthe less it shouldn't affect your error.

Is this expression in one of the output conditions? The error indicates that "TRIM" is not detected by they compiler as a keyword. This can happen if you do something like "TRIM['string']" by mistake where the compiler will try to interpret it as an array (but usually the error message is different).

Are you having other problems with jobs promoted from Dev to wherever they are now?
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

ArndW wrote:I can't see anything wrong there at all, except that the SUBSTRINGS function is meant to be used with dynamic arrays; it will work here because you only have one element; but I would prefer to see "BeginLoop.$Counter[1,1] = 'Z'" used instead - neverthe less it shouldn't affect your error.

Is this expression in one of the output conditions? The error indicates that "TRIM" is not detected by they compiler as a keyword. This can happen if you do something like "TRIM['string']" by mistake where the compiler will try to interpret it as an array (but usually the error message is different).

Are you having other problems with jobs promoted from Dev to wherever they are now?
after deleting the SUBSTRINGS function from there,still it gives the same compilermessage.

variable 'Trim' not defined.


I have checked the available functions by right click in the expression box and under functions- under String i didn't see any function other than Alpha.

any clue pls.

thanks in advance.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

That should not happen. You should be able to see all the function under String. Do you see the same behaviour in your Dev box?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

DSguru2B wrote:That should not happen. You should be able to see all the function under String. Do you see the same behaviour in your Dev box? ...
i can see all the functions in my Dev box.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It sounds like you have a corrupted or edited DSParams file - can you find the reference to the "Trim" function in there or is it gone?
naren6876
Participant
Posts: 233
Joined: Mon Feb 07, 2005 7:19 pm

Post by naren6876 »

ArndW wrote:It sounds like you have a corrupted or edited DSParams file - can you find the reference to the "Trim" function in there or is it gone?
it's gone.

I didn't see anything else other than 'Alpha'

thanks.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Assuming you aren't trying your job in production, you might try to copy your development DSParams file to this location and see what happens; make a copy of this possibly corrupt DSParams file just to be on the safe side. Can you see the Date/Time modified for this file and try to figure out who or how it was corrupted?
Post Reply