CAN WE READ RECORDS WITHOUT USING SETLL,READ,CHAIN IN RPG?

Answer Posted / ravikumar895

Hi Sai,

We can read records in so many ways in RPG Program.

1) primary file as file designation

2) file information data structure

3) Using pre-run-time array

0001.00 FFLAT01 IT F 5 DISK
0002.00 DPRE_ARR S 5 DIM(5) FROMFILE(FLAT01)PERRCD(1)
0003.00 C PRE_ARR(1) DSPLY
0004.00 C PRE_ARR(2) DSPLY
0005.00 C PRE_ARR(3) DSPLY
0006.00 C PRE_ARR(4) DSPLY
0007.00 C PRE_ARR(5) DSPLY
0008.00 C SETON LR

OUTPUT :
-----------

AAAAA
BBBBB
CCCCC
DDDDD
EEEEE

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

do you use message subfiles? What are the necessary keywords required coding a message subfile?

786


what is program status data structure?

1559


What is the difference between iter and do?

795


How to handle duplicate error handling in RPG?

1824


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?

590






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

1394


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.

2290


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1981


How to call one program from another program in RPG? please help me with the code

1349


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?

1551


What is a record lock error?

1356


What is the purpose of record level identifier?

805


is this a rpg channel?

771


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

2603


How can we know running job is batch or interactive?

750