×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Assuming that this is an RPG program, why not use the SHTDN operation in the
program?  This is an easy way to do a controlled shutdown of a program.

SHTDN will tell you if:
 1) the system has been ended {ENDSBS SBS(*ALL) OPTION(*CNTRLD)},
2) the subsystem that the job is running in has been ended {ENDSBS
SBS(YOURSBS) OPTION(*CNTRLD)},
3) OR if an ENDJOB OPTION(*CNTRLD) has been issued against a running job.

When I need to make a program perform an orderly shutdown, this is the
technique that I use.

I also make sure that the system administrator/operator knows that they
should FIRST use the controlled end option (on these commands) and wait 5
minutes or so before issuing the immediate option.  This gives the program
time to shut itself down before the system/subsystem ends...

Steve Landess
Austin, Texas
(512) 423-0935


----- Original Message -----
From: "Dan" <dbcemid@yahoo.com>
To: <midrange-l@midrange.com>
Sent: Wednesday, December 11, 2002 1:37 PM
Subject: Re: Suggestion for a new System Request option


> Seeing as I wouldn't hold my breath waiting for IBM to do anything with
> this, even if you submitted a proper request, I'd suggest another way.
>
> There are ways for one job to access another job's QTEMP library.  This
> gets under the covers a bit and I'm not certain whether the technique
> uses supported APIs.  But I have seen the MI guys talking about this.
>
> So, assuming you can get access to another job's QTEMP, you *should* be
> able to accomplish pretty much what you're asking for.  Not as easy as
> a Systems-Request thingy, but more flexible, as you'd be able to use
> this in batch jobs as well.
>
> HTH, Dan
>
> --- Albert York wrote:
> > >The System/36 used to have an option on the system request menu
> > which was
> > >called something like 'Set latch flag'. All it did was turn on an
> > indicator
> > >that you could test in your program. Then your program could take
> > the
> > >appropriate action. I used it for ending long searches for example.
> > I would
> > >really like to see something like that on the AS/400. Right now the
> > only
> > >choice we have is to end the whole program, which is pretty heavy
> > handed.
> > >
> > >Here is what I suggest.
> > >
> > >1.      In your program, create a data area in QTEMP with a name
> > like
> > >QSYSRQSOPT. It would be 51 bytes long. The first 50 bytes would
> > contain a
> > >description (i.e. 'End Search').
> > >2.      When the user presses System Request the description is
> > displayed as
> > >an option.
> > >3.      If the option is taken then the last byte of the data area
> > is set to
> > >'1'.
> > >4.      Your program could check the data area periodically. If the
> > flag is
> > >set then it is time to cancel what it is doing.
> > >
> > >It seems like this wouldn't be too difficult to implement.
> > >
> > >Albert York
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> 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-2026 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.