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 we create 300 logical files based on a single physical file using the CRTLF command only once?.
Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the significance of *MAP and *DROP in the CPY command?
suppose one file is used by 100 user and file is locked by 100 user, what are the impact analysis?
Can anybody tell me that why we use option(*nodebugio)in H- Spec?
1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?
I want to add 10 days in current date. how it is possible in CL program...?
How can we override a file during runtime in rpg?
1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?
without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?
what was the robotech rpg?
1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.
can i use UPDDTA command in rpg program in which contains a file