how we retrieve records without using key field (ex:name)
from Physical File through RPG in as/400?
Answer Posted / sujit kumar biswal.
Witout key u can use either SETGT or SETLL.And witought key
these two opcodes work only folloing conditions.
1.U can spesify any sequence no in factor1
2.Also *hival is work with it.
3.Field name work but only for intiger.
so code ur programe as answer4,but just change the *loval
to any sequence no or *hival then readp or any int field
one ex.
F PF/LFNAME IF E DISK
C *HIVAL SETLL RECORDFORMATNAME/PROG.NAME
C DOW %EOF
C READP RECORDFORMATNAME/PROG.NAME
C FIELDNAME1 DSPLY
C FIELDNAME DSPLY
C ENDDO
C EVAL *INLR=*ON
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is the difference between do while and do until?
what is a rpg?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
How can we know running job is batch or interactive?
What is the difference between copybooks and subprocedures in as400?
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?
How would display prime numbers using CL program?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
what is *place and *auto keyword in prtf ?plz explain
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
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?
how does the rpg element work?
how do you use commitment control in rpg?
what is kids-rpg?