HP3000-L Archives

January 2003, Week 3

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:
Brian Donaldson <[log in to unmask]>
Reply To:
Date:
Fri, 17 Jan 2003 10:30:38 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (115 lines)
I am trying to retrieve all the ldevs for a given class (MODEM). The
"AIFSYSWIDEGET" procedure is returning -47 error code (Invalid AIF Key)

Anybody got any ideas on what I am doing wrong?

Thanks,
Brian Donaldson.

Cobol Mainline:

     MOVE "MODEM" TO WS-LDEV-CLASS-NAME.
     MOVE ZEROES  TO WS-ERROR-CODE-DOUBLE.
     MOVE SPACES  TO WS-STOP-FLAG.
     INITIALIZE WS-LDEV-NOS-TABLE.
     CALL "get_ldev_class" USING WS-ERROR-CODE-DOUBLE,
                                 WS-LDEV-CLASS-NAME,
                                 WS-LDEV-NOS-TABLE
     END-CALL.
     IF WS-ECD-1 NOT = ZEROES THEN
        MOVE 239 TO WS-MSGNUM
        PERFORM 7500-HPERRMSG    THRU 7500-HPERRMSG-EXIT
        PERFORM 9999-QUICK-CLOSE THRU 9999-QUICK-CLOSE-EXIT
        CALL INTRINSIC "QUITPROG" USING WS-ECD-1
     END-IF.

$standard_level 'hp_modcal'$
$optimize on$
$global$
$assume 'LOCAL_GOTOS_ONLY'$
$assume 'LOCAL_ESCAPES_ONLY'$
$assume 'NO_HEAP_CHANGES'$
$SUBPROGRAM 'get_ldev_class'$
program get_the_class;
type
   max_pathname_type     = packed array[1..16] of char;
   pac16                 = max_pathname_type;
   pacman                = array [1..100] of integer;
   status_type           = record
                              case boolean of
                                   true : (all   :integer);
                                   false: (info  :shortint;
                                           subsys:shortint);
                           end;
   status_2_type         = array [1..4] of status_type;
const
   init_item_status_array=status_2_type
                          [4 of status_type [info  :0,
                                             subsys:0]];
var
   aif_area         : integer;
   count            : shortint;
   item_array       : packed array [1..16] of globalanyptr;
   item_num_array   : packed array [1..16] of integer;
   item_status_array: status_2_type;
   num_array_entries: integer;
   overall_status   : status_type;
   return_array_1   : array[1..50] of integer;
   return_array_2   : array[1..50] of integer;
   search_key       : max_pathname_type;
   user_id          : integer;
$sysintr 'sysintr.pub.sys'$
procedure GETPRIVMODE  ; intrinsic;
procedure GETUSERMODE  ; intrinsic;
$sysintr 'aifintr.pub.sys'$
procedure AIFSYSWIDEGET; intrinsic;
PROCEDURE get_ldev_class(var overall_status:status_type;
                         var class_name    :pac16;
                         var ldev_nos      :pacman);
label 999;
begin
   GETPRIVMODE;
   item_status_array    := init_item_status_array;
   overall_status.all   := 0;
   item_num_array[1]    := 13002;
   item_num_array[2]    := 0;
   item_num_array[3]    := 0;
   item_num_array[4]    := 0;
   item_num_array[5]    := 0;
   item_num_array[6]    := 0;
   item_num_array[7]    := 0;
   item_array[1]        := addr(class_name);
   item_status_array    := init_item_status_array;
   num_array_entries    := 100;
   search_key           := class_name;
AIFSYSWIDEGET(overall_status,
                 aif_area,
                 return_array_1,
                 return_array_2,
                 num_array_entries,
                 item_num_array,
                 item_array,
                 item_status_array,
                 search_key,
                 user_id,);
if overall_status.all<>0 then
   goto 999;
   count:= 1;
repeat
   if return_array_1[count] <> 0 then
   begin
      ldev_nos[count]:= return_array_1[count];
      count:= count + 1;
   end;
until (count > 100);
goto 999;
999:
   GETUSERMODE;
end;

begin
end.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2