Date: Thu, 26 Apr 2007 16:18:19 -0400
Reply-To: Rathindronath <mehedisas@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rathindronath <mehedisas@YAHOO.COM>
Subject: A COMPLEX FORMATTING ISSUE
I have the following numeric variable:
subject
-------
601
1101
507
501
601
5506
7609
9987
I need to add and change the format with these conditions:
a) "ABDE_0125_00" will be constant always in the begening of the
value,
b) the last two digit of the given subject variable will be the
last two digit the output, like if the last two digit of the given
subject is 01 then we will see "0001" in the output as last four
digit,
c) After the constant value and before the last four digit
in the result variable we will have the - digits located infront of the
last two
digit of the given variable. so if the digit/ digits before last two
variable
in the given subject variable is 6 then we will have "06" additing to
(after)
"ABDE_0125_00".
The Result should be as below:
subject
--------
ABDE_0125_0006_0001
ABDE_0125_0011_0001
ABDE_0125_0005_0007
ABDE_0125_0005_0001
ABDE_0125_0006_0001
ABDE_0125_0055_0006
ABDE_0125_0076_0009
ABDE_0125_0099_0087
Thanks a lot.