|
I agree, program should check to see if there is a value in QSTRUPPGM
system value, and
use that for start up. of course this needs some more work to end the
subsystems in a more gentle fashion.
On Fri, Jul 21, 2023 at 1:55 PM <dr2@xxxxxxxx> wrote:
Where does it think you're running this from? And what if you're in a
sbs that gets ended? And are you sure you want *ALL sbs's started?? vs
just calling qstruppgm?
On 2023-07-21 14:37, Jerry Draper wrote:
ChatGPT: "Write a program in the IBM CL programming language to endall subsystems then wait one hour and start them again."
(formerly AS/400) systems. To end all subsystems, wait for an hour, and
Response:
********************************************************
IBM CL (Control Language) is the control language used on IBM iSeries
then start them again, you can create a simple CL program with the
following commands:
if needed */
CL
/* Your CL program to end all subsystems, wait, and start them again */
/* End all subsystems */
ENDSBS SBS(*ALL) OPTION(*IMMED)
/* Wait for an hour (3600 seconds) */
DLYJOB DLY(3600)
/* Start all subsystems */
STRTUSRSBS SBSD(QSYS/QSPL) /* Start the system printer subsystem first,
STRTUSRSBS SBSD(*ALL)will end all active subsystems immediately, potentially terminating running
Please note that executing the ENDSBS command with the *IMMED option
jobs without warning. Make sure to consider the impact of ending all
subsystems before running this program in a production environment.
to run CL commands.
To create and run this CL program, follow these steps:
Sign on to your IBM iSeries system with an account that has authority
Use a text editor to create a new source member. Save it with a .CLLEextension (e.g., MYCLPROGRAM.CLLE).
Place the above CL code into the source member and save it.program.
Open a command line on your system and execute the following commands:
CL
CRTCLPGM PGM(MYLIB/MYCLPROGRAM) SRCFILE(MYLIB/QCLSRC) REPLACE(*YES)
CALL PGM(MYLIB/MYCLPROGRAM)
Replace MYLIB with the name of the library where you want to create the
authority to end and start subsystems on your IBM iSeries system. Always
Keep in mind that this program assumes you have the appropriate
exercise caution when performing system-level tasks. It's recommended to
test this program in a non-production environment before running it in a
live system.
****************************************************************************************************************--
Jerry Draper, Trilobyte Software Systems, since 1976
IBM I, Network, and Connectivity Specialists, LAN/WAN/VPN
Representing WinTronix, Synapse, HiT, and others .....
(415) 457-3431 . www.trilosoft.com [1]
Links:
------
[1] http://www.trilosoft.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
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.