ALARM (Audible Alarm) keyword for display files

ALARM (Audible Alarm) keyword for display files
ALARM, DSPF keyword-ALARM, dspf keyword, keywords for display file in as400, ALARM keyword in DSPF as400,ibmi, as400 and sql tricks, dspf, display files in as400
DSPF keyword-ALARM

ALARM is a record level keyword to tell IBM i operating system to activate the audible alarm when the record format defined in the DSPF with which this keyword is associated is being displayed. The alarm is of short duration.


  1. DSPF using ALARM keyword
  2.      A          R RCD1                                    
         A  10                                  ALARM         

    Here, we defined record format RCD1 and used record level keyword ALARM and associated indicator 10 with it which means when indicator 10 will be then only this keyword would be activated during record format display. Create this DSPF named DSPF_1 using option 14 or CRTDSPF command.Now, we need to create the RPGLE program to display this DSPF record format.

  3. RPGLE program to display record of DSPF using ALARM keyword
  4.      FDSPF_1    CF   E             WORKSTN 
           *in10 = *on;                        
           exfmt RCD1;                         
           *in10 = *off;                       
           *inlr = *on;                        

    In this program, we declared display file DSPF_1 in combined mode to perform both input output operation. Then, we set indicator *IN10 to ON and then EXFMT(write/read) the record format RCD1 of the display file DSPF_1.Once this record format executed. It will first check if indicator associated with ALARM keyword is ON then only OS will activate this audible alarm for the short duration. Therefore, after this EXFMT we will reset this indicator *IN10 to OFF and the last record indicator to ON.

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain