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 (February 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 14 Feb 1996 16:06:14 PST
Reply-To:     TWB2%Rates%FAR@GO50.COMP.PGE.COM
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         TWB2%Rates%FAR@GO50.COMP.PGE.COM
Subject:      More Communications Decency Act Violations
Comments: cc: LAW4%Rates%FAR@go50.comp.pge.com,
          SWS3%Rates%FAR@go50.comp.pge.com, GDI1%Rates%FAR@go50.comp.pge.com,
          SJM5%Rates%FAR@go50.comp.pge.com

I am debugging a datastep. It is, I must admit, indecently complex and not suitable for the minds of children--our company probably violated the CDA just piping the source from our mainframe to my terminal. This datastep begins by merging three datasets (no keep lists--obscene). Then if _N_ is 1 it sets a fourth dataset. After that, it checks a classification variable and sets one of three datasets, using a key (indexed). Next, it calculates some variables. Finally, it either writes out the results to a dataset or discards the record.

Omitting bunches of stuff, the code looks like: DATA RESULT; *debug; put 'B4 MERGE' id= myvar=; MERGE ... ; BY ID; IF _N_ EQ 1 THEN SET ... ; IF CLASS EQ '1' THEN SET ONE KEY=AKEY; ELSE IF CLASS EQ '2' THEN SET TWO KEY=BKEY; MYVAR=...; IF THIS EQ THAT THEN DELETE; *debug; put 'AT END' id= myvar=; RUN;

Here is my problem: nearing the end of the second ob, the final debug line displays the id and myvar, and myvar is zero. The next statement "executed" is the RUN, followed by the DATA statement at the top. Then the first debug line executes. The value of id is unchanged (this is correct, the variable is SET so it is not reinitialized by default), but the value of myvar is 586.97973633. No executable statements have occurred since the previous debug statement, but the value has changed. Any thoughts? Does anyone recognize 586.97973633 (if that is your number, you can have it back!)? This is running in 6.08 on MVS.

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0


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