× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi, Tim:

OS/400 or i5/OS does NOT "lock" *PGM objects when they are "in use"
(e.g. when CALLed and "activated" in one or more jobs), presumably because
on the older, much slower IMPI CISC machines, the overhead cost of doing so
was considered to be too high, especially on the early System/38 machines.

So your proposed technique will not work unless you add some code to
every such *PGM that you want to be able to detect if "active", such as:

ThisPgm:    PGM
    ALCOBJ  ((ThisPgm  *PGM *USE))
/* the rest of the program goes here ... */
    . . .
    DLCOBJ  ((ThisPgm  *PGM *USE))
    RETURN
    ENDPGM

I think IBM could "fix" this, as RISC based AS/400e and iSeries servers
are so much faster than the old IMPI/CISC machines, so I don't think the
overhead would be that bad...

In case you think this issue is not all that important, consider problems
this
lack of locking can (and does) cause for customers who try to run their
iSeries systems 24x7, and need to update/replace certain programs with new
versions. Since there is no architected way (above the MI layer) to detect
if a program is "in use", we must go through extra steps to safely replace
*PGMs (or *SRVPGMs) such as the REPLACE(*YES) option on all IBM
create (compile) commands. You cannot safely RSTOBJ a *PGM from a
savefile or tape directly into a "live" production library, lest you cause
active
jobs using that *PGM to "fail".

If IBM wanted to fix it in such a way as to allow for (optional) 100%
compatibility with the current behavior, perhaps they could add a new
system value, something like QLCKPGMOBJ, which can be set to
0=false (don't lock) or 1=true (lock).

The same problem/issue exists for *SRVPGMs, too.

Sincerely,

Mark S. Waterbury

----- Original Message -----
> From: "Tim Kredlo" <TKredlo@xxxxxxxxxxxxxxxx>
> To: <MIDRANGE-L@xxxxxxxxxxxx>
> Sent: Tuesday, February 15, 2005 6:00 PM
> Subject: AlcObj
>

> Help !!
>
> I am unable to see what I am doing wrong here.
> (probably missing something simple)
>
> The following CL displays "&Active = N" even when the program 'SORENTCL'
is
> running.
>
> I far as I can tell, the 'MONMSG' is not "firing", but I don't know why.
>
> If I copy the "AlcObj" line to the clipboard, paste it to a command line,
> and "Enter",
> I get "Cannot allocate object SORENTCL.", which is what I am expecting.
>
>
____________________________________________________________________________
> CL Program IACLTK:
>
___________________________________________________________________________-
> _
> Pgm
>
> Dcl Var(&Active) +
>     Type(*Char) +
>     Value('N') +
>     Len(1)
>
> AlcObj Obj((ExPrdPgm/SORENTCL *Pgm *Excl)) Wait(0)
> MonMsg MsgId(CPF1002 CPF1040 CPF1085) Exec(Do)
>        ChgVar Var(&Active) +
>               Value('Y')
> EndDo
>
> DspPgmMsg Msg(('&Active = ' || &Active ))
> DlyJob Dly(000002)
>
____________________________________________________________________________
> JobLog:
>
____________________________________________________________________________
> call iacltk
>   1800 - ALCOBJ OBJ((EXPRDPGM/SORENTCL *PGM *EXCL)) WAIT(0)
>   2400 - DSPPGMMSG MSG('&Active = N')
> &Active = N
>   2500 - DLYJOB DLY(000002)
>
____________________________________________________________________________
>
>
> TIA
>
> Tim Kredlo
> Exterior Wood, Inc
>
>
>
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.