Ok, I had a question off list that got me thinking and I understand it
now. If you use UPDPGM on a program (in this case using the program's
module) and the file definition has changed then it adds another
reference to the same file and does not remove the prior one. I believe
this file has previously had 22 fields, and 6 fields and currently has
the 8 fields - I know about the 6 and 8 but have to guess on the 22
because it was before my time. I just recreated the program using
CRTPGM and now the file (and all others) only shows up one time in
DSPPGMREF.

Bottom line, UPDPGM adds new references when something is different that
when the program was originally created but does not remove old
references, it probably can't determine when something is really no
longer needed.

Scott


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jerry C. Adams
Sent: Friday, August 24, 2012 8:50 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: DSPPGMREF output confusion

Scott,

When you say "Other files have a similar thing happening," do you mean
in this same program?

Could you post the source at code.midrange.com?

Jerry C. Adams
IBM i Programmer/Analyst
There is nothing more satisfying that having someone take a shot at you,
and miss.
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Friday, August 24, 2012 9:34 AM
To: Midrange Systems Technical Discussion
Subject: RE: DSPPGMREF output confusion

No different record definitions, no DS or anything. The only thing in
the program is the F spec, 1 SETLL, 2 READ's, and 1 WRITE. Other files
have a similar thing happening although some only show up twice.

Scott

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Friday, August 24, 2012 8:31 AM
To: Midrange Systems Technical Discussion
Subject: Re: DSPPGMREF output confusion

hi Scott,

I see the difference between them is the "field count" value. Do you
have different record definitions that you use in different places in
your program? Would that explain the three entries?



On 8/24/2012 9:18 AM, Scott Mildenberger wrote:
I ran DSPPGMREF on a RPGLE program and am confused why a file used in
the program shows up 3 times in the list.



The file is defined in the program as :

fCOMSGS UF A E K disk

It is used in a Chain, Read, and Write - in all cases nothing special,

all fields are read or written. The file has 8 fields and the key is
2 fields. The program does use a SRVPGM and I verified that nothing
in that service program uses this file.



The 3 references from DSPPGMREF are shown below. Note that the Format

Level on reference and number of fields on reference 1 match the
actual file as shown by DSPFD. Reference 2 shows fewer fields and
Reference 3 shows 22 fields (way more than the file contains) and both

References have a different format id.



1. Object . . . . . . . . . . . . . . . . . . : COMSGS

Library . . . . . . . . . . . . . . . . . : TRUCKLIB

Object type . . . . . . . . . . . . . . . : *FILE

File name in program . . . . . . . . . . : COMSGS

File usage . . . . . . . . . . . . . . . : Input

Output

Update

Number of record formats . . . . . . . . : 1

Record Format Format Level Identifier Field Count

COMSGSR 41B94C2FAB7F7 8



2. Object . . . . . . . . . . . . . . . . . . : COMSGS

Library . . . . . . . . . . . . . . . . . : TRUCKLIB

Object type . . . . . . . . . . . . . . . : *FILE

File name in program . . . . . . . . . . : COMSGS

File usage . . . . . . . . . . . . . . . : Input

Output

Update

Number of record formats . . . . . . . . : 1

Record Format Format Level Identifier Field Count

COMSGSR 302543348E8EF 6



3. Object . . . . . . . . . . . . . . . . . . : COMSGS

Library . . . . . . . . . . . . . . . . . : TRUCKLIB

Object type . . . . . . . . . . . . . . . : *FILE

File name in program . . . . . . . . . . : COMSGS

File usage . . . . . . . . . . . . . . . : Input

Output

Update

Number of record formats . . . . . . . . : 1

Record Format Format Level Identifier Field Count

COMSGSR 38143C64A2B48 22



I am confused why the 3 different references?????



Thanks,



Scott Mildenberger

Programmer/Analyst

Davis Transport Inc.

Missoula, MT

406-728-5510 x128



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.