AS/400 file field usage

25 pts.
Tags:
AS/400 Fields
AS/400 file field usage
CLP
RPG Program
is there a way to determine what fields of a file are used in an RPG and CLP program?

Software/Hardware used:
os 400

Answer Wiki

Thanks. We'll let you know when a new response is added.

To do it manually takes a lot of effort.
If you just looking for a single field and this is a one-time shot, you can use scan all your source members for a file name.
*
THe better option is to buy one of the change management or cross reference packages.
HAWKEYE Pathfinder is one that would give you that capability althouh Databorough’s X-analysis is better.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    ...what fields of a file are used in an RPG and CLP program? To do this effectively requires a combination of a compiler plus manual review. First, most programs bring all fields of every file in rather than only the fields actually needed. In most recent releases, the compilers have 'intelligently' determined which fields are actually used and stopped including code to bring other fields into program variables. Second, a rise in use of embedded SQL has brought a parallel rise in the use of :host variables that need not reference a table column. If you INSERT a set of VALUES, there may be no visible reference to any field. Third, BASED variables may be used. These may be addressed to refer to a portion of a data structure occupied by a record image. Or an OVERLAY might redefine an area. Fourth, a subprocedure might reference an argument that is not easily identifiable as a table column. If the procedure call uses an indirect reference similar to those listed above or some other means, it might take significant effort to make the logical connection. If programs used LFs or VIEWs that presented only the fields actually used by them, all you would ever need to know would be which programs used which files. But to make things "easy", developers tend to use LFs/VIEWs that include everything. It's only later that the thought comes up that no one knows what data is used where. Does it matter if your programs are OPM (RPG/400 and CLP) or ILE (RPGLE and CLLE)? There might be slight differences between them in how to determine field usage. Tom
    125,585 pointsBadges:
    report
  • WoodEngineer
    In 2008 Roger Stein authored an article for System i Network titled "Files and Fields - Where Are They Used". This is a free utility Roger developed. We loaded it on our system with good results.
    6,715 pointsBadges:
    report
  • Dhaloo
    [...] Wondering about AS/400 file field usage? Marbles, TomLiotta, and WoodEngineer gave some helpful [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following