Date: Wed, 17 Aug 2011 11:39:52 -0400
Reply-To: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Clark <jclark@HILLTOP.UMBC.EDU>
Subject: Re: how Pad SSNO with 0
Content-Type: text/plain; charset="us-ascii"
Read your SSN as a numeric field, then apply the z9. format to create a
9-byte character variable with leading zeros.
Ssn_new = put(ssn,z9.);
University of Maryland, Baltimore County
Sondheim Hall, 3rd Floor
1000 Hilltop Circle
Baltimore, MD 21250
Please consider the environment before printing this e-mail and/or any attachments.
Confidentiality Notice: This e-mail may contain information that is legally privileged and that is intended only for the use of the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying of this e-mail, distribution, or action taken in reliance on the contents of this e-mail and/or documents attributed to this e-mail is strictly prohibited. If you have received this information in error, please notify the sender immediately by phone and delete this entire e-mail. Thank you.-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Jamil M Ibrahim
Sent: Wednesday, August 17, 2011 11:29 AM
Subject: how Pad SSNO with 0
Why it does not read the ssn? I try to pad the leading spaces in SSno
667 ***get rid of commas using dlm=',' and double quotes using dsd in
SYMBOLGEN: Macro variable PATH resolves to
SYMBOLGEN: Some characters in the above value which were subject to
macro quoting have been unquoted for printing.
668 INFILE "&PATH" lrecl=400 missover pad dsd dlm=',';
670 length FName MName LName EthnDesc $25. ssn $9. ;
672 INPUT (Studno1 FName MName LName studno2 SSN Gender studno3
EthnicCd EthnDesc) ($) mcat
673 M1Avg M2Avg M3Avg CumAvg ;
675 ssn=input(ssn,z9.); Name = trim(left(lName)) || "? " ||
ERROR 48-59: The informat Z was not found or could not be loaded.
Dr. Jamil Ibrahim, Ph.D.
Scientist IV, Research Supervisor, Professor, SHRP
2500 N State St. Jackson, MS 39216-4505
Tel: (601) 984-1197 Fax: (601) 984-1205
Individuals who have received this information in error or are not
authorized to receive it must promptly return or dispose of the
information and notify the sender. Those individuals are hereby notified
that they are strictly prohibited from reviewing, forwarding, printing,
copying, distributing or using this information in any way.