LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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:

>Hello all, > >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 >PROC REPORT. > > >Kevin (stuck in a fullword ) clark

Hi Kevin, 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:

data test; 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 */ input(substr(cx,3,2),2.), input(substr(cx,5,4),4.2)); put time time12.2; run;

TIME is a SAS time-value (numeric) which you should format with TIME12.2 in PROC REPORT.


Back to: Top of message | Previous page | Main SAS-L page