Get file creation date using a COBOL program.
Get file creation date using a COBOL program.
Hello,
Is there a way to find out the creation date of a file used in a COBOL program? My team member said that, there isn't a way to do it directly from COBOL.
Any ideas please?
Thanks.
Is there a way to find out the creation date of a file used in a COBOL program? My team member said that, there isn't a way to do it directly from COBOL.
Any ideas please?
Thanks.
Thanks,
Anil
Anil
Re: Get file creation date using a COBOL program.
Not directly but you could perhaps call a Rexx program from your COBOL program.
Regards
Nic
Nic
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Get file creation date using a COBOL program.
Why would you want to know? It is a fairly arbitrary thing.
Re: Get file creation date using a COBOL program.
I would like to obtain the date the file was created from the catalog so I could include it in the data being written to output.
Thanks,
Anil
Anil
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Get file creation date using a COBOL program.
As long as it is for information only, not for any business use, yes?
Re: Get file creation date using a COBOL program.
Well, call a rexx program or call IDCAMS directly and parse its output.
Regards
Nic
Nic
Re: Get file creation date using a COBOL program.
That's correct. But if it's a no, will the answer change for the approach?William Collins wrote:As long as it is for information only, not for any business use, yes?
Thanks,
Anil
Anil
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
Re: Get file creation date using a COBOL program.
It would be plain stupid to use it for business purposes (JOBs will sometimes be re-run, and then you'd get a completely unexpected date, any formal testing would be nuts).
To get the date, for information only, IDCAMS is a viable choice.
To get the date, for information only, IDCAMS is a viable choice.
Re: Get file creation date using a COBOL program.
Thanks IDCAMS has worked for me.William Collins wrote:It would be plain stupid to use it for business purposes (JOBs will sometimes be re-run, and then you'd get a completely unexpected date, any formal testing would be nuts).
To get the date, for information only, IDCAMS is a viable choice.
Thanks,
Anil
Anil
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute