How to update only a field of a PF in an RPG program.
I don't want to update the record, only one field.
Answer Posted / s.kumar
If file FileA has fields field1, field2, field3, and we
want to write out field2 only ...
C...except..Change
OfileA...E...Change
O...............field2
Hope it will work fine.
For Free Format try out following...
Update Recformat %fields(field2);
| Is This Answer Correct ? | 33 Yes | 1 No |
Post New Answer View All Answers
what is program status data structure?
how can you display specific subfile page on the screen in unequal subfile?
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
what is kids-rpg?
how do I declare a table or array in rpg iv?
What is the difference between copybooks and subprocedures in as400?
do you use message subfiles? What are the necessary keywords required coding a message subfile?
how does the rpg element work?
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
When it is desirable to describe files Internally?
What is file identifier where we can use?
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.