Skip to main content
KathleenHambrick
Participating Frequently
Aug 11, 2022 10:21 AM UTC

Is this program still used?!?!

I've inherited thousands of programs, most of which are no longer being used. Even worse the programs are all scattered into about 80 different program files. Your basic nightmare.

Does anyone know a way, on Universe, to tell when the last time a program was executed is? The cataloging features are not usually employed here, although there are some, so anything that looks for a catalogue date is probably not going to help me much - but if there is a way to see when catalogued programs were last run as well that could help some.

If there is nothing available to help me here - any suggestions on how to create a log of what's being used? Obviously I could move all the programs into an archived file and wait for my users to scream but that's not helpful to my company :(

Thanks in advance for the info / suggestions. Hoping to get this place cleaned up but it's gonna take a LONG time!
Kathleen

------------------------------
Kathleen Hambrick
Programmer at Colwell
------------------------------

    13 replies

    Brian Paige
    Participating Frequently
    Aug 11, 2022 11:03 AM UTC
    I've inherited thousands of programs, most of which are no longer being used. Even worse the programs are all scattered into about 80 different program files. Your basic nightmare.

    Does anyone know a way, on Universe, to tell when the last time a program was executed is? The cataloging features are not usually employed here, although there are some, so anything that looks for a catalogue date is probably not going to help me much - but if there is a way to see when catalogued programs were last run as well that could help some.

    If there is nothing available to help me here - any suggestions on how to create a log of what's being used? Obviously I could move all the programs into an archived file and wait for my users to scream but that's not helpful to my company :(

    Thanks in advance for the info / suggestions. Hoping to get this place cleaned up but it's gonna take a LONG time!
    Kathleen

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Kathleen,

    On our systems (Universe on AIX), we're running Ideal flavor, and when we catalog programs, the object gets written into the GLOBAL.CATDIR file ($uvhome/catdir). When a program is run, the date stamp on the object code in catdir gets updated.

    Like you said, though, this would only help you with cataloged programs AND if your environment uses/updates catdir.

    Brian
    New Participant
    Aug 12, 2022 7:15 AM UTC
    I've inherited thousands of programs, most of which are no longer being used. Even worse the programs are all scattered into about 80 different program files. Your basic nightmare.

    Does anyone know a way, on Universe, to tell when the last time a program was executed is? The cataloging features are not usually employed here, although there are some, so anything that looks for a catalogue date is probably not going to help me much - but if there is a way to see when catalogued programs were last run as well that could help some.

    If there is nothing available to help me here - any suggestions on how to create a log of what's being used? Obviously I could move all the programs into an archived file and wait for my users to scream but that's not helpful to my company :(

    Thanks in advance for the info / suggestions. Hoping to get this place cleaned up but it's gonna take a LONG time!
    Kathleen

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    We have some great Unix/AIX types here and I learned from one of them that you can use the following to see when a program was last used:

    SH -c "ls -lu /{application}/{program_filename}.O/{program_name}"

    -rwxrwx---    1 uvadm    xxx           37802 May  5 09:22 /{application}/{program_filename}.O/{program_name}"



    ------------------------------
    Karl Pozmann
    Sr. Analyst, Developer, LTC Systems
    Omnicare Inc
    Dublin OH US
    ------------------------------
    New Participant
    Aug 12, 2022 7:24 AM UTC
    I've inherited thousands of programs, most of which are no longer being used. Even worse the programs are all scattered into about 80 different program files. Your basic nightmare.

    Does anyone know a way, on Universe, to tell when the last time a program was executed is? The cataloging features are not usually employed here, although there are some, so anything that looks for a catalogue date is probably not going to help me much - but if there is a way to see when catalogued programs were last run as well that could help some.

    If there is nothing available to help me here - any suggestions on how to create a log of what's being used? Obviously I could move all the programs into an archived file and wait for my users to scream but that's not helpful to my company :(

    Thanks in advance for the info / suggestions. Hoping to get this place cleaned up but it's gonna take a LONG time!
    Kathleen

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Hi Kathleen

    If you are on unix you can use the -u option of the ls command on the object directory. This will tell you the last access time

    so ls -lut BP.O for example

    ------------------------------
    Asvin Dattani
    Universe Adminstrator
    Universe developer
    Coventry GB
    ------------------------------
    Jonathan Smith
    Rocketeer
    Aug 12, 2022 7:40 AM UTC
    We have some great Unix/AIX types here and I learned from one of them that you can use the following to see when a program was last used:

    SH -c "ls -lu /{application}/{program_filename}.O/{program_name}"

    -rwxrwx---    1 uvadm    xxx           37802 May  5 09:22 /{application}/{program_filename}.O/{program_name}"



    ------------------------------
    Karl Pozmann
    Sr. Analyst, Developer, LTC Systems
    Omnicare Inc
    Dublin OH US
    ------------------------------
    This works well but you can disable updating of the last read time at the AIX level and it is one of the things that we note a potential performance gain in a lot of our presentations.

    Sent from Samsung Mobile on Three
    Get Outlook for Android

    ================================
    Rocket Software, Inc. and subsidiaries ? 77 Fourth Avenue, Waltham MA 02451 ? Main Office Toll Free Number: +1 855.577.4323
    Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
    Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
    Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
    ================================

    This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you.
    Rocket Software - Senior Principal Technical Support Engineer - UniData ATS
    KathleenHambrick
    Participating Frequently
    Aug 12, 2022 10:48 AM UTC
    Hi Kathleen

    If you are on unix you can use the -u option of the ls command on the object directory. This will tell you the last access time

    so ls -lut BP.O for example

    ------------------------------
    Asvin Dattani
    Universe Adminstrator
    Universe developer
    Coventry GB
    ------------------------------
    The ls -lut does not appear to be accurate...to test I ran the command against my personal program file, it shows current time stamps on programs I have not run in many weeks. No one else runs my test / work programs. I do use some of these, such as the first entry EDK, on a daily basis so that is accurate. but none of the others in this snippet have been run today, guaranteed. It's also odd to note they all have the same time stamp? Could that be a backup time?

    sh-4.4$ ls -lut KBP.O | more
    total 224
    -rw-rw-rw- 1 kathleenh domain users 301 Aug 12 09:28 EDK
    -rw-rw-rw- 1 kathleenh domain users 6888 Aug 12 01:45 WTIC.PRTY
    -rw-rw-rw- 1 kathleenh domain users 4971 Aug 12 01:45 WTIC.100
    -rw-rw-rw- 1 kathleenh domain users 452 Aug 12 01:45 TEST3
    -rw-rw-rw- 1 kathleenh domain users 148 Aug 12 01:45 USER
    -rw-rw-rw- 1 kathleenh domain users 1196 Aug 12 01:45 UTIL.MENU
    -rw-rw-rw- 1 kathleenh domain users 416 Aug 12 01:45 TEST2
    -rw-rw-rw- 1 kathleenh domain users 743 Aug 12 01:45 TEST.FORMULA4
    -rw-rw-rw- 1 kathleenh domain users 185 Aug 12 01:45 TEST.TRIGGER
    -rw-rw-rw- 1 kathleenh domain users 2982 Aug 12 01:45 TEST.FORMULA
    -rw-rw-rw- 1 kathleenh domain users 941 Aug 12 01:45 TEST.FORMULA2

    Additionally, can someone tell me why the begging of the list says 'total 224'? I do not have 224 complied programs in this file?

    Other suggestions or clarification?

    Thanks guys!

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Neil Morris
    Rocketeer
    Aug 12, 2022 11:03 AM UTC
    The ls -lut does not appear to be accurate...to test I ran the command against my personal program file, it shows current time stamps on programs I have not run in many weeks. No one else runs my test / work programs. I do use some of these, such as the first entry EDK, on a daily basis so that is accurate. but none of the others in this snippet have been run today, guaranteed. It's also odd to note they all have the same time stamp? Could that be a backup time?

    sh-4.4$ ls -lut KBP.O | more
    total 224
    -rw-rw-rw- 1 kathleenh domain users 301 Aug 12 09:28 EDK
    -rw-rw-rw- 1 kathleenh domain users 6888 Aug 12 01:45 WTIC.PRTY
    -rw-rw-rw- 1 kathleenh domain users 4971 Aug 12 01:45 WTIC.100
    -rw-rw-rw- 1 kathleenh domain users 452 Aug 12 01:45 TEST3
    -rw-rw-rw- 1 kathleenh domain users 148 Aug 12 01:45 USER
    -rw-rw-rw- 1 kathleenh domain users 1196 Aug 12 01:45 UTIL.MENU
    -rw-rw-rw- 1 kathleenh domain users 416 Aug 12 01:45 TEST2
    -rw-rw-rw- 1 kathleenh domain users 743 Aug 12 01:45 TEST.FORMULA4
    -rw-rw-rw- 1 kathleenh domain users 185 Aug 12 01:45 TEST.TRIGGER
    -rw-rw-rw- 1 kathleenh domain users 2982 Aug 12 01:45 TEST.FORMULA
    -rw-rw-rw- 1 kathleenh domain users 941 Aug 12 01:45 TEST.FORMULA2

    Additionally, can someone tell me why the begging of the list says 'total 224'? I do not have 224 complied programs in this file?

    Other suggestions or clarification?

    Thanks guys!

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    The total number displayed by the 'ls' command is the total number of file system blocks used by all the files in the directory. It does not correspond to the number of files in the directory.

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------
    KathleenHambrick
    Participating Frequently
    Aug 12, 2022 11:11 AM UTC
    The total number displayed by the 'ls' command is the total number of file system blocks used by all the files in the directory. It does not correspond to the number of files in the directory.

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------
    Thanks Neil - any idea why the inaccurate time stamps? What could have caused them? These programs were not run at 1:45 this morning.

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Neil Morris
    Rocketeer
    Aug 12, 2022 11:43 AM UTC
    Thanks Neil - any idea why the inaccurate time stamps? What could have caused them? These programs were not run at 1:45 this morning.

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Hi Kathleen,
    I just ran a test using uvbackup on a BP.O directory. After running that command, the ls -lut command was showing all files with an August 12th timestamp. So I think your comment about the timestamp being backup related seems accurate.
    Neil

    ------------------------------
    Neil Morris
    Universe Advanced Technical Support
    Rocket Software
    ------------------------------
    Mark Baldridge
    Participating Frequently
    Aug 12, 2022 12:13 PM UTC
    I've inherited thousands of programs, most of which are no longer being used. Even worse the programs are all scattered into about 80 different program files. Your basic nightmare.

    Does anyone know a way, on Universe, to tell when the last time a program was executed is? The cataloging features are not usually employed here, although there are some, so anything that looks for a catalogue date is probably not going to help me much - but if there is a way to see when catalogued programs were last run as well that could help some.

    If there is nothing available to help me here - any suggestions on how to create a log of what's being used? Obviously I could move all the programs into an archived file and wait for my users to scream but that's not helpful to my company :(

    Thanks in advance for the info / suggestions. Hoping to get this place cleaned up but it's gonna take a LONG time!
    Kathleen

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    For *nix platforms, cd to the BP.O directory and execute "ls -ltu".
    from the "man ls" command,
    -l use a long listing format
    -t sort by time, newest first; see --time
    -u with -lt: sort by, and show, access time; with -l: show
    access
    time and sort by name; otherwise: sort by access time,
    newest
    first

    So, the most recently accessed programs will appear first, and the ones
    unused, will appear at the bottom of the list. Note that copying the
    directory, without preserving the access attribute will give all of the
    programs the current time.
    Ryan Ladd
    Participating Frequently
    Aug 12, 2022 12:18 PM UTC
    I've inherited thousands of programs, most of which are no longer being used. Even worse the programs are all scattered into about 80 different program files. Your basic nightmare.

    Does anyone know a way, on Universe, to tell when the last time a program was executed is? The cataloging features are not usually employed here, although there are some, so anything that looks for a catalogue date is probably not going to help me much - but if there is a way to see when catalogued programs were last run as well that could help some.

    If there is nothing available to help me here - any suggestions on how to create a log of what's being used? Obviously I could move all the programs into an archived file and wait for my users to scream but that's not helpful to my company :(

    Thanks in advance for the info / suggestions. Hoping to get this place cleaned up but it's gonna take a LONG time!
    Kathleen

    ------------------------------
    Kathleen Hambrick
    Programmer at Colwell
    ------------------------------
    Could the AUDIT package help with this?

    Another option is to "wrap" the RUN command inside a security subroutine that will log the information of what is being ran.  So that whenever a "RUN BP program" is executed, you can create an entry in a table tracking that usage. Over time, you can find out what is being ran and what isn't.

    One word of caution though is you need to be very careful in your design/building of this log file to ensure that collisions, deadlocks, very large records, etc. are avoided.  You also should make sure that LOCKED, ELSE, ON ERROR, etc. conditions are also handled to ensure that if/when something bad happens in your logging process that it won't cause major issues.

    Original RUN VERB...
    RUN
    001 Verb - Load and execute a named uniVerse BASIC program
    002 RUN
    003 I
    004 BGHN


    Updated REMOTE run remote pointer where the security subroutine is being called
    RUN
    0001 R
    0002 VOCLIB
    0003 RUN.ORIG
    0004 *LOGGING.ROUTINE.NAME

    And the original RUN verb is moved to RUN.ORIG in VOCLIB (or wherever you want it to live).

    RUN.ORIG
    001 Verb - Load and execute a named uniVerse BASIC program
    002 RUN
    003 I
    004 BGHN

    This approach also requires that you are careful when doing UV upgrades so you don't "lose" your custom version of the RUN command.



    ------------------------------
    Ryan Ladd
    ------------------------------