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

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

In AS400,How will you know, what are all the programs the particular file is used?

View previous topic View next topic Go down

In AS400,How will you know, what are all the programs the particular file is used?

Post  sammy17r on Thu Mar 03, 2011 8:11 pm

For eg, Consider a FileA is used by 10 programs...now how will you know those 10 programs....anyone pls reply Evil or Very Mad

sammy17r

Posts : 2
Join date : 2010-08-13

View user profile

Back to top Go down

Re: In AS400,How will you know, what are all the programs the particular file is used?

Post  soundhar on Tue Mar 08, 2011 6:58 pm

DSPPGMREF

soundhar

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

View user profile

Back to top Go down

Re: In AS400,How will you know, what are all the programs the particular file is used?

Post  sammy17r on Tue Mar 08, 2011 10:21 pm

i think its wrong No

sammy17r

Posts : 2
Join date : 2010-08-13

View user profile

Back to top Go down

Re: In AS400,How will you know, what are all the programs the particular file is used?

Post  soundhar on Wed Mar 09, 2011 12:06 pm

Did u tried with that Command...

Have a try with DSPPGMREF...

Onething,
1.DSPPGMREF doesnt show the files which are used by Embedded SQL
2.DSPPGMREF doesnt show the files which are used in OVRDBF or OVRDBF with OPNQRYF.ITS difficult
3.ANZPGM can be used like DSPPGMREF

soundhar

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

View user profile

Back to top Go down

Re: In AS400,How will you know, what are all the programs the particular file is used?

Post  VISWANATH TGR on Fri Jun 24, 2011 8:30 pm

hi @guyz

i have check this cmd DSPPGMREF ,,
yae yae its working ,, we can see all referred files

for eg :
i have used rpg program :empinq
which contain refmst(pf) and EMPINQD (dspf)

i have type dlike this in cmd line "DSPPGMREF PGM(PMS147/EMPINQ)"

and i got this result :

6/24/11 Display Program References
DSPPGMREF Command Input
Program . . . . . . . . . . . . . . . . . . : EMPINQ
Library . . . . . . . . . . . . . . . . . : PMS147
Output . . . . . . . . . . . . . . . . . . : *
Object types . . . . . . . . . . . . . . . : *PGM
Program . . . . . . . . . . . . . . . . . . . : EMPINQ
Library . . . . . . . . . . . . . . . . . . : PMS147
Text 'description'. . . . . . . . . . . . . : display emp list one by o
Number of objects referenced . . . . . . . : 2
Object . . . . . . . . . . . . . . . . . . : REFMST
Library . . . . . . . . . . . . . . . . . : PMS147
Object type . . . . . . . . . . . . . . . : *FILE
File name in program . . . . . . . . . . : REFMST {refered pf files}
File usage . . . . . . . . . . . . . . . : Input
Number of record formats . . . . . . . . : 1
Record Format Format Level Identifier Field Count
EMPREC 380FAF2223CB6 12
Object . . . . . . . . . . . . . . . . . . : EMPINQD {refered dspf files}
Library . . . . . . . . . . . . . . . . . : PMS147
Object type . . . . . . . . . . . . . . . : *FILE
File name in program . . . . . . . . . . : EMPINQD
File usage . . . . . . . . . . . . . . . : Input
Output
Number of record formats . . . . . . . . : 1
Record Format Format Level Identifier Field Count
REC1 1E75F13BDC4F1 8
avatar
VISWANATH TGR

Posts : 2
Join date : 2011-04-07
Age : 29
Location : chennai

View user profile http://vrefer.wordpress.com , vrefers.blogspot.com, www.facebook

Back to top Go down

Re: In AS400,How will you know, what are all the programs the particular file is used?

Post  hariharasudhan on Mon Jun 10, 2013 6:02 pm

Program . . . . . . . . . . . . > *ALL Name, generic*, *ALL
Library . . . . . . . . . . . > *ALLUSR Name, *LIBL, *CURLIB
Output . . . . . . . . . . . . . > *OUTFILE *, *PRINT, *OUTFILE
Object type . . . . . . . . . . > *ALL *ALL, *PGM, *SQLPKG.
+ for more values
File to receive output . . . . . DPSOUT Name
Library . . . . . . . . . . . qtemp Name, *LIBL, *CURLIB
Output member options:
Member to receive output . . . *FIRST Name, *FIRST
Replace or add records . . . . *REPLACE *REPLACE, *ADD

This creates an outfile in the library mentioned (Lets say the outfile is DSPOUT created in the library QTEMP).
Now, run a query on this file with the following selection criteria and press Enter.

WHFNAM EQ 'Filename'

Where the 'Filename' was will be the physical, logical or the display file that needs to be delivered.

The output of this query shows all the programs that are using the particular file. This helps you to determine all the programs that are using the particular file and then you can re-compile the programs accordingly.

This outfile also contains the information regarding the mode in which the file is opened. This can be obtained with the WHFUSG field.

This outfile is not only used for finding the programs that are using a particular file(s), but also the programs that are calling a particular program. Example, if you want to find out all the programs that are calling a particular program (lets say program ABC), then just give the following selection criteria.

WHFNAM EQ 'ABC'

The output of this query will show all the programs that are calling program 'ABC'.

hariharasudhan

Posts : 1
Join date : 2011-02-16

View user profile

Back to top Go down

Re: In AS400,How will you know, what are all the programs the particular file is used?

Post  Sponsored content


Sponsored content


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