IBMi (AS400) fans only - How to add an HELP panel (Minimalist example) to a DSPF - HELP - ALTHELP - HLPARA - HLPPNLGRP

 



#IBMiSample

This is the PANEL source.
Compile with CRTPNLGRP PNLGRP(MyLib/PNLGR1) SRCFILE(MyLib/MySrcFile) SRCMBR(PNLGR1)
 
Member      Type  
PNLGR1      PNLGRP

.***********************************************************
.*    THIS IS HELP PANEL GROUP FOR HOTELIBMi               *
.***********************************************************
:PNLGRP.                                                     
.*********************************************************** 
.*    THIS IS HELP PANEL OTO500                            * 
.*********************************************************** 
:HELP NAME=OTO500.Print arrivals Help panel                  
:P.This is a example help text                               
:P.This is another example help text                         
:EHELP.                                                      
.*********************************************************** 
.*    THIS IS SINGLE FIELD HELP PANEL                      * 
.*********************************************************** 
:HELP NAME=OTDTA0.                                           
Arrival booking date                                         
:xh3. Arrival date                                           
:P. This is the arrival booking date.                        
:P. Fill it with the format DDMMYY and press Enter.          
:EHELP.                                                     
.***********************************************************
.*    THIS IS SINGLE FIELD HELP PANEL                      *
.***********************************************************
:HELP NAME=OTTIP0.                                          
Order type                                                  
:xh3. Type                                                  
:P. This is the order type :hp3.10:ehp3.Arriving :hp3.20:ehp3.Arrived :hp3.30:ehp3.Gone
:P. Fill it with 10, 20, or 30.                             
:EHELP.                                                     
.***********************************************************
.*                                                         *
.***********************************************************
:EPNLGRP.                                                   


This is the Displayfile source:

Compile with

CRTDSPF FILE(MyLib/OTO500V) SRCFILE(MyLib/MySrcFile) SRCMBR(OTO500V)

Member      Type
OTO500V     DSPF

     A                                      DSPSIZ(24 80 *DS3)        
     A                                      CA03(03 'EXIT')           
HELP A                                      HELP                      
HELP A                                      ALTHELP                   
HELP A                                      HLPTITLE('Print arrivals  
HELP A                                      HELP PANEL')              
HELP A                                      HLPSCHIDX(VDOTEST1/PNLGR1)
     A          R HEADER                                              
HELP A          H                           HLPPNLGRP(OTO500 PNLGR1)  
HELP A                                      HLPARA(01 001 01 80)      
HELP A          H                           HLPPNLGRP(OTDTA0 PNLGR1)  
HELP A                                      HLPARA(*FLD OTDTAP)       
HELP A          H                           HLPPNLGRP(OTTIP0 PNLGR1)  
HELP A                                      HLPARA(*FLD OTTIPP)       
     A                                  1 34'Print arrivals'          
     A                                  6 21'Arrival date:'           
     A            OTDTAP         6Y 0B  6 35EDTWRD('  /  /  ')        
     A                                  7 29'Type:'                   
     A            OTTIPP         2A  B  7 35                          
HELP A                                      HLPARA(01 001 01 80)    
HELP A          H                           HLPPNLGRP(OTDTA0 PNLGR1)
HELP A                                      HLPARA(*FLD OTDTAP)     
HELP A          H                           HLPPNLGRP(OTTIP0 PNLGR1)
HELP A                                      HLPARA(*FLD OTTIPP)     
     A                                  1 34'Print arrivals'        
     A                                  6 21'Arrival date:'         
     A            OTDTAP         6Y 0B  6 35EDTWRD('  /  /  ')      
     A                                  7 29'Type:'                 
     A            OTTIPP         2A  B  7 35                        
     A                                 22  2'F1=Help'               
     A                                   + 2'F3=Exit'


This is the RPGLE source:

Compile with

CRTBNDRPG PGM(MyLib/OTO500) SRCFILE(MyLib/MySrcFile) SRCMBR(OTO500)

Member      Type
OTO500      RPGLE

      **FREE                 
       ctl-opt;              
       dcl-f OTO500V workstn;
       dow (1=1);            
       exfmt HEADER;         
         if (*in03);         
           leave;            
         endif;              
       enddo;                
       *inlr = *on;



Try with: CALL OTO500 <Enter>

Next type F1 to see Help Panel




Don't forget to set the screen to 132 columns!


I appreciate all the comments made on this blog.

Comments

Popular posts from this blog

IBMi (AS400) fans only ‘ Memories (IBM Coding Forms)

IBMi (AS400) fans only ' SQLCODE values: Dear readers, unleash your suggestions!