if Arg1 = 'Y' then
Call DSSetUserStatus("Y");
Call DSLogInfo(DSGetJobInfo,"set_userstatus");
Ans = 'Y';
end else
Call DSSetUserStatus("N");
Call DSLogInfo(DSGetJobInfo,"set_userstatus");
Ans = 'N'
end
in the log DSGetJobInfo function return NULL value and the sequence job return error message: Variable '*.$UserStatus' never assigned a value.
hey i think i find part of the problem, the job can compile now. new the problem is the routine never return 'Y' even argument Arg1 is 'Y', but in the test window if i specify the Arg1 is 'Y' then the routine returns Y
if Arg1 = "Y" then
Call DSSetUserStatus("Y");
Call DSLogInfo(Arg1,"Arg1");
Call DSLogInfo(DSGetJobInfo(DSJ.ME, DSJ.JOBNAME),"userstatus");
Ans = 'Y';
END ELSE
Call DSSetUserStatus("N");
Call DSLogInfo(Arg1,"Arg1");
Call DSLogInfo(DSGetJobInfo(DSJ.ME, DSJ.JOBNAME),"userstatus");
Ans = 'N';
end
and i output the argument and return vale to a file, now the argument value is Y but return value still N. anyone know why?
and DSGetJobInfo(DSJ.ME, DSJ.JOBNAME) this statement doesn't work, but i copied it from user manual
You also never clarified what actually gets logged in your original code, specifically the one with "userstatus" in it. Still curious about that. Since you said it didn't work.
Also, clarify something. You keep saying "BASIC Transformer" - that is a very specific stage in a Parallel job. This is actually just a "normal" transformer in a Server job, yes?
-craig
"You can never have too many knives" -- Logan Nine Fingers
Let's start with: DataStage BASIC does not use semi-colon (or any other) statement terminators. Your code has a lot of empty comments in it.
DSSetUserStatus subroutine does not (despite what some help claims) store anything in the log. It is stored in the job's user status area, from which it can be retrieved in a sequence by accessing the Job activity's $UserStatus activity variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.