Job Control Routine

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
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Job Control Routine

Post by mdbatra »

Hi All,
I wrote a server job control with the below code:

CompSt = pCompareSt(job param, an integer)

CompEnd = pCompareEnd(job param, an integer)

output_file = pOutputFile(full path for o/p file)

loop_count = ( CompSt- CompEnd) + 1



current_date = DATE()



OPENSEQ output_file TO open_file

ELSE Call DSLogFatal("Unable to open: ":output_file,"In Job Control")




LOOP

UNTIL loop_count > 0

compare_date = current_date + CompSt

WRITESEQ compare_date TO open_file ELSE STOP

WEOFSEQ open_file

loop_count = loop_count - 1

CompSt = CompSt + 1

REPEAT

CLOSESEQ open_file





this loop is runniing forever and not stopping. i couldn't figure out the problem here , i have used the same code for some other job controls as well.
could anybody please suggest what's the issue here ?
Rgds,
MB
mdbatra
Premium Member
Premium Member
Posts: 175
Joined: Wed Oct 22, 2008 10:01 am
Location: City of London

Post by mdbatra »

i used WHILE , working perfect.
Thanks.
Rgds,
MB
Post Reply