AS400 CL PGM Send a message to QSYSOPR and get reply from user to perform a process
PGM
DCL &MSGKEY *char 4
DCL &RPLY *char 1 ' '
SNDPGMMSG MSG('Dont have enough Space. Type Y after clear some space or N to stop prcess (Y/N)') +
KEYVAR(&MSGKEY) MSGTYPE(*INQ) TOMSGQ(QSYSOPR)
RCVMSG MSGTYPE(*RPY) MSGKEY(&MSGKEY) WAIT(*MAX) MSG(&RPLY)
if (&RPLY = 'Y') do
sndpgmmsg 'Program Continue'
Enddo
if (&RPLY = 'N') do
sndpgmmsg 'Program Stopped'
Enddo
ENDPGM
Comments
Post a Comment