10 pts.
 RPGILE, How can i refresh thefields of display file without moving *blanks to every field….
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

Answer Wiki:
Have you looked at the RESET opcode? It sounds like what you're asking for. Bruce Vining
Last Wiki Answer Submitted:  February 18, 2008  10:41 pm  by  bvining   6,055 pts.
All Answer Wiki Contributors:  bvining   6,055 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 605 pts.

 

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.

 2,195 pts.

 

Or simply use

CLEAR Record_format.

 470 pts.