How do you know if a record exists without doing a READ and
CHAIN?
Answers were Sorted based on User's Feedback
Answer / avinash
by using file information data structure we can find the
number of records in a file.
| Is This Answer Correct ? | 18 Yes | 0 No |
Answer / david lex
setll KeyA FileA;
if %equal( FileA );
...
endif;
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / rizwan
Without using Prg if you want to check the records of a Pf
through command line you can use
DSPFD (Display File Description)
which gives you the Total number of records as well as
deleted records in a PF.
| Is This Answer Correct ? | 5 Yes | 1 No |
PGM PARM(&NBRRCD)
DCL &NBRRCD TYPE(*DEC) LEN(10 0)
RTVMBRD FILE(STR) MBR(*FIRST) +
NBRCURRCD(&NBRRCD)
ENDPGM
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sravs
We Can Done THis By using Setll with %found also..
| Is This Answer Correct ? | 0 Yes | 5 No |
How can we read a particular record from the database file which is not having DDS (Flat File). For example, there are 100 records in the flat file. How can we retrive 15th record in RPG/400 program (Without using CL)
difference betwen keywords and opcodes
What will be the value of STRING after line 0106 is executed in the code below? 0101 E* Fromfiletofile..tabnameprnentlenpdatabnamlenpda 0102 E ARR 8 1 0103 ISTRING DS 0104 I 1 8 ARR 0105 C MOVE *BLANK STRING 0106 C MOVEA'ABC' ARR A) 'AAAAAAAA' B) 'BBBBBBBB' C) 'CCCCCCCC' D) 'ABC ' E) ' ABC'
what is flat file?
i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?
there is any limit to display the members in rpg400?
How to print Superscript / Subscript from RPG400
What is a record lock error?
How to change the name of physical members Dynamically?
Difference between RESET and CLEAR
Can an indexed file be accessed in arrival sequence in RPG?
what is file information data structure?