Re:
> CALL JOBINFO(JSTYPE,JOBNUM,JOBSTAT,
> * JOBNAMEOPT,JOBNAME,ITEMERR)
> ! JOBSTAT = 1
> IF (JOBSTAT .NE. 0 .OR. ITEMERR .NE. 0) THEN
...
> I seem to be losing the first two chars of the value stored in WHEREWASI,
> after the JOBINFO call is made. I can store the value on WHEREWASI to
...
> In the intrinsics manual, it is defined as
>
> I16V I32 U16A I16V * I16
> JOBINFO( jsind,jsnum,jsstatus[, itemnum,item,itemerror] [...]);
>
> 'jsstatus 16-bit unsigned integer array (required)'
^^^^^
The word "array", plus the textual description, implies that jsstatus is
at least 32 bits long: two 16-bit values...you're passing only a 16-bit
variable (apparently), so the intrinsic is storing into that variable
and the following two bytes of memory (apparently where WHEREWASI is
stored). (I suspect that a datacom analyzer / network analyzer would
show that when you "PRINT *, WHEREWASI" the first two bytes coming out
are nulls in the "bad" case.)
<plug>
Intrinsics manual?
:cseq jobinfo
CSEQ [2.9] - LPS Toolbox [A.07a] (c) 1995 Lund Performance Solutions
This product is licensed to: Allegro Consultants, Inc.
Procedure JOBINFO (
jsind : int16 ; {R26}
jsnnn : var int32 ; {R25}
status_i16_array: anyvar record ; {R24}
itemnum1 : int16 ; {R23} := $0000
item1 : anyvar record ; {SP-$0034} := nil
...
item5 : anyvar record ; {SP-$0064} := nil
errornum5 : var int16 ) {SP-$0068} := nil
{Note: requires SM for full access. }
{ }
{** NOTE: be sure to pass an array for }
{ status_i16_array, and not just }
{ a single 16-bit error parameter! }
{ }
{item#s, sizes, meanings: }
{ }
{ --- system wide things: }
{ }
{ 12 i16 # of active jobs }
{ 13 i16 # of active sessions }
...
</plug>
ALMANAC and JOBINFO seem to be the worst "gotchas" of this type...
very few (no?) other intrinsics have an "array of two 16-bit integers"
error parameter. (FPARSE is vaguely similar.)
Stan Sieler [log in to unmask]
www.allegro.com/sieler/wanted/index.html www.allegro.com/sieler
|