how we retrieve records without using key field (ex:name)
from Physical File through RPG in as/400?

Answer Posted / kumar vikas

Ffile1 I F E DISK (no keyfield is given)
C
C *start setll file1
OR
C 1 setll file1
C
C read file1
C dow not %eof
C id dsply
C name dsply
C read file1
C enddo

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1317


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?

624


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.

2201


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

715


can I touch the array during treatments?

761






what was the robotech rpg?

689


what are the key words you must use when using a subfile?

694


what is program status data structure?

1392


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?

519


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1566


how do I declare a minor?

718


what is a rpg?

705


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...?

1466


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?

496


how can you display specific subfile page on the screen in unequal subfile?

677