HP3000-L Archives

November 1995, Week 1

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:
Guy Smith <[log in to unmask]>
Reply To:
Guy Smith <[log in to unmask]>
Date:
Mon, 6 Nov 1995 09:36:33 EST
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
> I need to rename a file in MPE to filemmdd where mm is taken from HPMONTH
> and dd is taken from HPDATE.
>
> I need to right justify and zerofill the value so I want dd=06 not 6.
 
I found this command file on our system, and it's a fair example of the
simplest way of doing this outside of MPEX.
 
setvar md_date '!hpyear'
if hpmonth<10 then
  setvar md_date md_date+'0!hpmonth'
else
  setvar md_date md_date+'!hpmonth'
endif
if hpdate<10 then
  setvar md_date md_date+'0!hpdate'
else
  setvar md_date md_date+'!hpdate'
endif
 
 =======================================================================
Guy Smith                             Voice:  804-527-4000 ext 6664
Circuit City Stores, Inc.               FAX:  804-527-4008
9950 Mayland Drive                   E-Mail:  [log in to unmask]
Richmond, VA 23233-1464      Private E-Mail:  [log in to unmask]
USA                                Web page:  http://www.infi.net/~guys
 
The thoughts expressed herein are mine and do not reflect those of my
employer, or anyone with common sense.

ATOM RSS1 RSS2