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 / srinivas
100 chain filename
if %found
dsply the record
else
display the norerord
endif
or
Is This Answer Correct ? | 1 Yes | 5 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 |
Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?
difference betwen keywords and opcodes
suppose there are 100 records and i want to read records between 60-70 how we can read this 10 records in rpg
how can i retrieve the field name from display file at run time? Devendra Singh Tomar
Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.
How can a screen field that has changed since the last output operation be detected?
How to identify the object has compiled with the debug view as *source without using STRDBG?
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
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
do you use message subfiles? What are the necessary keywords required coding a message subfile?
how can I tell when to replace the array?
can we use cl programming to update or delete physical files