![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: Is there a way to determine the Process ID of the process that submitted a batch job? I looked at all of the F$GETJPI and F$GETQUI items, but none seem to be able to give me this information. I have a need for a batch job to know "who submitted me", by PID, not username. The Answer is : The submittor's PID is not stored in a queue entry, and is thus not available within the sys$getqui/f$getqui environment. With appropriate auditing, it is possible to ensure that the information is recorded in the audit journal. However, determining the match at run-time would require privilege and would be costly in terms of opening and searching the journal. If your submittor is cooperative, you can pass the information to the batch job as a parameter: $ SUBMIT myjob/PARAMETER=('F$GETJPI("","PID")') The batch job will then find the PID string in P1 The OpenVMS Wizard will assume you are aware the submitting process may well exit long before the batch jon starts. Existing discussions of the f$getqui lexical include the following topics: (813), (1240), (2159), (3951), (4546), (4568), (4903), (5188) (5471), (5567), (5651), (5793), (5982), (6315), (6877), (9130), (9863), etc.
|