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:
Tad Bochan <[log in to unmask]>
Reply To:
Tad Bochan <[log in to unmask]>
Date:
Mon, 6 Nov 1995 13:29:13 GMT
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
[This note has been sent to the following InterNet address(es):
HP3000-L @ UTCVM.UTC.EDU]
 
 
 
> Subject: Help with string extraction plse (fwd)
 
> 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.
 
Try this :-
 
setvar fname "file"+rht("0!hpmonth",2)+rht("0!hpdate",2)
 
or even (version 97)
 
setvar fname "file"+rht("0000![hpmonth*100+hpdate]",4)
 
or even (version 98)
 
you could set up this command file and call it TSTAMP :-
    PARM t=timestamp  f=timetemp
    echo > !f
    setvar !t '000![finfo("!f",-8)]'+rht('000000![finfo("!f",-24)]',6)
    return
and then use it as follows :-
:tstamp
:showvar timestamp
TIMESTAMP = 19951106171339
:setvar fname "file"+str(timestamp,5,4)
 
 
[log in to unmask]

ATOM RSS1 RSS2