LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 28 Sep 2000 10:36:24 -0500
Reply-To:     Jonathan_Goldberg@MASTERCARD.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jonathan Goldberg <Jonathan_Goldberg@MASTERCARD.COM>
Subject:      Re: How to reverse variables
Content-type: text/plain; charset=us-ascii

Running:

data vset; v1='1';v2='2';v3='3';v4='4';v5='5'; run;

%let n = 5;

data reverse; set vset; call poke(reverse(peekc(addr(v1),&n)),addr(v1),&n); run;

copied directly from Charles Patridge's post with SAS V8.0 under Solaris 5.6 gives:

Obs v1 v2 v3 v4 v5

1 5 4 3 2 1

just as Paul claimed it would. I cannot explain the discrepancy.

Jonathan


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