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 (April 1996, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 23 Apr 1996 17:17:17 PDT
Reply-To:     Melvin Klassen <KLASSEN@UVVM.UVIC.CA>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Melvin Klassen <KLASSEN@UVVM.UVIC.CA>
Subject:      Re: informat for IBM mainframe signed values
Comments: To: REINE@CMSUVMA.BITNET

Judi Reine <REINE@CMSUVMA> writes: > A co-worker needs an informat to read in a numeric value that has a C or > F at the end for positive numbers and a D at the end for negative numbers. > There is an informat S370FPDw.d that is close to what he needs, > except that informat reads packed decimal values. There is also a > S370FIBw.d that works for integer binary. Is there a similar informat > for 'regular' numbers with the C, F, or D tag at the end? > Examples: 218F = 218 356D = -356

Use the "zoned-decimal" informat: ZDw.d to read '218F' as '+2186' and '356D' as '-3564' and '123C' as '+1233' and '567E' as '-5675', and then divide by '10', and "truncate" the remainder, to yield '+218', '-356', '+123', and '-567'.

Note that 'C' through 'F' are the 3rd through 6th alphabetic letters, which explains why the last digit is either 3 or 4 or 5 or 6.


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