Is there any way in which we can blank out the fields of a display file without actually moving *blanks to every field, say i have 100 flds in my display file and want to refresh their value.
how can i Do it?
Software/Hardware used:
ASKED:
February 18, 2008 7:22 AM
UPDATED:
February 21, 2008 6:01 AM
Rashif, if you want to make sure that every field is set to *blanks/*zero you should use the CLEAR opcode. If you want to set every field to its “Initialization Value” ie *INZSR subroutine values, or INZ data description values you should use the RESET opcode.
Kevin
Create a data structure to contain all the fields from the screen. Then use a single CLEAR operation to the data structure name. This will clear character fields to blanks and numeric fields to zero.
Also, when we have a screen that contains fields which map to a single database record (e.g. D#CUST in the display file comes from CSCUST from the Customer file, etc.), we create a named externally-described data structure for the Customer record, and another exactly the same for the screen, except with a prefix of D# replacing the first 2 characters of each field. Then to load the screen we just EVAL the display structure from the Customer record.
Or simply use
CLEAR Record_format.