× 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.



Jim -

This is the call of the SAVSYS on one of our systems.  It was adapted from
QMNSRBND (On previous advice from Al.)  I used to also do the ENDHOSTSVR
SERVER(*ALL) separately, I changed this after V5R1 when I was told that it
was now included in the ENDTCP.  In a nutshell I issue an end to the things
that need a little extra time to shut down gracefully, then do a little
delay before dropping everything else.  If your QTFTPxxxxx jobs are truly
hanging on for an hour and a half you might want to issue ENDTCPSVR
SERVER(*FTP) well before calling your backup (if that is practical)  My
guess is that some external factor(connection not closing) is causing them
to hang, is your FTP Inactivity timeout set high?  Maybe you could try
CHGFTPA INACTTIMO(300)

What Al is talking about is more or less the code from LOOP on below.  This
basically reissues the ENDSBS *ALL every 15 seconds untile the system gets
to a restricted state and then continues.  LIMIT30 sends a message to the
calling MSGQ if all SBS's don't end in 30 minutes. 

BKPENDSYS:  PGM        PARM(&TAPEDEV &IPL)                              
            DCL        VAR(&TAPEDEV) TYPE(*CHAR) LEN(10)                
            DCL        VAR(&IPL) TYPE(*CHAR) LEN(1)                     
            DCL        VAR(&LOOPCNT) TYPE(*DEC) LEN(3 0) VALUE(1)       
            DCL        VAR(&MSGTXT) TYPE(*CHAR) LEN(1)                  

            TECH/ENDQP                  <:::::                             
            TECH/ENDMQ                    <::::: Ends these applications

            CALL       PGM(TECH/ENDOPT) <:::::        ~gracefully~

                                                                       
            ENDSBS     SBS(QSNADS) OPTION(*IMMED)                    
            MONMSG     MSGID(CPF1054) /* No subsystem QSNADS +       
                         active. */                                  
                                                                       
            ENDTCPSVR  SERVER(*HTTP)                                 
            ENDNFSSVR  SERVER(*ALL)                                   
                                                                       
            DLYJOB     DLY(60)                                       
                                                                       
            ENDTCP                                                    
            MONMSG     MSGID(TCP5713) /* There were no active DHCP +  
                         jobs, end request ignored. */                
                                                                        
LOOP:       ENDSBS     SBS(*ALL) OPTION(*IMMED)                       
            MONMSG     MSGID(CPF1035 CPF1001) EXEC(GOTO +             
                         CMDLBL(DELAY)) /* Subsystems ending with +   
                         *IMMED option. */                            
            GOTO       CMDLBL(ENDSBSDONE)                             
                                                                        
DELAY:      RCVMSG     MSGTYPE(*EXCP) RMV(*YES)                       
            IF         COND(&LOOPCNT *LT 119) THEN(DO) /* 30 minute + 
                         limit */                                     
            DLYJOB     DLY(15)                                        
            CHGVAR     VAR(&LOOPCNT) VALUE(&LOOPCNT + 1)              
            GOTO       CMDLBL(LOOP)                                   
            ENDDO                                                     
            ELSE       CMD(GOTO CMDLBL(LIMIT30))                      
                                                                        
ENDSBSDONE: RCVMSG MSGTYPE(*LAST) RMV(*YES)                           
            CALL       PGM(TECH/BKPSAVSYS) PARM(&TAPEDEV &IPL +      
                         &JOBNAME)                                   
            GOTO       CMDLBL(END)                                   
                                                                       
LIMIT30:    SNDPGMMSG  MSGID(CPA3712) MSGF(*LIBL/QCPFMSG) +          
                         TOPGMQ(*EXT) MSGTYPE(*INQ)                  
            RCVMSG     PGMQ(*SAME) MSGQ(*PGMQ) MSGTYPE(*RPY) +       
                         WAIT(*MAX) RMV(*YES) MSG(&MSGTXT)           
            IF         COND(%SST(&MSGTXT 1 1) *EQ 'G') THEN(DO)      
            CHGVAR     VAR(&LOOPCNT) VALUE(1)                        
            GOTO       CMDLBL(LOOP)                                  
            ENDDO                                                    
                                                                       
END:        ENDPGM 


Regards,

Scott Ingvaldson
AS/400 System Administrator
GuideOne Insurance Group                                                  

-----Original Message-----
date: Mon, 24 Nov 2003 15:57:03 -0500
from: Al Barsa <barsa@xxxxxxxxxxxxxxxxxxx>
subject: Re: Ending TCP/IP, FTP jobs in QSYSWRK


GO SAVE option 21, sits in a loop issuing the ENDSBS *ALL *IMMED command.
It issues it every "n" seconds (last time I looked it was 15, but that was
many releases ago), and then re-issues the same command.  On the re-issue,
it monitors for CPF1035, and when it doesn't get that message, it knows
that the system has achieved a restricted state, and goes for the SAVSYS.

Al

Al Barsa, Jr.
Barsa Consulting Group, LLC

400>390

914-251-1234
914-251-9406 fax

http://www.barsaconsulting.com
http://www.taatool.com


                                                                           
-----Original Message-----
message: 1
date: Mon, 24 Nov 2003 14:44:18 -0600
from: Jim Damato <jdamato@xxxxxxxxxxxxxxxxx>
subject: Ending TCP/IP, FTP jobs in QSYSWRK

What's the best way to bring down the system for IPL or full system save?
We've been running ENDSBS *ALL *IMMED, but we've had intermittent problems
with TCP/IP jobs in QSYSWRK taking forever to end.  Occasionally some
QTFTPxxxxx jobs will hang on for an hour and a half (or more).

I was thinking of trying ENDTCP OPTION(*IMMED) ENDSVR(*YES) or ENDTCPSVR
SERVER(*FTP) or ENDTCPSVR SERVER(*ALL) before our ENDSBS *ALL.  We don't
have a lot of opportunities to experiment, so I thought I'd ask around.

Much thanks in advance...

-Jim


James P. Damato
Manager - Technical Administration
Dollar General Corporation
<mailto:jdamato@xxxxxxxxxxxxxxxxx>
   
This message and accompanying documents are covered by the Electronic
Communications Privacy Act, 18 U.S.C. §§ 2510-2521, and contains information
intended for the specified individual(s) only. This information is
confidential. If you are not the intended recipient or an agent responsible
for delivering it to the intended recipient, you are hereby notified that
you have received this document in error and that any review, dissemination,
copying, or the taking of any action based on the contents of this
information is strictly prohibited. If you have received this communication
in error, please notify us immediately by e-mail, and delete the original
message.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.