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 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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.


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