as400 interview questions and answers-Part 11

1. What is ASSUME, OVERLAY, KEEP in as400? Give example of how to use ASSUME, OVERLAY, and KEEP?




·         If we want to specify that the OS/400 program is to assume that this record is already shown on the display            when the file is opened.

·         Use this keyword to receive data that a previous program has left on the display.

·         If we don’t use this keyword then the display screen of the previous display file goes blank when the new display screen is opened. To avoid this situation we use ASSUME keyword along with overlay.

·         OVERLAY keyword allows the overlaying of fields on this record without erasing the entire display. 

·         ASSUME is placed on a format that a program is supposed to pretend is on the screen.

·         It is mainly used for display files that present windows.

·         It is not placed on the window itself, but a dummy non window format.




·         If we want to Keep the display from being deleted when the display file is closed.

·         It avoids the flicker that happens when we are returning to the previous display file after closing the current one. E.g. We press F4 on the main screen to display a window and then when we return from this window a flicker happens. To avoid this we use this KEEP keyword.

*** For example of ASSUME, OVERLAY, KEEP,  please refer: Click here...



2. Give example of EDTCDE keyword in as400?


EDTCDE (Edit Code)

·         This keyword is used to edit output-capable numeric fields.

·         Edit code, depending upon the data type edits the contents.


ü  By using it, the field can be punctuated with commas and periods. E.g. 1,000.50

ü  Negative values can be printed with a minus sign or CR to the right. E.g. 100.50CR, 100.50-

   A Interest    5 2                  1 10EDTCDE(J)



ü  A currency symbol can be printed with the help of this keyword. E.g. 100.50$

   A Salary     7 2                 2 10EDTCDE(K $)



ü  The value can be padded with zeros at the left instead of blank padded. E.g. To print 000125.50 instead of XXX125.50 (where X=blank)

ü  Date can be formatted with the keyword EDTCDE(Y). E.g. 1/12/99

ü  Zero values can be printed as zeros or blanks as per the requirement.

ü  Use EDTCDE(Z) to remove ‘,’ separator in the field value.

   0009.00      A            OPENDT         8P 0       COLHDG('OPEN DATE')        

   0010.00      A                                      EDTCDE(Z)                  

   0011.00       * EDTCDE(Z) REMOVES COMMAS.. 


*** For more examples on EDTCDE please refer: Click here...




User Comments:

Copyright ©, 2013-2023. Copyright notice   Terms of services   Privacy policy