PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

logical file with reade

2 posters

Go down

logical file with reade Empty logical file with reade

Post  muthuraman Thu Oct 29, 2009 5:07 pm

I'm reading a logical file with READE.
In which order the records with the same key field value will appear?
Is there a guaranty that the records with the same key field value will be read in a sequential order i.e. how they are situated in the physical file?


Regards,
Muthuraman

muthuraman

Posts : 42
Join date : 2009-08-28

Back to top Go down

logical file with reade Empty Re: logical file with reade

Post  soundhar Wed Dec 29, 2010 12:56 pm

Hi,
I hv a PF -File1 , upddta as following order
100 AAAA
101 BBBB
100 CCCC
102 DDDD
100 EEEE

I hv a LF-file2,without using any keywords like LIFO...
From RPG
Codings:
Ffile2 IF E K DISK
C *LOVAL SETLLfile2
C READEfile2 31
C *IN31 DOWEQ*OFF
C EMPCDE DSPLY
C EMPNAM DSPLY
C READEfile2 31
C ENDDO
C SETON LR

Then it wil read the sequential records with the same order oly as it is entered in PF-file1...
AS follows:
100 AAAA
100 CCCC
100 EEEE

Ok if i use LIFO in my LF-File2 then the records will be displayed as follows,
100 EEEE
100 CCCC
100 AAAA

soundhar

Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum