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)
Answers were Sorted based on User's Feedback
Answer / swetha p rao
Yes ,Using RRN of the file we can retrive.
Chain the file with RRN or Query the file with RRN
select * from temp33 where RRN(temp33) = 15
Is This Answer Correct ? | 15 Yes | 0 No |
Answer / pravin
there are too many ways-
1. declare that flat file as a edf in pgm and rename the
rcd-format and field name than set the pointer on 15 record
by setll and then read it.
2. define a per-run time array with fromfile(name of flate
file). then see th2 arrays 15 index value.
this are two methods. i have 2 more methods also
if any one want's contact me on pravin_cse1@yahoo.com
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / prince
My Answer is below
We need to use the following.
Factor 1 = 15
Opcode = CHAIN
Fator 2 = File Name
Please correct me if I am wrong
Is This Answer Correct ? | 10 Yes | 9 No |
Answer / swetha
I think you can use setll only if the file has keyfield
Is This Answer Correct ? | 4 Yes | 7 No |
The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?
How to change the name of physical members Dynamically?
Difference between RESET and CLEAR
What is the purpose of PUTOVR keyword?
Can an indexed file be accessed in arrival sequence in RPG?
how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?
Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?
which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?
Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.
what is the difference between the procedure and module in ILERPG?
I want to add 10 days in current date. how it is possible in CL program...?
What are the types of identifiers?