Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get PID of self?

Status
Not open for further replies.

esterud

Technical User
Jan 30, 2003
7
US
I am running OpenVMS (TM) Alpha Operating System, Version V7.3-2.

Inside a .com script I would like to retrieve the current PID of the script being executed. Essentially I want to get the unique PID of myself. I would be setting this to a variable to be used later. Is this possible? Anyone know how to retrieve this info in a script?
 
Pretty easy.

$ yourpid := f$getjpi("","PID")

The symbol "yourpid" will contain the value.

See "$ HELP LEXICAL F$GETJPI" for more information.

Hope this helps,
Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top