HP3000-L Archives

July 2004, 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:
Brian Donaldson <[log in to unmask]>
Date:
Sat, 17 Jul 2004 22:56:11 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (163 lines)
Thanks to all who replied. I discard nothing. All of your emails to me
are saved for future reference.

I received some great suggestions on how to solve this problem.

As I am attempting to do this inside a COBOL/VPLUS app I elected for the
CREATEPROCESS option -- create a process on the program file then call
the "AIFSYSWIDEGET" (area 2000, item 2070) which gives me all the PID's of
open processes with PM caps.

Then I call "AIFPROCGET" intrinsic (item 2070,
general caps list, bit 25=PM).


Scenario:

1st step -- Retrieve all files with codes of 1029 and 1030. This list gives
me the UFID's and file names.group.acct of all the CM (PROG) and NM (NMPRG)
files on the box. Works great.

2nd step -- Retrieve all files on box with PM caps (program files or not, a
limitation of "AIFSYSWIDEGET", can only do one or the other but not both
together).

3rd step -- Create a process on each program file from step one.

4th step -- Call "AIFSYSWIDEGET" (area 2000) item 2070 which gives me all
the PID's of open processes with PM caps.

5th step -- Call "AIFPROCGET" with PID's from step 4 (item 2070, general
resource item 2070, bit 25 = PM) and I retrieve the program-
name.group.acct). This works just fine. I get all the info I need.


Works great for the most part on most program files with one really BIG
*GOTCHA* --

When I call the "CREATE" inrinsic (without ACTIVATE) on a program file,
if that program cannot run (for whatever reason such as ILLEGAL CAPABILITY)
the stupid intrinsic causes the COBOL/VPLUS program to abort(!).

The first file I know of that is causing the program abort (believe it or
not) is LOAD.PUB.SYS --

This file shows up in the list from step one. It is a 1029 program file
(CM). There may be other program files on the box after LOAD.PUB.SYS
which will not run either (for one reason or another).

So how do I stop the CREATE intrinsic from aborting my COBOL/VPLUS app?

TIA,
Brian Donaldson.


On Fri, 16 Jul 2004 15:02:13 -0700, Mark Bixby <[log in to unmask]> wrote:

>Barry Lake wrote:
>
>> At 12:24 AM -0400 7/16/04, Brian Donaldson wrote:
>>
>>>Can anyone out there tell me which AIF(s) I need to use to get the linked
>>>capabilities of a program file (1029 and 1030 file codes).
>>>
>>>I only want to retrieve those program files that have PM caps.
>>
>>
>>
>> Surprisingly, there's no documented API (no intrinsic, no AIF, no
>> well-known internal routine) to get this information directly from a
>> program file programmatically. But there are a number of roundabout ways
>> you could try:
>
>...snip...
>
>> 2) FOPEN (or HPFOPEN) each program file and scan for the general
>>    resource capability bits. Someone else will have to tell you
>>    where to look or how to find them.
>
>It's genuinely scary that I remember this given how long ago it was that I
last
>used the knowledge, but for NMPRG files there is an offset near the
beginning
>of the file that points to the structure that contains the capability
bits.  As
>demonstrated on 7.5:
>
>$2 ($183) nmdebug > symopen symos.osc45.telesup
>$e ($183) nmdebug > map querynm.pub.sys
>1  QUERYNM.PUB.SYS   5cb.0 Bytes = 163e00
>$f ($183) nmdebug > fv 5cb.0 "lst_header"
>
>CRUNCHED RECORD
>    SYSTEM_ID    : 20b
>    A_MAGIC      : 104
>    VERSION_ID   : 5124000
>    FILE_TIME    :
>       SECS     : 3c56fea7
>       NANOSECS : 0
>    HASH_LOC     : 70
>    HASH_SIZE    : 7cf
>    MODULE_COUNT : 1
>    MODULE_LIMIT : 1
>    DIR_LOC      : 1fac
>    EXPORT_LOC   : 1fb8
>    EXPORT_COUNT : 31b
>    IMPORT_LOC   : 1fb4
>    AUX_LOC      : 4c       <==== file offset to the next structure
>    AUX_SIZE     : 24
>    STRING_LOC   : 9bf0
>    STRING_SIZE  : 4410
>    FREE_LIST    : 9b80
>    FILE_END     : 163d40
>    CHECKSUM     : 3b59ddef
>END
>
>
>$10 ($183) nmdebug > fv 5cb.4c "hpe_prog_aux_hdr"
>
>CRUNCHED RECORD
>    HEADER_ID       :
>       MANDATORY : FALSE
>       COPY      : FALSE
>       APPEND    : FALSE
>       IGNORE    : FALSE
>       RESERVED  : 0
>       AUX_TYPE  : 7
>       LENGTH    : 1c
>    ENTRY_NAME      : 0
>    UNSAT_NAME      : 3dc4
>    SEARCH_LIST     : 0
>    CAPABILITIES    : 189      <= 32-bit integer of the cap bits
>    MAX_STACK_SIZE  : 0
>    MAX_HEAP_SIZE   : ffffffff
>    RESERVED        : 0
>    DO_BKWD_BINDING : FALSE
>    BIND_MODE       : FALSE
>    ALLOW_OVERRIDE  : FALSE
>    POSIX           : FALSE
>    MAX_PRIORITY    : 0
>    PRIORITY        : 0
>END
>
>I remember this well because once upon a very long time ago I attempted to
give
>SM capability to an NMPRG by manually tweaking the capability mask field.
>Turned out to be a really great system crasher when I ran the program.  I
>believe more modern versions of MPE give you some sort of nasty loader
message
>when you attempt to run the modified program.
>
>The knowledge of how to do this for PROG files has completely leaked out
of my
>brain, sorry.
>--
>[log in to unmask]
>Remainder of .sig suppressed to conserve expensive California electrons...
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

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

ATOM RSS1 RSS2