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

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

SAME FILES IN DIFFERENET LIBRARY

View previous topic View next topic Go down

SAME FILES IN DIFFERENET LIBRARY

Post  rajkumar400 on Sun Dec 26, 2010 5:07 pm

I would like to declare same files which are in two libraries in my RPG III. one file in in read only mode and another in update mode.

How can this be done/

Thanks.
Raj

rajkumar400

Posts : 59
Join date : 2010-12-25

View user profile

Back to top Go down

Re: SAME FILES IN DIFFERENET LIBRARY

Post  soundhar on Sun Jan 09, 2011 9:55 am

I have "EMPMST" file in Lib1 & Lib2.

FEMPMST UF E DISK EXTFILE(FILNAM) USROPN
FEMPMST1 IF E DISK EXTFILE(FILNAM1) RENAME(EMPREC:EMPRE1) USROPN
D FILNAM S 21A
D FILNAM1 S 21A
/FREE
FILNAM = %TRIMR('LIB1')+'/'+'EMPMST';
EXSR FILSR;
FILNAM1= %TRIMR('LIB2')+'/'+'EMPMST';
EXSR FILSR1;
*INLR=*ON;
/END-FREE

C FILSR BEGSR
C //DO YOUR UPDATE HERE//-it works for LIB1/EMPMST
C ENDSR

C FILSR1 BEGSR
C //DO YOUR INQUIRY HERE//-it works for LIB2/EMPMST
C ENDSR





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