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

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

logical file with reade

View previous topic View next topic Go down

logical file with reade

Post  muthuraman on 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

View user profile

Back to top Go down

Re: logical file with reade

Post  soundhar on 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

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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