JINFO function
syntax: JINFO (“[#]S|Jnnnn”, “item” [,status] )where jobID can be “[#]J|Snnn” or “0”, meaning “me”
63 unique items: Exists, CPUSec, IPAddr, JobQ, Command, JobUserAcctGroup, JobState, StreamedBy, Waiting ...
status parm is a variable name. If passed, CI sets status to JINFO error return -- normal CI error handling bypassed
can see non-sensitive data for any job on system
can see sensitive data on: “you”; on other jobs w/ same user.acct if jobsecurity is LOW; on other jobs in same acct if AM cap; on any job if SM or OP cap
Notes:
- :help JINFO provides all of the items, security rules and some examples.
- if JINFO ( HPLASTJOB, “EXISTS”) then … # you know the job exists, at least right now!
- if JINFO ( “S543”, “IPADDR”) <> “” then # Session 543 is connected via the network
- if JINFO ( target_job, “FMTPRIORITY”) = “DQ” then # ‘target_job’ is currently in the DQ dispatcher queue
- setvar state JINFO (HPLASTJOB, “STATE”, status) while status = 0 and state = “WAIT” do … setvar state JINFO (HPLASTJOB, “STATE”, status) endwhile
- if JOBCNT( “@J”, list) > 0 then while JINFO (word(list), “EXISTS”) do setvar list xword(list) ….
- while JINFO( hplastjob, ”EXECUTING”) do ...