• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • What Program Uses That File?

    July 13, 2005 Hey, Ted

    We would like to delete a logical file that we no longer need. We got a list of programs that used the file from our documentation tool and changed those programs to use a newer logical. However, the Display Object Description (DSPOBJD) command tells us that the file is still being used. How can we find the program or programs that are accessing the file?

    –Bobby

    I suggest you journal the physical file(s) over which the logical file is built. Specify OMTJRNE(*NONE), because you need the system to record opens and closes. The following commands create a journal and start journaling a file named MYFILE.

    CRTJRNRCV JRNRCV(MYLIB/MYFILE0001)                           
    CRTJRN JRN(MYLIB/MYFILE) JRNRCV(MYLIB/MYFILE0001)           
    STRJRNPF FILE(MYLIB/MYFILE) 
             JRN(MYLIB/MYFILE)  
             IMAGES(*BOTH)       
             OMTJRNE(*NONE)
    

    The Display Journal (DSPJRN) command will retrieve the logged opens of the file.

    DSPJRN JRN(MYLIB/MYFILE) JRNCDE((F)) ENTTYP(OP)
    

    The entry-specific data of a logged open is defined as in the following table.

    Positions

    Description

    1 – 10

    File

    11 – 20

    Library

    21 – 30

    Member

    31

    I=opened for input

    32

    O=opened for output

    33

    U=opened for update

    34

    D=opened for delete

    You can use the Journal code finder to find the format of entry-specific data for journal codes.

    DSPJRN’s entry details panel will show you the name of the program that opened the file, the job that opened the file, the time the file was opened, and other pertinent information.

    You may be able to find the open of the logical file by viewing the entries, but if there are a lot of opens, you might prefer to copy the journal entries to a disk file and query them.

    DSPJRN JRN(MYLIB/MYFILE) 
    JRNCDE((F)) ENTTYP(OP) OUTPUT(*OUTFILE) OUTFILE (QTEMP/X)
    

    Having said all that, it is still possible that you won’t find your answer. If the program that is opening the file is one of IBM‘s, such as SQL/400 or Query/400, you won’t see IBM’s program’s name, but a program of your own that is higher in the call stack. In that situation, maybe the other information will give you enough of a hint that you’ll be able to track down the culprit.

    –Ted


    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    System Objects Updates Delphi/400 Development Tools GST Says 25 Percent of iSeries Tape Restores Fail

    Leave a Reply Cancel reply

Volume 5, Number 27 -- July 13, 2005
THIS ISSUE
SPONSORED BY:

WorksRight Software
Profound Logic Software
COMMON

Table of Contents

  • CHGPF Quirk
  • What Program Uses That File?
  • Admin Alert: Turning Off ODBC Query Timeout Limits

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Tool Aims To Streamline Git Integration For Old School IBM i Devs
  • IBM To Add Full System Replication And FlashCopy To PowerHA
  • Guru: Decoding Base64 ASCII
  • The Price Tweaking Continues For Power Systems
  • IBM i PTF Guide, Volume 27, Numbers 31 And 32
  • You Can Now Get IBM Tech Support For VS Code For i
  • Price Cut On Power S1012 Mini Since Power S1112 Ain’t Coming Until 2026
  • IBM i: Pro and Con
  • As I See It: Disruption
  • IBM i PTF Guide, Volume 27, Number 30

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle