Monika, 
To me your assembler program looks very similar like REXX code. Whatever, 
there are two things to consider, but both deal with the vast overhead of 
creating the ASID as you mentioned and are independent of actual 
implementation:
(a) Daemon vs. server: A daemon uses fork() callable service to clone 
itself. Afterwards, it may change security context and exec the new 
program. And exactly changing security context or identity (that is 
calling setuid() or setgid() callable service) is not  available in same 
ASID as another process. So when you designed your application as daemon 
with change of identity, you explicitly choosed for that overhead of 
creating a new ASID everytime the daemon starts new work. In contrast, a 
server uses a different approach with pthread_security_np() callable 
service in order to set up a new security environment within the same 
ASID. And this "thread" can have a different identity within the same 
ASID.
(b) fork vs. spawn: If there will be no change of identity, you can use 
spawn() callable service together with Unix symbol _BPX_SHAREAS set to YES 
or MUST. I am not sure if the REXX-function bpxwunix will honor that 
symbol. But I think it could be easily emulated by spawn syscall command. 
For assembler it should work with BPX1SPN. In contrast, BPX1FRK creates 
the new process without honoring z/OS specifica, especially _BPX_SHAREAS 
and therefore always results in a new ASID.
Cheers
Michael




Monika Amiss <[email protected]> 
Gesendet von: IBM Mainframe Discussion List <[email protected]>
2011-04-29 11:05
Bitte antworten an
IBM Mainframe Discussion List <[email protected]>


An
[email protected]
Kopie

Thema
assembler batch calling unix daemon






Dear group,
 
I need to call unix-OSNMP from an Assembler pgm which is running in z/OS 
(1.12)-Batch. 
I use 

   Address SYSCALL 
   call bpxwunix ''cmd'',,out.,, __environment. 
 
but as I must call bpxwunix often, the overhead is a problem (each time an 
Asid is created).
What I need is a kind of persistent envirnoment: First establish a process 
and further
on only make my updates. At the end close the environment. Is there 
something like this,
or somebody has another idea how I can call OSNMPD from assembler batch.

  Any hint appreciated
  With best regards
  Monika Amiss 
 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to