More on sending message to a screen

More on sending message to a screen

Here is a quick way which we have used the same method to send informative messages to users who have signed OFF. This is helpful when you have to get users offline do a quick change to the program and then inform them that the option is available for use again.


 		 
Allows for change of message 
(driver cl - executed by a command)
Windowcl
 *************** Beginning of data ************************************* 
 PGM                                                                     
              DCLF       FILE(SYSLIB/WINDOWDF)                           
              RTVDTAARA T1 &HEAD                                         
              RTVDTAARA M1 &DET1                                         
              RTVDTAARA M2 &DET2                                         
              RTVDTAARA SCRTIM &TIM                                      
  RCV:        SNDRCVF       RCDFMT(WINDOWDF)                             
              MONMSG CPF0000 EXEC(GOTO END)                              
              IF         COND(&IN01) THEN(GOTO CMDLBL(END))              
              CHGDTAARA T1 &HEAD                                         
              CHGDTAARA M1 &DET1                                         
              CHGDTAARA M2 &DET2                                         
              CHGDTAARA SCRTIM &TIM                                      
              SBMJOB     JOB(WINDOW) JOBD(QPGMR) JOBQ(QINTER) +          

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts including news, tips, and advice to help you do your job more efficiently and effectively. Stay informed on the hottest topics and biggest challenges faced by IT professionals working with iSeries products and services.

    By submitting your registration information to Search400.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of Search400.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

RQSDTA('CALL SYSLIB/WINDOW1CL') END: ENDPGM ****************** End of data **************************************** Window1cl *************** Beginning of data ********************************** PGM DCLF FILE(SYSLIB/MSGDEVP) DSPOBJD OBJ(QSYS/*ALL) OBJTYPE(*DEVD) + OUTPUT(*OUTFILE) OUTFILE(SYSLIB/MSGDEVP) RCV: RCVF RCDFMT(QLIDOBJD) MONMSG CPF0000 EXEC(GOTO END) CALL WINDCL &ODOBNM GOTO RCV END: CLRPFM FILE(SYSLIB/MSGDEVP) ENDPGM Sends the message Windcl *************** Beginning of data ************************************ PGM PARM(&VAR) DCLF FILE(SYSLIB/WINDDF) DCL VAR(&VAR) TYPE(*CHAR) LEN(10) DCL VAR(&TIM) TYPE(*DEC) LEN(3 0) RTVDTAARA SYSLIB/SCRTIM &TIM RTVDTAARA T1 &TITLE RTVDTAARA M1 &MSG1 RTVDTAARA M2 &MSG2 OVRDSPF FILE(WINDDF) DEV(&VAR) WAITRCD(&TIM) SNDRCVF DEV(*FILE) RCDFMT(TESTREC1) WAIT(*NO) MONMSG CPF0000 EXEC(GOTO SKIP ) WAIT MONMSG CPF0000 SNDPGMMSG ('MESSAGE DISPLAYED AT ' || &VAR) SKIP: ENDPGM ****************************************** WINDF Actual screen with message which is sent XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X X X OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO X X X X This is a message from I.S. (Tel XXXX) X X X X OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO X WINDOWDF Allows for capture of simple message Send Message to Signed Off Workstations Heading: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB Detail1: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB Detail2: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB X X X OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO X X X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SKIP: ENDPGM WINDOWCL *************** Beginning of data ********************************** PGM DCLF FILE(SYSLIB/WINDOWDF) RTVDTAARA T1 &HEAD RTVDTAARA M1 &DET1 RTVDTAARA M2 &DET2 RTVDTAARA SCRTIM &TIM RCV: SNDRCVF RCDFMT(WINDOWDF) MONMSG CPF0000 EXEC(GOTO END) IF COND(&IN01) THEN(GOTO CMDLBL(END)) CHGDTAARA T1 &HEAD CHGDTAARA M1 &DET1 CHGDTAARA M2 &DET2 CHGDTAARA SCRTIM &TIM SBMJOB JOB(WINDOW) JOBD(QPGMR) JOBQ(QINTER) + RQSDTA('CALL SYSLIB/WINDOW1CL') END: ENDPGM ****************** End of data *************************************

This was first published in May 2001

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.