Look at the QUSRJOBI api. I think that format JOBI0700 has what you are looking for.
_______________________________________________________________
Do you really want 'started from'? More typical would be the library the program is currently running from (which 99.999% of the time is the same). If you're interested in running from then the following code will do that:
<pre>
Pgm
Dcl Var(&PgmInfo) Type(*Char) Len(80)
Dcl Var(&BytPrv) Type(*Int) Stg(*Defined) +
DefVar(&PgmInfo)
Dcl Var(&BytAvl) Type(*Int) Stg(*Defined) +
DefVar(&PgmInfo 5)
Dcl Var(&Format) Type(*Int) Stg(*Defined) +
DefVar(&PgmInfo 9)
Dcl Var(&Rsv) Type(*Char) Stg(*Defined) Len(4) +
DefVar(&PgmInfo 13)
Dcl Var(&Lib) Type(*Char) Stg(*Defined) Len(30) +
DefVar(&PgmInfo 19)
Dcl Var(&Library) Type(*Char) Len(10)
ChgVar Var(&BytPrv) Value(80)
ChgVar Var(&Format) Value(0)
ChgVar Var(&Rsv) Value(x'00000000')
CallPrc Prc('_MATPGMNM') Parm((&PgmInfo))
ChgVar Var(&Library) Value(&Lib)
SndUsrMsg Msg(&Library) MsgType(*Info)
EndPgm
</pre>
Bruce
<a href="http://www.brucevining.com/">Bruce Vining Services</a>
Last Wiki Answer Submitted: February 18, 2009 2:51 pm by Teandy5,830 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.