[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1038.0. "Problem with OA$STATUS under A1 2.4 ?" by VCOU03::ASHWORTH (Lost on an island) Mon Jul 13 1992 20:09

Hi. I am trying to write what should be a very simple script:

ATTACH SPECIFIC_USERNAME	!Attempt to attach to a specific process
IFNOTSTATUS SPAWN DCL_COM_FILE	!If ATTACH fails then SPAWN

However, OA$STATUS is not set until after the script completes, and control is
returned to the user. Is this the way it should work, or is this a bug.

Thanx, Neil
T.RTitleUserPersonal
Name
DateLines
1038.1Use .IF NOT OA$STATUS THEN SPAWN?WAYLND::HOWARDOur business is computers not moneyMon Jul 13 1992 22:157
    I believe IFNOTSTATUS only works on a continuation line, such as
    
    ATTACH SPECIFIC_USERNAME \IFNOTSTATUS\SPAWN DCL_COM_FILE
    
    I think you would want to check OA$STATUS yourself.  
    
    Ben
1038.2.1 is right but there is more to the storyACUMEN::VICKERSRearranging the DEChairsTue Jul 14 1992 02:5726
    Ben answer is correct as far as it goes but there is more to the
    problem.  Mainly, ATTACH and SPAWN do not set OA$STATUS properly in V2. 
    I just tried 

    <ATTACH USER_SPECIFIC \GET OA$STATUS

    and the following were in the message buffer:

                                   Messages                                

     %OA-W-ATTACHFAIL, Error attempting to ATTACH to process "USER_SPECIFIC"
     -SYSTEM-W-NONEXPR, nonexistent process
     %OA-I-LASTLINE, 1
                                                                              
    This was on a V2.4 system and there was, of course, no process named
    USER_SPECIFIC.  On a V3.0 system OA$STATUS would be 0.

    The lack of setting OA$STATUS has been discussed in this or the
    previous version of the conference.  I don't recall that there is a
    solution short of resorting to DCL to detect the target subprocess.
    Most applications which use subprocesses use symbols to signal that
    they have created the subprocess. This is imperfect, of course, since
    the subprocess may disappear without affecting the symbols.
    
    Have fun,
    don
1038.3try this little procedure / UDP; change "skinner_slave" to whatever...SKNNER::SKINNERI&#039;m doing my EARSWed Jul 15 1992 22:013
        .FU oa$msg_purge
        .FU attach skinner_slave
        .if oa$msg_id eqs "ATTACHFAIL" then .FU oa$msg_purge\spawn