In AS400,How will you know, what are all the programs the particular file is used?
4 posters
Page 1 of 1
In AS400,How will you know, what are all the programs the particular file is used?
For eg, Consider a FileA is used by 10 programs...now how will you know those 10 programs....anyone pls reply
sammy17r- Posts : 2
Join date : 2010-08-13
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Re: In AS400,How will you know, what are all the programs the particular file is used?
i think its wrong
sammy17r- Posts : 2
Join date : 2010-08-13
Re: In AS400,How will you know, what are all the programs the particular file is used?
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
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
Re: In AS400,How will you know, what are all the programs the particular file is used?
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
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
Re: In AS400,How will you know, what are all the programs the particular file is used?
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'.
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
Similar topics
» What are the reasons a logical file may be "dropped" during the File definition load process?
» Define term 'File Type' and list various file types.
» Copy Spool File to PF/Flat file
» Physical File & Logical File
» Phyical File & Logical File.
» Define term 'File Type' and list various file types.
» Copy Spool File to PF/Flat file
» Physical File & Logical File
» Phyical File & Logical File.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum