Date: Thu, 7 Apr 2005 11:56:33 -0700
Reply-To: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject: Re: TIme with leading zero
Content-Type: text/plain; charset="us-ascii"
You could try
length currtimc $ 4;
near the top and
currtimc = reverse(substring(reverse(currtimc)||"0000",1,4));
before the PUT statement.
Barry Schwarz
OS/390 System Programmer
M/S 80-JE
Phone: 253-773-4221
Fax: 253-773-1257
-----Original Message-----
From: Alina Chu [mailto:alina.chu@NYU.EDU]
Sent: Thursday, April 07, 2005 9:37 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: TIme with leading zero
I have a requirement to create a little output file with the time that
the mainframe SAS job executes with the leading zero preserved.
OPTIONS NOCENTER;
DATA DCCNULL;
CURRDAT=TODAY();
CURRTIM=TIME();
CURRDATC=COMPRESS(PUT(CURRDAT,YYMMDD10.),'-');
CURRTIMC=COMPRESS(PUT(CURRTIM,TIME6.),':') ;
FILE UPDFIL LS=80 OLD ;
/* WRITE TO FILE WITHOUT SPACE AND SPEC CHARS */
PUT "WSSISD03"CURRDATC +(-1) CURRTIMC ;
------------------------------------------------------------------------
--------
The above produces the following card:
WSSISD0320050407917
The job executed at 09:17 am. I need it to have a leading zero without
me doing too much coding. Any suggestions would be appreciated. Thanks!
Alina
Alina Chu
New York University
|