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.

SAME FILES IN DIFFERENET LIBRARY

2 posters

Go down

LIBRARY - SAME FILES IN DIFFERENET LIBRARY Empty SAME FILES IN DIFFERENET LIBRARY

Post  rajkumar400 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

Back to top Go down

LIBRARY - SAME FILES IN DIFFERENET LIBRARY Empty Re: SAME FILES IN DIFFERENET LIBRARY

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

Back to top Go down

Back to top

- Similar topics

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