I recall such a TSO command from decades ago called simply "DSCB". I don't know 
its origin. Maybe it's on an old Share tape.
However, this might need modernising for "recent" introduction of new DSCB 
types. Of course it probably would not supply a solution for VSAM data sets 
either.

Lennie

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
ITschak Mugzach
Sent: 03 August 2024 09:25
To: [email protected]
Subject: Re: How to "touch" mainframe files

I am not in the brochure business for years, but I remember using ca disk 
utility to modify format-1 dscb . I was using it to change a file type from Sam 
to ps in order to delete the orphaned file. You can use it to alter other 
fields. May be there a free tool to do this.

ITschak

*| **Itschak Mugzach | Director | SecuriTeam Software **|** IronSphere
Platform* *|* *Information Security Continuous Monitoring for Z/OS, zLinux and 
IBM I **|  *

*|* *Email**: [email protected] **|* *Mob**: +972 522 986404 **|*
*Skype**: ItschakMugzach **|* *Web**: www.Securiteam.co.il  **|*





בתאריך שבת, 3 באוג׳ 2024 ב-6:42 מאת Thomas Berg <
[email protected]>:

> There is a lot of speculation in this thread.
> Why not test the theories?
> Both in z/OS (there were a JCL suggestion) and in unix/Linux.
>
>
> Thomas Berg
>
> Den lör 3 aug. 2024 05:22Phil Smith III <[email protected]> skrev:
>
> > Well this is interesting, in that it sounds like I'm not the only 
> > one who's not 100% clear on what the rules are for "touch". Doc 
> > doesn't say much either (typical *ix doc).
> >
> > -----Original Message-----
> > From: IBM Mainframe Discussion List <[email protected]> On 
> > Behalf Of Bernd Oppolzer
> > Sent: Friday, August 2, 2024 6:31 PM
> > To: [email protected]
> > Subject: Re: How to "touch" mainframe files
> >
> > Phil asked:
> >
> > This makes me realize that I don't know what "touch" actually does. 
> > I mean, I know the effect, but what does it have to do to make that happen?
> >
> > IMO:
> >
> > The arcane Unix systems probably had only one timestamp per file, no 
> > difference for read/write, and files are simply chains of bytes, so 
> > I believe that what touch does is open the file for append, then 
> > append nothing and then close the file.
> > This way the date (of last write) should be set to the current date 
> > (or timestamp).
> >
> > A simple open for read should IMO not change the date of a file.
> >
> > But that's some speculation on my part ...
> >
> > HTH, kind regards
> >
> > Bernd
> >
> >
> > Am 02.08.2024 um 22:30 schrieb Phil Smith III:
> > > Billy Ashton asked how to do the equivalent of a USS "touch" on a 
> > > z/OS
> > data set.
> > >
> > > I'm wondering if there's something like the C "DD:ddname" filename
> > specification hack that could be used. I know this would seem odd: 
> > run a batch job that uses BPXwhatever to run USS "touch", but if 
> > it's
> possible...?
> > >
> > > This makes me realize that I don't know what "touch" actually 
> > > does. I
> > mean, I know the effect, but what does it have to do to make that happen?
> > If it's some filesystem function, a minimal C program might be able 
> > to
> use
> > the "DD:ddname" hack and that function. Googling suggests that it 
> > just opens the file and that that's sufficient to update it, but 
> > there has to
> be
> > more, since it can optionally update just the last access time, 
> > without updating the last changed time.
> > >
> > > In fact, the more I think about this, I now wonder what "last
> > referenced" even means; I assume it's time of last access, not change?
> > >
> > > Billy wrote, in part:
> > >> We don't want to do things like allocate, open, and print one 
> > >> record, as some of these files are huge (25-50GB).
> > > Would you need to print a record to update "last referenced"? 
> > > Shouldn't
> > reading a record suffice? Do you even need to do that? Why does the 
> > size
> of
> > the file matter here?
> > >
> > > I'm sure these are dumb questions but my in-depth filesystem 
> > > knowledge
> > is for other OSes, so I'm just knowledgeable enough to be curious...
> > >
> > > ------------------------------------------------------------------
> > > ---- 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
> >
> > --------------------------------------------------------------------
> > -- 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
>

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

Reply via email to