When the RPGCLEAR operation is applied to a record-format name, only output fields in the record format are cleared; input-only fields are not affected by the CLEAR operation. If you need to use the CLEAR operation on input-only fields, try this simple technique.
1. Define a data structure with an external description. Use the name of the input file as the external file.
2. Give the data structure a name (positions 7-12).
3. Use the CLEAR operation code with the data structure name in Factor 2.
All numeric fields will be set to zero, and all character fields will be set to blanks. For an example of this technique, see 6. If you are currently using a series of statements to move blanks or zeros to each field in the file, this technique can ensure that all the fields will be clear should the record format change.
All numeric fields will be set to zero, and all character fields will be set to blanks. For an example of this technique, see Figure 6. If you are currently using a series of statements to move blanks or zeros to each field in the file, this technique can ensure that all the fields will be clear should the record format change.
? Paul Jackson
TechTalk: CLEAR Op Code on Input-only Fields
Figure 6: Using CLEAR on Input-only Fields
*. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 FCUSTMASTIF E K DISK ICSTDTA E DSCUSTMAST * C CUSTNO CHAINCUSTMAST 99 C *IN99 IFEQ *OFF * . * . * . C ELSE C CLEARCSTDTA C ENDIF * C MOVE *ON *INLR *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online