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

are there any useful c runtime apis that I can call from rpg iv?

700


what do you mean by an input subfile, what are the keywords required?

773


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

716


what is program status data structure?

1387


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1019






what is kids-rpg?

667


how can I tell when to replace the array?

702


can I touch the array during treatments?

758


how do I preserve and clean the array?

675


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

1968


What is a record lock error?

1267


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

755


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

5412


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

831


is this a rpg channel?

681