AS400 Display: Radio Button (SNGCHCFLD)

Radio button can be added to the AS400 Display.
In the below code we have added a Radio button with 2 option 'Today' or 'Tomorrow'

DSPF:

A            OPTION         2Y 0B  3 42SNGCHCFLD          
A                                      CHOICE(1 'Today')  
A                                      CHOICE(2 'Tomorrow')



The OPTION can be used used in RPG program as

PGM:

  If Option =  1 ;                
   Msg = 'Today';            
  ElseIf Option = 2 ;            
   Msg = 'Tomorrow';        
  EndIf;                            

Comments

Popular posts from this blog

AS400 : Add a new line in text in email SNDSMTPEMM

AS400 Display File: Check Box (MLTCHCFLD)