Exception Handler: Special character in $ErrMessage

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
wbeitler
Premium Member
Premium Member
Posts: 70
Joined: Tue Feb 21, 2006 2:58 am
Location: Netherlands
Contact:

Exception Handler: Special character in $ErrMessage

Post by wbeitler »

Hi all,

Want to pass the result of the $ErrMessage from an exception handler to a server job writing the message to a db table. For other reasons the input of this job needs the parameter as an quoted string. However when I use squote(Exception_handler.$ErrMessage) the message is qouted, but seems to contain a special character (appearing in the director log as a newline).

The log:

'Error calling DSAttachJob(JobTestAbort)
(DSOpenJob) Cannot open job JobTestAbort. - not a runnable job JOB'

This causes the job parameter to be populated with the first part only:
'Error calling DSAttachJob(JobTestAbort)

Instead of the complete message. Tried replacing char(10), char(13), trim
but there seems to be something else 'in the middle' ?

i'd probably need a coffee...



William
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Field Mark, I would assume. Try removing @FM from the message.
-craig

"You can never have too many knives" -- Logan Nine Fingers
wbeitler
Premium Member
Premium Member
Posts: 70
Joined: Tue Feb 21, 2006 2:58 am
Location: Netherlands
Contact:

Post by wbeitler »

Code: Select all

squote(ereplace(Field(Exception_Handler.$ErrMessage,@VM,1),'<L>', ' '))
worked good enough for us,

William
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So a Value Mark, eh? Interesting. Thanks for coming back and updating.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply