Rocket U2 | UniVerse & UniData

 View Only
Expand all | Collapse all

Is this program still used?!?!

  • 1.  Is this program still used?!?!

    Posted 08-11-2022 10:21
    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
    ------------------------------


  • 2.  RE: Is this program still used?!?!

    Posted 08-11-2022 11:03
    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




  • 3.  RE: Is this program still used?!?!

    Posted 08-13-2022 02:16
    Hi

    We have a scheduled CRON job that runs every hour that has been running for
    over a year to collect exactly that information. It scans all our known
    DataBasic Object directories and logs any used within the last hour, this
    gives us details of what is being run and when but also to identify when
    erroneous activations occur, we don’t run UVBackup or cpio etc. as we use
    snapshots so rarely affected by false reporting.

    It’s helped us identify a large number of our 15k+ object files that are
    not active or pinpoint when they are being called to assist with
    decommissioning them.

    Happy to share if it helps.

    Kind Regards
    Mark
    --



    Kind regards,

    Mark Copp

    Infrastructure Design

    Travis Perkins PLC


    www.travisperkinsplc.co.uk

    --
    *

    This e-mail and any attachments are confidential and intended solely for
    the use of the addressee only. If you have received this message in error,
    you must not copy, distribute or disclose the contents; please notify the
    sender immediately and delete the message.


    This message is attributed to
    the sender and may not necessarily reflect the view of Travis Perkins
    Trading Company Limited, 733503, Lodge Way House, Lodge Way, Harlestone
    Road, Northampton, NN5 7UG or its parent company Travis Perkins plc
    (Registered in England No. 824821; Lodge Way House, Lodge Way, Harlestone
    Road, Northampton, NN5 7UG; VAT number 408556737) and any of its
    subsidiaries. Agreements binding Travis Perkins Trading Company Limited may
    not be concluded by means of e-mail communication.
    E-mail transmissions are
    not secure and Travis Perkins Trading accepts no responsibility for changes
    made to this message after it was sent. Whilst steps have been taken to
    ensure that this message is virus free, Travis Perkins Trading accepts no
    liability for infection and recommends that you scan this e-mail and any
    attachments.*




  • 4.  RE: Is this program still used?!?!

    Posted 08-12-2022 07:15
    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
    ------------------------------



  • 5.  RE: Is this program still used?!?!

    ROCKETEER
    Posted 08-12-2022 07:40
    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<https: aka.ms/ghei36="">

    ================================
    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.




  • 6.  RE: Is this program still used?!?!

    Posted 08-15-2022 19:58
    While receiving Unix Admin training I was told the "u" option has no value because even the ls command updates the value. I never bothered to test this but it was a formal training by a well-known computer manufacturer.

    I usually take advantage of an existing INCLUDE to introduce logic capturing the SYSTEM(9001) [call stack], @WHO, date and time and writing it out to a special file. One suggestion, either check @WHO to avoid executing this logic, or use OPENPATH, or update the VOC with the file pointer.

    Tom




  • 7.  RE: Is this program still used?!?!

    Posted 08-12-2022 08:14
    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
    ------------------------------



  • 8.  RE: Is this program still used?!?!

    Posted 08-12-2022 10:48
    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
    ------------------------------



  • 9.  RE: Is this program still used?!?!

    ROCKETEER
    Posted 08-12-2022 11:03
    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
    ------------------------------



  • 10.  RE: Is this program still used?!?!

    Posted 08-12-2022 11:11
    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
    ------------------------------



  • 11.  RE: Is this program still used?!?!

    ROCKETEER
    Posted 08-12-2022 11:43
    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
    ------------------------------



  • 12.  RE: Is this program still used?!?!

    Posted 08-12-2022 12:13
    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.




  • 13.  RE: Is this program still used?!?!

    Posted 08-12-2022 12:18
    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
    ------------------------------



  • 14.  RE: Is this program still used?!?!

    PARTNER
    Posted 08-12-2022 12:32

    Hi,

    Assuming the programs have been cataloged to the uv catalog space you can run.  MAKE.MAP.FILE which will build the &MAP& file and one of the fields called DATE will tell you when it was last accessed or cataloged.

    Once you've build the &MAP& file with MAKE.MAP.FILE you can type. LIST &MAP&  It will also tell you from which account it was cataloged.

    You may have to run this commands in your home UV account.

    Regards, Sam




    ------------------------------
    Sam Powell
    President/Developer
    Advanced Transportation Systems Inc
    Littleton CO US
    ------------------------------