HP3000-L Archives

August 2000, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Thu, 3 Aug 2000 15:06:03 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (67 lines)
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

ATOM RSS1 RSS2