Question

  Asked: Feb 18 2008   7:22 AM GMT
  Asked by: Rashif


RPGILE, How can i refresh thefields of display file without moving *blanks to every field....


RPGILE

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?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0



Have you looked at the RESET opcode? It sounds like what you're asking for.

Bruce Vining
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Kevleemor  |   Feb 19 2008  3:51PM GMT

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

 

Sloopy  |   Feb 20 2008  9:12AM GMT

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.

 

TSCHMITZ  |   Feb 21 2008  6:01AM GMT

Or simply use

CLEAR Record_format.