CAN WE READ RECORDS WITHOUT USING SETLL,READ,CHAIN IN RPG?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?
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?
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?
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
What are the necessary keywords required to code a message subfile?
what will happen two jobs have same name are submitted
How to declare the pull button in AS/400..
how can you display specific subfile page on the screen in unequal subfile?
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
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.
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.