HP3000-L Archives

July 1998, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Stigers, Greg ~ AND" <[log in to unmask]>
Reply To:
Stigers, Greg ~ AND
Date:
Mon, 13 Jul 1998 15:25:19 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
Programmatically? In COBOL? Sure. In addition to getting the file
creation date via finfo and MOVE CURRENT-DATE (or an intrinsic), get
both in YYYYMMDD format, then use the INTEGER-OF-DATE function to
subtract the creation date integer from the current date integer, giving
the difference. To use the INTEGER-OF-DATE function, you will need the
POST85 compiler directive, but the function is ANSI 89, if that helps.

SUBTRACT FUNCTION INTEGER-OF-DATE (FILE-CREATION-DATE-AS-YYYYMMDD)
    FROM FUNCTION INTEGER-OF-DATE (CURRENT-DATE-AS-YYYYMMDD)
    GIVING DAYS-SINCE-FILE-CREATION
END-SUBTRACT

> -----Original Message-----
> From: Simonsen, Larry [SMTP:[log in to unmask]]
> Sent: Monday, July 13, 1998 2:58 PM
> To:   [log in to unmask]
> Subject:      [HP3000-L] days since creation of file
>
> is there a simple way to calculate the number of days since file
> creation using the finfo and other functions?

ATOM RSS1 RSS2