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



/*-------------------------------------------------------------------*/
/* */
/* Program . . : ENDSYSEXIT */
/* Description : ENDSYS ENDSBS *ALL exit program */
/* Author . . : Vengoal Chang */
/* Published . : AS400ePaper */
/* Date . . . : February 22, 2012 */
/* */
/* Program function: check condition before ENDSYS ENDSBS *ALL */
/* */
/* Programmer's notes: */
/* Test ENDSBS *ALL , ENDSYS PRERESTRICT EXIT PGM */
/* Set exit point through either the WRKREGINF facility */
/* or the ADDEXITPGM and RMVEXITPGM commands. */
/* */
/* AddExitPgm ExitPnt(QIBM_QWC_PRERESTRICT) Format(PRER0100) + */
/* PgmNbr(*LOW) Pgm(QGPL/ENDSYSEXIT) */
/* */
/* Compile options: */
/* CrtClPgm Pgm( ENDSYSEXIT ) */
/* SrcFile( QCLSRC ) */
/* SrcMbr( *PGM ) */
/* */
/*-------------------------------------------------------------------*/
Pgm ( &RtnInfo +
&Format +
&Action +
&DelayTime +
)

/*-- Parameters: ---------------------------------------------------*/
Dcl &RtnInfo *Char 12
Dcl &Format *Char 8
Dcl &Action *Char 1
Dcl &DelayTime *Char 4

Dcl &PRSE0100 *Char 12
Dcl &PRSE0200 *Char 4

Dcl Var(&LenOfRtn1) Type(*Int) Len(4) +
Stg(*Defined) DefVar(&PRSE0100 1)
Dcl Var(&StatusFlag) Type(*Int) Len(4) +
Stg(*Defined) DefVar(&PRSE0100 5)
Dcl Var(&WaitTime) Type(*Int) Len(4) +
Stg(*Defined) DefVar(&PRSE0100 9)

Dcl Var(&LenOfRtn2) Type(*Int) Len(4) +
Stg(*Defined) DefVar(&PRSE0200 1)

/*-- Global error monitoring: --------------------------------------*/
MonMsg CPF0000 *N GoTo Error

ChgVar &RtnInfo ' '

Select
When (&Format *EQ 'PRSE0100') Do
Chgvar &LenOfRtn1 12
Chgvar &WaitTime %BIN(&delayTime)
If (&Action *EQ '1') Do /* Check */
/*-- End your process which must be ended before ENDSYS --*/
EndTcpSvr Server(*All)
MonMsg TCP0000
EndHostSvr Server(*ALL) EndActCnn(*DATABASE *FILE)
MonMsg TCP0000
DlyJob Dly(300)
EndTcp
MonMsg TCP0000
DlyJob Dly(300)

/*-- After all checking process ended, --*/
/*-- Set status to restricted state can be reached --*/
Chgvar &StatusFlag 1
SndPgmMsg +
Msg('ENDSBS *ALL or ENDSYS PRSE0100 action' +
*BCAT &action) +
ToUsr(*SYSOPR)
EndDo
If (&Action *EQ '2') Do /* Execute */
SndPgmMsg +
Msg('ENDSBS *ALL or ENDSYS PRSE0100 action' +
*BCAT &action) +
ToUsr(*SYSOPR)
EndDo
If (&Action *EQ '3') Do /* Cancel */
SndPgmMsg +
Msg('ENDSBS *ALL or ENDSYS PRSE0100 action' +
*BCAT &action) +
ToUsr(*SYSOPR)
EndDo

Chgvar &RtnInfo &PRSE0100
EndDo
When (&Format *EQ 'PRSE0200') Do
SndPgmMsg +
Msg('ENDSBS *ALL or ENDSYS PRSE0100 action' +
*BCAT &action) +
ToUsr(*SYSOPR)
Chgvar &LenOfRtn2 4
Chgvar %Sst(&RtnInfo 1 4) &PRSE0200
EndDo
EndSelect

Return:
Return

/*-- Error handling: -----------------------------------------------*/
Error:
Call QMHMOVPM ( ' ' +
'*DIAG' +
x'00000001' +
'*PGMBDY' +
x'00000001' +
x'0000000800000000' +
)

Call QMHRSNEM ( ' ' +
x'0000000800000000' +
)

EndPgm:
EndPgm



2012/2/19 Bdietz400 <bdietz400@xxxxxxxxx>

Its even more important to end tcpip if you are using nfs.   We ended up putting an exit program in place to end everything before the endsbs happened.

QIBM_QWC_PRERESTRICT - ENDSYS ENDSBS *ALL pre restricted state processing (called when ENDSBS *ALL is issued).

--
Bryan


On Feb 18, 2012, at 2:23 PM, <franz400@xxxxxxxxxxxx> wrote:

Doing save system before applying cume to v6r1.
The endsbs in the save system never completed.
Cancelled from console, ipled, and started save system again.
It's going.
I see notes that memo to users changed to
endtcpsvr
endhostsvr
endtcp
before an endsbs *all.
Is this the fix to this issue?
Anything in latest cume to resolve this?
ps... we have had many issues lately w/win 7 mapping drive over ifs /home/user directories and breaks in connection-wondering if this is why endsbs not completing.
Jim

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

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




--
Best Regards,

Vengoal Chang

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.