"Touch" equivalent for very large datasets? Pretty simple and "size doesn't matter" (that's what she said, grin): IDCAMS in batch: PRINT INFILE(ddname) COUNT(1) [or PRINT INDATASET(dsn) COUNT(1) - but be aware DSN allocations in IDCAMS may default to DISP=OLD which could cause contention issues, but then again if something else has the target dataset(s) already open then you may not need to 'touch' those]
Set it to a future date? Two possible ways immediately come to mind, both likely to be equally unpalatable: 1) IPL an LPAR with access to the dataset(s) to the desired 'future date' and perform the above action. 2) Write an APF-Authorized Assembler program to manipulate the 'last reference' datetime stamps in the VTOC/VVDS/CATALOG directly. In both cases, using a future date is perilous because there are a lot of space management and other processes that depend on that date/time being accurate. However, if your real objective is to prevent certain datasets from being archived, your best approach will be to get with your storage management team, explain your issues/concerns, and work with them to convince them to modify the SMS/dfHSM controls so that they're excluded from archival. I get that it can be unpleasant/difficult to coordinate from someone else who may not be sympathetic to your concerns, but understand that while the approaches I mentioned can be used to prevent -automatic- archival, nothing can protect you from a conscientious storage management person noticing that those datasets "ought to be" archived and deciding to archive them manually via command. -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Billy Ashton Sent: Friday, August 2, 2024 10:04 AM To: [email protected] Subject: How to "touch" mainframe files Hi friends! Here's another in the series of "Friday Foibles!" (Why these questions always come up on Fridays is beyond me!) We have a need to run a job that will perform a process like the Unix touch command, so that the last access date of a file is updated. We don't want to do things like allocate, open, and print one record, as some of these files are huge (25-50GB). The list of files is somewhat dynamic, and may change week to week. Does anyone have a job that will update the last access date for a list of files, and ideally, set the last access date into the future a week or two, to ensure that the files will not get archived (since I am not sure we could easily recall some of them again)? Thank you and best regards, Billy Ashton ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
