Date: Tue, 18 May 2004 11:34:53 -0400
Reply-To: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject: Re: What Format to use ? " hex unsigned data"
On Tue, 18 May 2004 09:26:07 -0400, Kevin Clark <KClark@CMS.HHS.GOV> wrote:
>I've been at this for two days now. I'm a MVS mainframe guy.
>I have a field in a assembler DSECT DC F'0' 4 byte length.
>it contains a time in HHMMSSTT format.
>so 00053887 would be 00:05:38.87 .
>my problem is i've tried PIB4, HEX4 $CHAR4 and even TIME. and nothing
>works. I just want to grab it and add the colons and print it using
>Kevin (stuck in a fullword ) clark
for the input you should try PIB Informat. If that does not work, maybe
float = RB ? But I assume PIB should be right, if it is a unsigned integer.
Then you can do:
x=00053887; /* that instead of INPUT x pib4.; */
cx=put(x,z8.); /* you can avoid the CX variable if you */
time=hms(input(substr(cx,1,2),2.), /* insert the PUT here */
put time time12.2;
TIME is a SAS time-value (numeric) which you should format with TIME12.2 in