HP3000-L Archives

July 2004, Week 5

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:
Brian Donaldson <[log in to unmask]>
Date:
Thu, 29 Jul 2004 19:58:31 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (204 lines)
I hope someone can help me with this one:

Got the Cobol/Vplus mainline. Reports all libraries on system (SL, NMXL,
NMRL etc) and all processes accessing them. Works great reporting
processes (MPEiX directory) accessing these libraries as you can see:


 NEWLIBSL.LIB     .SYS     MANAGER.SYS     Secured        PM Group
 R01XCATS.LIB     .SYS     MANAGER.SYS     Secured        PM Group
 R01XCURS.LIB     .SYS     MANAGER.SYS     Secured        PM Group
 INSVXL  .NET     .SYS     MANAGER.SYS     Secured        PM Group
    #J3 BRIAN,MANAGER.SYS,PUB
 LIBSTRXL.NET     .SYS      MANAGER.SYS    Secured        PM Group
 SL      .NMPRG   .SYS      MANAGER.SYS    Secured        PM Group
 SL      .PUB     .SYS      MANAGER.SYS    Secured        PM Group
        LOAD.PUB.SYS
 SL      .PUB     .VEHOLD   MANAGER.VEHOLD Secured
 SL      .PUB     .VESOFT   MANAGER.SYS    Secured        PM Group

 When the accessor is a process in the POSiX directory I get nothing:

 LIBIO   .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 LIBMCATS.DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 LIBPL   .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 LIBST   .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 LIBUA   .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 MPESTM  .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 SOCKET  .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 STMXL   .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
           ..
           ..
           ..
 SVIPC   .DIAG    .SYS   MANAGER.SYS    Secured             PM Group
 DCEXL   .HPDCE   .SYS   MANAGER.SYS    Secured             PM Group
 PEXL    .INSTALL .SYS   MANAGER.SYS    Secured             PM Group
 DTHELPSL.LIB     .SYS   MANAGER.SYS    Secured             PM Group
 LIBIOXL .LIB     .SYS   MANAGER.SYS    Secured             PM Group

The STMXL.DIAG.SYS library is being accessed by programs in the HFS
directory.

My Cobol mainline calls a Pascal subroutine that does all the AIF stuff to
retrieve the info. AS I said, works great with retrieving MPEiX data but it
won't give me the HFS data.

The main FOPEN's a flat file passing the required parms for the FWRITE
which takes place in the Pascal sub.

Extract from my Cobol Mainline:

$CONTROL OPTIMIZE=1,BOUNDS,POST85,CROSSREF
$CONTROL ERRORS=5,OPTFEATURES = CALLALIGNED
...
...
WORKING-STORAGE SECTION.
 01  WS-HFS-POSIX-FILE-NAME.
     05  WS-HFS-PFN-LENGTH   PIC S9(09) COMP VALUE ZEROES.
     05  WS-HFS-POSIX-FNAME  PIC  X(1020)    VALUE SPACES.
 01  WS-FILE-LOCATIONS       PIC  X(48)      VALUE SPACES.
 01  WS-PM-PROG-TABLE.
     05  WS-PM-PT-REC-TYPE        PIC S9(09) COMP.
     05  WS-PM-PT-UFID-TABLE                 COMP.
         10  WS-PM-PT-UFID-ARRAY  OCCURS 5.
             15  WS-PM-PT-UFID    PIC S9(09) COMP VALUE ZEROES.
     05  WS-PM-PT-FILE-LOCATION                   VALUE SPACES.
         10  WS-PM-PT-FILE-NAME   PIC  X(16).
         10  WS-PM-PT-GROUP-NAME  PIC  X(16).
         10  WS-PM-PT-ACCT-NAME   PIC  X(16).
     05  WS-PM-PT-FILE-CODE       PIC S9(09) COMP VALUE ZEROES.
     05  WS-PM-PT-FILE-ACCESS     PIC  9(09) COMP VALUE ZEROES.
     05  WS-PM-PT-USER-COUNT      PIC S9(09) COMP VALUE ZEROES.
     05  WS-PM-PT-SEC-REL         PIC S9(09) COMP VALUE ZEROES.
     05  WS-PM-PT-FILE-OWNER      PIC  X(36)      VALUE SPACES.
 01  WS-FWRITE-PARMS-2.
     05  WS-FP2-FILE-NUM                   PIC S9(04) COMP.
     05  WS-FP2-REC-LENGTH                 PIC S9(04) COMP.
     05  WS-FP2-CTL-CODE                   PIC S9(04) COMP.
     05  WS-FP2-COUNTERS                              COMP.
         10  WS-FP2-COUNTER                PIC S9(04) COMP.
         10  WS-FP2-ERROR-CODE             PIC S9(04) COMP.
         10  WS-FP2-PROC-NO                PIC S9(04) COMP.
 01  WS-NUM-ENTRIES-2             PIC S9(09) COMP VALUE ZEROES.
 01  WS-PROC-NO-2                 PIC S9(09) COMP VALUE ZEROES.
PROCEDURE DIVISION.


...
...
...

     INITIALIZE WS-HFS-POSIX-FILE-NAME.
     STRING "/"                 DELIMITED BY SIZE
            WS-PM-PT-ACCT-NAME  DELIMITED BY " " "/"
            WS-PM-PT-GROUP-NAME DELIMITED BY " " "/"
            WS-PM-PT-FILE-NAME  DELIMITED BY SIZE
       INTO WS-HFS-POSIX-FNAME
     END-STRING.
     MOVE +256 TO WS-HFS-PFN-LENGTH.
     MOVE WS-PM-PT-FILE-LOCATION TO WS-FILE-LOCATIONS.
     CALL "get_accessing_users" USING WS-ERROR-CODE-DOUBLE,
                                      WS-FILE-LOCATIONS,
                                      WS-HFS-POSIX-FILE-NAME,
                                      WS-NUM-ENTRIES-2,
                                      WS-PROC-NO-2,
                                      WS-FWRITE-PARMS-2
     END-CALL.

Now in the Pascal sub:

type
   char_name      = packed array [1..16] of char;
   HFS_file_type  = $alignment 4$
                    record
                      case boolean of
                        true : (path_str  : string[1024]);
                        false: (path_rec  : record
                                  length  : integer;
                                  pathname: packed array[1..1024] of char;
                                            end);
                    end;
   Filename_type      = record
                          file_name :char_name;
                          group_name:char_name;
                          acct_name :char_name;
                        end;
   fwrite_parms_type  = record
                          file_num:shortint;
                          rec_lgth:shortint;
                          ctl_code:shortint;
                          counter :shortint;
                          error_no:shortint;
                          proc_no :shortint;
                        end;
   HPE_status         = record
                          case boolean of
                           true  : (all   :integer);
                           false : (info  :shortint;
                                    subsys:shortint);
                        end;
   e3k_parms1_type    = record
                          rec_type         :integer;
                          process_type     :integer;
                          six_field        :HPE_status;
                          continue_flag    :integer;
                          job_id           :job_id_type;
                          js_logon         :js_logon_type;
                          program_info     :program_info_type;
                          pins             :pins_type;
                          file_access      :integer;
                          posix_file_name  :HFS_file_type;
                        end;
...
...
PROCEDURE get_accessing_users(var overall_status:HPE_status;
                              var file_name     :Filename_type;
                              var HFS_file_name :HFS_file_type;
                              var num_entries   :integer;
                              var proc_no       :integer;
                              var fwrite_parms  :fwrite_parms_type);

...
...
   count_1:= 1;
   repeat
     item_num_array[1] := 2015;
     item_num_array[2] := 2002;
     item_num_array[3] := 2034;
     item_num_array[4] := 2035;
     item_num_array[5] := 2095;
     item_num_array[6] := 2131;
     item_num_array[7] := 2033;
     item_num_array[7] := 0;
     item_array    [1] := addr(job_session_no);
     item_array    [2] := addr(e3k_parms1.pins.proc_pin);
     item_array    [3] := addr(e3k_parms1.program_info.program_name);
     item_array    [4] := addr(e3k_parms1.program_info.program_file_no);
     item_array    [5] := addr(e3k_parms1.file_access);
     item_array    [6] := addr(e3k_parms1.posix_file_name);
     item_array    [7] := addr(e3k_parms1.process_type);
     item_status_array := init_item_status_array;
     overall_status.all:= 0;
     proc_no           := 3;
     GETPRIVMODE;
     AIFPROCGET(overall_status,
                item_num_array,
                item_array,
                item_status_array,,
                pid_array_1[count_1]);
...
...
   until condition...

The AIFPROCGET errors out with a value of +6 in the overall_status.info
field. I believe this is some kind of alignment problem between the
Cobol mainline and the Pascal sub but I have no idea what it could be.

Anybody got any ideas?

TIA,
Brian Donaldson.

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

ATOM RSS1 RSS2