How do you find out whether a record is present in the
physical file without reading the file?
for Example Employee No: 100 in an Employee master.How do
we find out whther 100 is present in Employee master
without reading the file?
Answers were Sorted based on User's Feedback
Answer / samul paul
With the help of SETLL using EQ indi,we can check the
existance of record wihtout reading the file.
| Is This Answer Correct ? | 35 Yes | 0 No |
Answer / kaka halwai
100 SETLL Employee master
IF %EQUAL(Employee master)
record is found
Else
Record is not found..
Endif
:-)
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / rashmimalpani
You can do SETLL and then use %found to check whether the
record exist in the file.
Chain itself does the SETLL operation on the file and reads
the subsequent record if match is found.
| Is This Answer Correct ? | 14 Yes | 11 No |
Answer / ld123q44
SETLL described by everyone above is the answer provided the
file has an index by Employee No.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / spmk
Hi.....
With the help of 'File information data structure'
we can find the existence of record in physical file.
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / prasanna
If you Request was thru program then you can do it by SETLL
else DSPPFM or DSPF command
| Is This Answer Correct ? | 1 Yes | 6 No |
*loval setll file
read recor 70
in indicator on norecords in file ,else records in file
| Is This Answer Correct ? | 0 Yes | 5 No |
Answer / srinivas
100 chain filename
if %found
dsply the record
else
display the norerord
endif
or
| Is This Answer Correct ? | 1 Yes | 6 No |
I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?
What you have to do in the display file when you are using message subfile?
can i use unique key in LF
how can you display specific subfile page on the screen in unequal subfile?
Can AnyOne tell me how to read join logical file in rpg from starting to end?
How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...
Difference between RESET and CLEAR
What hapens when we use CPYF command to copy a LF? On which PF will it be dependent???
in which journalling which attributes are necessary
Why we need to give File and To file Names While we are using OVRDBF. What is your understanding related to this?
in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file in qtemp no of records in file in library qtemp is checked wat shud be the count of records let say it was 10 initially endpgm
i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.