[Info-vax] JIB Jab

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Tue Oct 13 15:22:46 EDT 2009


In article <a7ee5e2e-902c-4811-a412-196b711be74a at a21g2000yqc.googlegroups.com>, Verne <verne at wvnet.edu> writes:
>On Oct 13, 12:46=A0pm, VAXman-  @SendSpamHere.ORG wrote:
>> Here's one for you all to ponder since there's little VMS talk here of la=
>te.
>>
>> How do you get the JIB from the PID using DCL such that you can see the J=
>OB
>> logical table of the process whose PID you've specified. =A0Have fun...
>>
>> --
>> VAXman- A Bored Certified VMS Kernel Mode Hacker =A0 =A0VAXman(at)TMESIS(=
>dot)ORG
>>
>> =A0http://www.quirkfactory.com/popart/asskey/eqn2.png
>>
>> =A0 "Well my son, life is like a beanstalk, isn't it?"
>
>
>you say "using DCL" ... I do have a macro routine that I call from a
>wrapper program in Basic (Vax, Alpha and IA64 versions) that when
>given
>a PID, will look it up and create a symbol containing a string
>like LNM$JOB_82DE6580 ... got help on writing this from several
>people,
>not something I was able to figure out on my own  :-)
>
>GETJOB =3D=3D "$PAGE_C:[003]GETJOB.ALPHA_EXE"
>getjob  'f$integer(%x1B37DC57)'  xyz
>SHOW SYMBOL xyz
>XYZ =3D "LNM$JOB_82DE6580"
>
>wiil that do ??

I could write such a program in my sleep.

	.LIBRARY "SYS$LIBRARY:LIB.MLB"
	$PCBDEF
	$SSDEF

	$OFFSET	0,POSITIVE,<-
		<ARGCNT,4>,-
		<THEPID,4>,-
		<THEJIB,4>,>

        .WEAK   EXE$EPID_TO_PCB,EXE$CVT_EPID_TO_PCB

	.PSECT	DATA,WRT,NOEXE,5
ARGLST:	.LONG	2
	.ADDRESS PID
	.ADDRESS JIB

PID:	.LONG	0
JIB:	.LONG	0

	.PSECT	CODE,NOWRT,EXE,5

	.ENTRY	GETJOB,0
;
; get command line params  ... I'd probably use .CLD and CLI$rouintes
; 
	MOVL	cmdline-pid,PID

	$CMKRNL_S	routin	= GETJIB,-
			arglst	= ARGLST
;
;	check status
;	create DCL symbol (not so sure I'd do this either but...
;
	RET
	
	.ENTRY	GETJIB,0
	MOVL	@THEPID(AP),R0
	PUSHL	#<EXE$EPID_TO_PCB!EXE$CVT_EPID_TO_PCB>
	JSB	@(SP)+
	TSTL	R0
	BEQL	badPID
	MOVL	PCB$L_JIB(R0), at THEJIB(AP)
	MOVL	#SS$_NORMAL,R0
	RET
badPID:	MOVL	#SS$_NONEXPR,R0
	RET
	.END	GETJOB

The question was to get it in DCL.  No escape hatch to a $CMKRNL hack.

-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

  http://www.quirkfactory.com/popart/asskey/eqn2.png
  
  "Well my son, life is like a beanstalk, isn't it?"



More information about the Info-vax mailing list