=============================================== SEARCH400.COM DEVELOPER TIP June 6, 2001 More developer tips at http://search400.techtarget.com/tipsIndex/0,289482,sid3_tax2f9,00.html =============================================== SPONSORED BY: ARCAD Software =============================================== FREE and Fully Functional Source Code Analyzer (SCA) for RPG, Cobol and ILE Developers. The ARCAD SCA is a UNIQUE and powerful tool that presents your program in a graphical form allowing its logical management rules to be broken down and analyzed with more ease, dramatically reducing the time and resources you spend on maintaining your AS/400 applications. Search400.com members can download a FREE, single user license of the ARCAD Source Code Analyzer at http://www.arcadsoftware.com/ ----------------------------------------- TIP OF THE MONTH WINNERS ----------------------------------------- Congratulations to Shalom Carmel, winner of May's tip prize, a Toshiba DVD player! Shalom will be inducted into our Hall of Fame for his winning tip: Use security audit for your applications, http://search400.techtarget.com/tip/1,289483,sid3_gci549733,00.html Kudos to our runner-up winners: Sudhakar Kunji, Eric Nepsund and Ravinder K. Pal. NEW June PRIZE! Submit a tip and let the votes determine the winner of this month's prize, an AMTc Nightstar Night-Vision Spotting Scope! http://search400.techtarget.com/tipsSubmit/1,289485,sid3,00.html ----------------------------------------- Send a message to get users offline By Mervyn Govender, search400 member Here is a quick way to send informative messages to users who have signed OFF. We have used this method to get users offline, do a quick change to the program and then inform them that the option is available for use again. Code: 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) + 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************************** ======================================================== OTHER DEVELOPER TIPS ======================================================== Search400 members also submitted the following developer tips recently: Display a scrolling message in your RPG application Submitted by Dwight Beech http://search400.techtarget.com/tip/1,289483,sid3_gci557591,00.html Look what SQL Between can do Submitted by Chuck Wakelee http://search400.techtarget.com/tip/1,289483,sid3_gci557594,00.html Batch FTP commands Submitted by Christian Eidsmoe http://search400.techtarget.com/tip/1,289483,sid3_gci556809,00.html Group Job menu Submitted by Michel Addison http://search400.techtarget.com/tip/1,289483,sid3_gci556826,00.html ======================================================== COMMENTS AND FEEDBACK ======================================================== Did you like this tip? Let us know. You can email us at mailto:[EMAIL PROTECTED] with kudos or vituperations. Or go to our Programmer tips page at http://search400.techtarget.com/tipsIndex/0,289482,sid3_tax2f9,00.html to rate this, and other, tips. You may also post your comments in our live Discussion Forums at http://search400.discussions.techtarget.com ======================================================== LIVE SEARCH400 DISCUSSION FORUMS NOW AVAILABLE ======================================================== We've opened up search400 so that it can be a free exchange of great ideas, comments, questions and advice between you and your search400 peers. Check out our latest storage community feature: search400 Discussion Forums, now accessible directly from the search400 home page! Just create your "handle," then you're ready to start posting! Ask a question or two -- or help out your peers by answering them -- in one of four live AS/400-specific Discussion Forums now available at http://search400.discussions.techtarget.com/ ======================================================== If you would like to sponsor this or any techtarget newsletter, please contact Gabrielle DeRussy at mailto:[EMAIL PROTECTED]. ======================================================== If you no longer wish to receive this newsletter simply reply to this message with "REMOVE" in the subject line. Or, visit http://search400.techtarget.com/register and adjust your subscriptions accordingly. If you choose to unsubscribe using our automated processing, you must send the "REMOVE" request from the email account to which this newsletter was delivered. Please allow 24 hours for your "REMOVE" request to be processed.
