Routine error

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
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Routine error

Post by sri75 »

Hi,




when I ran the job, it aborted with this message

"From previous run
DataStage Job 6141 Phantom 12438
Program "DSD.RUN": Line 2157, Variable previously undefined. Zero length string used.
Program "DSD.RUN": Line 2157, Variable previously undefined. Zero length string used."

there is one variable defined and assigne value.
can you please help me out ?

the job has the following routine


ParamFile = ParameterFileName
Var = 0
OpenSeq ParamFile To FileVar Else
Call DSLogFatal("Cannot open ":ParamFile: "- Aborting Job", "ParameterRoutine")
Ans = @Null
GoTo ErrorExit
End

Loop
ReadSeq FileLine From FileVar
Then
If Var = 1 Or TrimF(TrimB(Field(EReplace(FileLine, '[',""),']',1))) = TrimF(TrimB(JobName))
Then

Var = 1

If Var = 1 And TrimF(TrimB(Field(FileLine,"=",1))) = TrimF(TrimB(ParameterName))
Then

Ans = TrimF(TrimB(Field(FileLine,"=",2)))
GoTo MatchFound
End Else

Ans = @Null
End

End Else

Ans = @Null
End

End Else
Exit
End
Repeat

MatchFound:

CloseSeq FileVar

ErrorExit:

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

Post by ray.wurlod »

Can you please edit that post, encase your code between Code tags and format it? This will make it easier to read.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

"JobName" used in - If Var = 1 Or TrimF(TrimB(Field(EReplace(FileLine, '[',""),']',1))) = TrimF(TrimB(JobName)) is a Variable previously undefined ???
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
sri75
Premium Member
Premium Member
Posts: 132
Joined: Thu Sep 09, 2004 12:42 pm

Post by sri75 »

Thanks Ray and Josh for your reply.

Actually We got old version text file from Peoplesoft which feeds this routine.

We addede few entries what we want to this file, now it is working fine


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

Post by ray.wurlod »

To help future searchers, can you please identify what those changes were that fixed this problem, and mark the thread as Resolved?
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