Page 2 of 2

Posted: Tue Mar 28, 2006 2:37 pm
by Juls
chulett wrote:If the value is set in one sub-sequence and needs to be accessed in another, that second sub-sequence will need a Routine Activity stage that can retrieve the User Status area from any named job in order to bring that value over into the second sub-sequence. Assuming, of course, that the job that sets it in the other sub-sequence has run by then.
Thanks!
This is almost exactly what I need to do:
Value is set in one sub_sequence and needs to be accessed in the top sequence job (that calls it) to do some "if then" condition testing and decide whether or not to proceed running 2nd sub-sequence job.

This is were I will use routine that I wrote that extracts the user status based on jobname(argument). I will call this routine in top sequence job.
Correct?

Posted: Tue Mar 28, 2006 2:43 pm
by chulett
Correct! :wink:

Posted: Fri Dec 14, 2007 3:03 pm
by Raftsman
I tried to use the DSSetUserStatus routine that is published on some posts but I keep getting this error when I test the routine.

Routine:

Call DSSetUserStatus(Arg1)
Ans = Arg1
RETURN(Ans)


TEST #1
*******

Arg1 = 'Jim'

Test completed.

DSLogWarn called from : DSRGetJob
Message to be logged is...
> Cannot find a job number 0

Result = Program "TSTSetUserStatus.B": Line 5, Variable "ANS" previously undefined. Empty string used.


Can someone please help.

Thanks

Posted: Fri Dec 14, 2007 3:05 pm
by Raftsman
I tried to use the DSSetUserStatus routine that is published on some posts but I keep getting this error when I test the routine.

Routine:

Call DSSetUserStatus(Arg1)
Ans = Arg1
RETURN(Ans)


TEST #1
*******

Arg1 = 'Jim'

Test completed.

DSLogWarn called from : DSRGetJob
Message to be logged is...
> Cannot find a job number 0

Result = Program "TSTSetUserStatus.B": Line 5, Variable "ANS" previously undefined. Empty string used.


Can someone please help.

Thanks

Posted: Fri Dec 14, 2007 3:20 pm
by chulett
Two things.

1) I don't believe this is something testable from the Manager as there is no user status area to update. You'll need to use it in either a small test job or just go for the real deal and see what happens.

2) You didn't actually include the 'RETURN(Ans)' part in your routine, did you? That's automatically part of the routine.

Posted: Wed May 21, 2008 10:26 am
by Jessie
[

UserStatus in PX

Posted: Fri Sep 05, 2008 7:35 am
by vercama
chulett wrote:No need for an additional stage if it's already available in the User Status area of one of the jobs in the Sequence job. Besides, that wasn't the question.

Juls asked about accessing it from two sub-sequence jobs called from a third top level sequence job. The User Variables stage won't help here. If the user status value is set in the top level sequence, you just need to pass it to both sub-sequence jobs in order to use it in any of their jobs.

If the value is set in one sub-sequence and needs to be accessed in another, that second sub-sequence will need a Routine Activity stage that can retrieve the User Status area from any named job in order to bring that value over into the second sub-sequence. Assuming, of course, that the job that sets it in the other sub-sequence has run by then.

Hi Folks,
there are many posts about UserStatus in parallel talking about C routines, and so on, but I've not found the final solution yet. So to summarize:
I know how passing one parameter from one job to another one into a Sequence job using Server jobs (setUserStatus SERVER routine).
What about Prallel? DSSetUserStatus is not usable in PX :(