[Info-vax] OpenVMS - DCL - Data entry filtering
David Froble
davef at tsoft-inc.com
Fri Mar 27 20:47:29 EDT 2015
Phillip Helbig (undress to reply) wrote:
> In article <mf4jdf$ahn$1 at dont-email.me>, David Froble
> <davef at tsoft-inc.com> writes:
>
>> So, you want a unique filename. This should work in most cases ....
>>
>> $ ! Get date in YYYY-MM-DD format
>> $
>> $ T = f$cvtime(f$time())
>> $
>> $ ! Now convert to YYYYMMDD format
>> $
>> $ YY = f$extract(0,4,T)
>> $ MM = f$extract(5,2,T)
>> $ DD = f$extract(8,2,T)
>> $ HH = f$extract(11,2,T)
>> $ NN = f$extract(14,2,T)
>> $ SS = f$extract(17,2,T)
>> $ XX = f$extract(20,2,T)
>> $
>> $ D = YY + MM + DD + HH + NN + SS + XX
>> $
>> $ write sys$output D
>
> Much quicker:
>
> $ WRITE SYS$OUTPUT F$UNIQUE()
>
But, as a bonus, I get a time stamp, and the output from that f$unique()
can be rather ugly, and harder to type.
More information about the Info-vax
mailing list