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 (June 2001, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 19 Jun 2001 09:29:49 -0700
Reply-To:   Graham Dodsworth <gdodsworth@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Graham Dodsworth <gdodsworth@HOTMAIL.COM>
Organization:   http://groups.google.com/
Subject:   DB2 (MVS) - EBCDIC/ASCII problem ?
Content-Type:   text/plain; charset=ISO-8859-1

Hello,

I'm using the (Windows NT) SAS pass-through to get data from DB2 on an MVS system. For the 'where' clause part of the SQL I'm wanting to restrict it to values of the column/variable 'Stat2' that are blank. By 'blank' I mean rows where the value of Stat2 is a single space character.

If I try using the following 'where' clause to achieve this it doesn't seem to work - i.e. the syntax seems to be correct but the blank character on the DB2 table is not recognised as the same as the blank character I type in on my PC.

Where Stat2 = ' '

Is this something to do with me needing to use the EBCDIC version of a blank space as opposed to the ASCII version ? If so how would I actually do this.

I've included the code I'm currently using below to get around this problem. I could keep using this code but I think there maybe a better way of doing it.

Any help would be greatly appreciated.

Graham Dodsworth

RSubmit;

Proc Sql ;

Connect To DB2(SSID=Whatever);

Select * From Connection To DB2

(Select PolRef From dbac00.policyfile Where Stat2 Not In ( 'C', 'S', 'R', 'X', 'Z' ) );

Disconnect From DB2;

Quit;

EndRSubmit;


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