Routine - Transform Function bug - missing Return(Ans)

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
chrisponty
Charter Member
Charter Member
Posts: 19
Joined: Wed May 17, 2006 4:34 am
Location: Caerdydd

Routine - Transform Function bug - missing Return(Ans)

Post by chrisponty »

This is not a major problem, but an annoying bug which I cannot seem to
fix, without creating a new routine, and rebuilding from scratch.

I am writing a routine to calculate NCD's, which will be called by the transform function.

While writing this routine, I save then compile and then test the routine, but at some point, the Return(Ans) has disappeared from the bar towards the bottom of the code tab in the routine.

Even the code Ans = NCD has gone. I re-insert and compile, but the routine will no longer run and provide a result!!

A) has anyone else had this problem in server on 7.1
B) Does anyone know how to get the Return(Ans) back in the bar

to save me having to create a new routine each time this bug occurs (4x now since starting of the rouhtine!).


thanks for your help.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Routine - Transform Function bug - missing Return(Ans)

Post by sachin1 »

are you creating "BEFORE/AFTER subroutine" or transform function.
chrisponty
Charter Member
Charter Member
Posts: 19
Joined: Wed May 17, 2006 4:34 am
Location: Caerdydd

Re: Routine - Transform Function bug - missing Return(Ans)

Post by chrisponty »

Its a transform function.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Never seen that behaviour in any release. Can you try adding a comment after the final executable line? Also check that you don't have too many End statements in the code.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chrisponty
Charter Member
Charter Member
Posts: 19
Joined: Wed May 17, 2006 4:34 am
Location: Caerdydd

Post by chrisponty »

Ray,

added comment, didnt cause the compile to fail, also number of ends matches the number of Ifs.

got a new version of the routine to compile and work, so not a problem,
but an annoying glitch when it occurs.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Silly thing is, the source code is saved as a single string, so there's no sensible way it can lose a line or two. (The insensible way, of course, is bad coding of the client/server interface, but we don't have access to the source code for that. It would be sensible to report this through your support provider, particularly if you have a reproducible example.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chrisponty
Charter Member
Charter Member
Posts: 19
Joined: Wed May 17, 2006 4:34 am
Location: Caerdydd

Post by chrisponty »

Cheers for the help Ray, will email support with the problem.

Will let you know if they can resolve this issue.

cheers
TD_Chile
Premium Member
Premium Member
Posts: 10
Joined: Tue Jun 10, 2008 1:43 pm
Location: Santiago, Chile

Re: Routine - Transform Function bug - missing Return(Ans)

Post by TD_Chile »

chrisponty wrote:This is not a major problem, but an annoying bug which I cannot seem to
fix, without creating a new routine, and rebuilding from scratch.

I am writing a routine to calculate NCD's, which will be called by the transform function.

While writing this routine, I save then compile and then test the routine, but at some point, the Return(Ans) has disappeared from the bar towards the bottom of the code tab in the routine.

Even the code Ans = NCD has gone. I re-insert and compile, but the routine will no longer run and provide a result!!

A) has anyone else had this problem in server on 7.1
B) Does anyone know how to get the Return(Ans) back in the bar

to save me having to create a new routine each time this bug occurs (4x now since starting of the rouhtine!).


thanks for your help.
This works for me

1) Export routine in dsx format
2) Open it with notepad
3) Find strange characters like /a /b etc etc
4) Remove those characters
5) Save dsx file
6) re-import the routine
7) a little pray
8) voila !

CAUSE: typically the copy/paste human need, from another text processors to Ds editor

Bye.
Post Reply