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

Answers were Sorted based on User's Feedback



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

Answer / mathan kumar

It is Possible by Declare the pf file as a primary file
then you can access the records from pf by using the pf
fields in the program....

Is This Answer Correct ?    26 Yes 3 No

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

Answer / prashant singh

Yes . By using RPG logic cycle.

Is This Answer Correct ?    16 Yes 1 No

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

Answer / rosh

above both answers are correct,as well if you use the flat
file and define this flat file as peogram decribe file and
define pre - run time array with file, so when program get
active, records will derectly comes to array.

Is This Answer Correct ?    4 Yes 0 No

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

Answer / baratiya

File information DS can be used for this purpose as well.

Ffile1 IF E INFDS(fileinfo)
Dfileinfo DS
rcds *Records

Is This Answer Correct ?    2 Yes 1 No

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

Answer / 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

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

Answer / sai829

H Rosh,
CAN YOU PLEASE Elaborate your answer.i.e how to Define pre - run time array with file in RPG?...Thanks in Advance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More RPG400 Interview Questions

can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


1.How can you search an entire source file for a particular field name? 2.How can you find the differences between two versions of the source for the same program? 3.What is a hidden field as it relates to a sub file? 4.How do you display a sub file that has no records in the sub file?

8 Answers   HCL,


1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?

2 Answers   HSBC,


There is a excel sheet having details of Old account number and new account number. I need to update these details in my AS400 files. i.e. all the records having old account number should be replaced with new account number. There can be 100 or 200 or 300 PFs...no fix files known. how can we do this?Solution should be performance oriented

3 Answers   Cap Gemini, IBM,


What are the necessary keywords required to code a message subfile?

3 Answers  






what will happen two jobs have same name are submitted

5 Answers   CTS,


How to declare the pull button in AS/400..

0 Answers  


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

0 Answers   IBM,


I am reading a file in CL program. and MONMSG CPF0864 has arrived means EOF has arrived. Now i want to read this file again. How i can do this?

5 Answers   CitiGroup, Symphony,


Mr.Yallamanda Reddy P thanks for your answer sir,can we use test(D) opcode in RPG/400,if yes please help me by eloborating on that answer by writing a sample code for that sir

2 Answers   iGate,


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

1 Answers  


what procedure should we use to find whether the following operations are successful or not setll setgt chain read reade readp pls tell with example i'm not lazy to read the manual or not lazy to do anything.but sometimes i cannot understand the things given in manual in high level english its little bit complicated for me,i can't understand their way of writing thats why i ask these questions here and find the solution in simple words that i can understand thats the real reason sir.sorry if i had hurt you or disturbed you.please understand my situation.

5 Answers   iGate,


Categories