The following examples apply to using formatted and unformatted prompting when entering or amending an RDML program:

Example 1. Formatted Prompting

Starting display:

No Act  Lbl Command Parameters
 1 P   L10  REQUEST  FIELDS(#ORDER)___________________
 2 __  ___  INSERT   FIELDS(#ORDER #PRODNO #QUANTITY)_ 
 3 __  ___  ________ TO_FILE(ORDERS___________________
 4 __  ___  GOTO     L10______________________________

Resulting display 1- Formatted prompt of REQUEST command:

       Formatted display request (REQUEST) Prompt     +++
Enter the following:
Fields and attributes list :  FIELDS        P
 Field name :                         #ORDER
 Field control attribute  1 :         ___________   
                          2 :         ___________  
                          3 :         ___________  
                          4 :         ___________  
                          5 :         ___________  
                          6 :         ___________  
                          7 :         ___________    
                        + for more                   
Dflt field design method:   DESIGN     P  *IDENTIFY
Dflt identification method: IDENTIFY   P  *DESIGN   
Down/vertical separation:   DOWN_SEP   P  *DESIGN    
Across/horizontal sep:      ACROSS_SEP P  *DESIGN   
Name of browse list:        BROWSELIST P  *NONE      
EXIT key control            EXIT_KEY   P
  Enable the EXIT key:                     *YES 
  If EXIT key used, goto:                  *EXIT
MENU key control            MENU_KEY   P
  Enable the MENU key:                     *YES 
  If MENU key used, goto:                  *MENU

If you make these changes:

Dflt field design method:   DESIGN     P  *IDENTIFY
Dflt identification method: IDENTIFY   P  *COLHDG    
Down/vertical separation:   DOWN_SEP   P  *DESIGN    
Across/horizontal sep:      ACROSS_SEP P  10
Name of browse list:        BROWSELIST P  *NONE      
EXIT key control            EXIT_KEY   P
  Enable the EXIT key:                     *NO
  If EXIT key used, goto:                  *EXIT
MENU key control            MENU_KEY   P
  Enable the MENU key:                     *NO
  If MENU key used, goto:                  *MENU


Resulting display 2 - Re-display of RDML program after changes:

No Act Lbl  Command_Parameters
 1 __  L10  REQUEST FIELDS(#ORDER) IDENTIFY(*COLHDG) 
 2 __  ____ _______ ACROSS_SEP(10)________________
 3 __  ___  _______ EXIT_KEY(*NO) MENU_KEY(*NO)___
 4 __  ___  INSERT  IELDS(#ORDER #PRODNO #QUANTITY) 
 5 __  ____ _______ TO_FILE(ORDERS)_______________
 6 __  ___  GOTO    L10___________________________

Example 2. Unformatted Prompting

Starting display:

 No Act Lbl  Command    Parameters
  1 __  L10  REQUEST    FIELDS(#ORDER)_________________
  2 U   ___  INSERT     FIELDS(#ORDER #PRODNO #QUANTITY) 
  3 __  ___  __________ TO_FILE(ORDERS)________________
  4 __  ___  GOTO       L10____________________________

Resulting display 1 - Unformatted prompt of the INSERT command:

Insert new record into file (INSERT) prompt:

FIELDS(#ORDER #PRODNO #QUANTITY) TO_FILE(ORDERS)____
____________________________________________________
____________________________________________________


Resulting display 2 - User changes the command:

Insert new record into file (INSERT) prompt

FIELDS(#ORDER #PRODNO #QUANTITY #DATDUE #TOTAL #ADD1 
#ADD2 #ADD3 #ADD4 #TOTLIN) TO_FILE(ORDERS)__________
VAL_ERROR(L10)______________________________________
____________________________________________________
____________________________________________________


Note that the insert and delete keys can be used on this prompt which allows the command parameters to be "pushed" off one line and onto the next line. This is very useful when a lot of changes must be made in the middle of the command.

Resulting display 3 - Re-display of RDML program after changes:

 No Act Lbl  Command    Parameters
  1 __  L10  REQUEST    FIELDS(#ORDER)________________________
  2 __  ___  INSERT     FIELDS(#ORDER #PRODNO #QUANTITY #DATDUE 
  3 __  ___  _________  #TOTAL #ADD1 #ADD2 #ADD3 #ADD4 #TOTLIN) 
  4 __  ___  __________ TO_FILE(ORDERS)_______________________
  4 __  ___  __________ VAL_ERROR(L10)________________________
  5 __  ___  GOTO       L10___________________________________
Note: If command key F12 is taken from the prompt screen following any changes to the command, all changes will be lost and the command will revert to its original value.

Example 3. Field List Prompting

Starting display:

 No Act Lbl  Command     Parameters
  1 F   ___  GROUP_BY    #ORDERDATA_______________________
  2 __  ___  INSERT      FIELDS(#ORDERDATA) TO_FILE(ORDERS)
  3 __  ___  GOTO        L10______________________________


Resulting display 1 - Field list prompt of a GROUP_BY command:

Group fields into a named list (GROUP_BY) prompt

  1     GROUP_BY   #ORDERDATA_____________________________
        __________________________________________________
        __________________________________________________ +
 
Full/partial name of fields to be chosen from data dictionary: ______
Full/partial name of files from which fields are to be chosen: ORDERS

 
Resulting display 2 - Selection of fields to add to GROUP_BY command:

Group fields into a named list (GROUP_BY) prompt

  1     GROUP_BY   #ORDERDATA______________________________
        ___________________________________________________
        ___________________________________________________ +
                                                                         
 
 
Full/partial name of fields to be chosen from data dictionary:
Full/partial name of files from which fields are to be chosen: ORDERS
 
Sel_Field__Description__________________TypeLenDec_Selected from__
 X ORDER    Order number                  A   6   ORDERS.QGPL
 X PRODNO   Product number                A   7   ORDERS.QGPL
 X QUANTITY Quantity ordered              P   9 2 ORDERS.QGPL    +

 
Resulting display 3: Field list prompt of a GROUP_BY command

Group fields into a named list (GROUP_BY) prompt

 1  GROUP_BY   NAME(#ORDERDATA) FIELDS((#ORDER)(#PRODNO)
               (#QUANTITY))_____________________________
               _________________________________________ +
                                                                         
 
Full/partial name of fields to be chosen from data dictionary:
Full/partial name of files from which fields are to be chosen: ORDERS
 
Sel Field     Description             TypeLenDec Selected from  
    ORDER     Order number              A   6   ORDERS.QGPL
    PRODNO    Product number            A   7   ORDERS.QGPL
    QUANTITY  Quantity ordered          P   9 2 ORDERS.QGPL    +

Resulting display 4 - Re-display of RDML program after changes:

 No Act Lbl  Command    Parameters
  1 __  ___  GROUP_BY   NAME(#ORDERDATA) FIELDS((#ORDER)________
  3 __  ___  __________ (#PRODNO) (#QUANTITY))__________________
  2 __  ___  INSERT     FIELDS(#ORDERDATA) TO_FILE(ORDERS)______
  3 __  ___  GOTO       L10_____________________________________
 
Note: If command key F12 is taken from the prompt screen following any changes to the command, all changes will be lost and the command will revert back to its original value.

Example 4. Application Template Prompting

Starting display:

 No Act Lbl  Command    Parameters
  1 __  ___  ********** Display list of products (page_at
  2 __  ___  ********** a time) and_allow the user to____
  2 __  ___  ********** select the one required__________
  3 ET  ___  BBPAT      _________________________________


Note the use of the name BBPAT in the command column. The programmer is indicating that an Application Template called BBPAT is to be invoked by this request. The name can be omitted to cause a list of all templates to be displayed, or specified generically to cause a partial list of templates to be displayed.

Resulting display 1: Code generated by the template is inserted

Note that any "question & answer" interaction that the Application Template used is omitted from this example. Any such interaction would take place in a pop-up window overlaying the lower half of the RDML edit screen, just as it does when an application template is invoked when creating a new function.

1 __  __  **********  Display list of products (page at___
2 __  __  **********  at a time) andallow the user to_____
4 __  __  **********  select the one required_____________
5 __  __  ________    ____________________________________
6 __  __  CHANGE      FIELD(#IO$KEY) TO(UP)_______________
7 __  __  SELECT      FIELDS(#PRODLIST) FROM_FILE(PRODMST)
8 __  __  EXECUTE     SUBROUTINE(PROD$DISP)_______________
9 __  __  ADD_ENTRY   TO_LIST(#PRODLIST) WITH_MODE(*DISPLAY)


etc, etc...

Example 5. Copy Function Prompting

Starting display:

 No Act Lbl  Command    Parameters
  1 __  ___  DEFINE      FIELD(#ORDNO) TYPE(*CHAR) LENGTH(6)
  2 __  ___  DEFINE      FIELD(#PRODNO) TYPE(*CHAR) LENGTH(7)
  3 EF  ___  DEFINE      FIELD(#QTY) TYPE(*DEC) LENGTH(9)___
 

Resulting display 1: Copy selection screen:

 
 DC@P309905          Copy RDML source by LANSA Editor                  
                                                                       
 Process      : XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX              
 Function     : XXXXXXX    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX              
                                                                       
           Specify details of the function that you may wish           
           to copy RDML code from.                                     
           
             Copy all RDML code . . . .   NO      YES, NO              
             Process name . . . . . . .   XXXXXXXXXX                   
             Function name  . . . . . .   XXXXXXX                      
                                                                       
                                                                       
                                                                       
                                                                       
 F1=Help  F3=Exit  F4=Prompt  F12=Cancel  F14=Messages                 
 

The Copy RDML source by LANSA Editor screen is requesting that you indicate whether to copy an entire or a part of a function.

If you specify YES for the Copy all RDML code input field and valid process and function names, it will copy the entire RDML code from the specified function. If you wish to copy a part of another function or to display another function specify NO for the 'Copy all RDML code' input field and valid process and function names.

The process and function names nominated for copy or display are checked for existence and access rights. If any error occurs the screen will be re-presented with an error message.

IF 'YES' is entered for the 'Copy all RDML code' input field the following screen will appear after copying the entire RDML code.

Resulting display 2 - Entire code copied from another function is inserted:

 No Act Lbl  Command     Parameters__________________________
  1 __  ___  DEFINE      FIELD(#ORDNO) TYPE(*CHAR) LENGTH(6)_
  2 __  ___  DEFINE      FIELD(#PRODNO) TYPE(*CHAR) LENGTH(7)
  3 __  ___  DEFINE      FIELD(#QTY) TYPE(*DEC) LENGTH(9)____
  4 __  ___  BEGINLOOP   ____________________________________
  5 __  ___  REQUEST     FIELDS(#ORDNO)______________________
  6 __  ___  INSERT      FIELDS(#ORDNO #PRODNO #QTY)_________ 
  7 __  ___  ___________ TO_FILE(ORDERS)_____________________
 
                   etc, etc...
 


If 'NO' is entered for the 'Copy all RDML code' input field, the indicated copy range will have to be entered manually by the user.

Resulting display 3 - Display/Copy RDML commands:
 

 
 DC@P309906                Display/Copy RDML Commands                  
                                                                       
 XXXXXXXXXX XXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX             
                                                                       
 No Act Lbl Command     Parameters                                     
     __     *********  Beginning of RDML commands *********          
   1 __     BEGINLOOP                                                  
   2 CC     REQUEST     FIELDS(#ORDNO #PRODNO #QTY)                    
   3 __     INSERT      FIELDS(#ORDNO #PRODNO #QTY) TO_FILE(ORDERS)    
   4 __     CHANGE      #ORDNO *BLANKS                                 
   5 CC     CHANGE      #PRODNO *BLANKS                                
   6 __     ENDLOOP                                                    
     __     *********  End of RDML commands *********                
                                                                       
                                                                       
 F1=Help  F3=Exit  F12=Cancel  F14=Messages                            
 
 

This Display/Copy RDML Commands screen will show the RDML commands of the function you requested to copy or display. If you need to copy one single line, enter action code C or to copy a range indicate CC as a pair. Only C or CC are allowed for the action code.

F6 and F7 can be used to position the display at the start or end of the RDML function.

A Find string with F16 can be used to scan and position the display.

Resulting display 4 - Part of the RDML code is copied and inserted:

 No Act Lbl  Command    Parameters
  1 __  ___  DEFINE      FIELD(#ORDNO) TYPE(*CHAR) LENGTH(6)________
  2 __  ___  DEFINE      FIELD(#PRODNO) TYPE(*CHAR) LENGTH(7)_______
  3 __  ___  DEFINE      FIELD(#QTY) TYPE(*DEC) LENGTH(9)___________
  4 __  ___  REQUEST     FIELDS(#ORDNO #PRODNO #QTY)________________
  5 __  ___  INSERT      FIELDS(#ORDNO #PRODNO #QTY) TO_FILE(ORDERS)
  6 __  ___  CHANGE      #ORDNO *BLANKS_____________________________
  7 __  ___  CHANGE      #PRODNO *BLANKS____________________________