IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SAS: Unable to detect the DB2 table


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Tue Jan 27, 2009 11:27 am
Reply with quote

Hi All,

I have a query which I was facing while accessing a DB2 table from SAS program...

I have 2 tables in my environment with names...
1) TAKT_POLICYHOLD_01
2) TAKT_POLICY_EXPIRATION_200811.

I was accessing the DB2 tables in SAS pgm as
Code:

LIBNAME DB2LIB DB2                             
               SSID=D2A1                             
               DBCONINIT="SET CURRENT SQLID='WGAK713'";
 
PROC CONTENTS DATA=DB2LIB.TAKT_POLICYHOLD_01;
RUN;
 
PROC CONTENTS DATA=DB2LIB.TAKT_POLICY_EXPIRATION_200811;
RUN;


I was able to retreive the data about the 1st table whereas when the 2nd table is accessed, I receive an error in the below format...
"The file DB2LIB.TAKT_POLICY_EXPIRATION_200811.DATA has too long a member name for the DB2LIB library.

Even when the 2nd table is used using the PROC SQL statement, I was receiving the same error... Can you give me any clue what went wrong...??

I have tried using named literal style also...i.e.,
"TAKT_POLICY_EXPIRATION_200811"n. Even then I face the same error...

Your help will be highly appreciated....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jan 27, 2009 12:27 pm
Reply with quote

Quote:
"The file DB2LIB.TAKT_POLICY_EXPIRATION_200811.DATA has too long a member name for the DB2LIB library.

Isn't the above error message just a smidge of a give away ? icon_rolleyes.gif

The name is too long, therefor it exceeds the maximum allowable length for a name.
Back to top
View user's profile Send private message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Tue Jan 27, 2009 12:39 pm
Reply with quote

Actually its a DB2 table name, I am accessing but not a variable name... I think DB2 table can have a max of 32 characters length as its name.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jan 27, 2009 1:11 pm
Reply with quote

I guess that you have the following option set >> VALIDVARNAME=V7

And you get the same result from PROC SQL ? I can sort of see that PROC CONTENTS might append a .DATA on the end as it expects a DATA file as input.

Can you post the PROC SQL
Back to top
View user's profile Send private message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Tue Jan 27, 2009 2:05 pm
Reply with quote

Below is the code... Whereever I use this table name, I am receiving the same error. and I am not using any option called VALIDVARNAME=V7, becoz the default would be V7 only....

Code:

PROC SQL;                                                           

     UPDATE DB2LIB.TAKT_POLICY_EXPIRATION_200811
           SET EXP_DT   =   SUBSTR(SYSPARM(),2,8)
                               
QUIT;                                                               
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jan 27, 2009 3:10 pm
Reply with quote

Quote:
VALIDVARNAME=V7, becoz the default would be V7 only....


Really, have you checked ?

It allows names of up to 32 characters. Just something that might help you, that's all.
Back to top
View user's profile Send private message
rajesh1183

New User


Joined: 07 Jan 2008
Posts: 98
Location: Hyderabad

PostPosted: Tue Jan 27, 2009 3:32 pm
Reply with quote

The manuals say, the default is V7. Since I haven't mentioned this in the OPTIONS statement, I think, the default would be in effective.

Search this link SAS website

with string as "VALIDVARNAME= System Option"


Can I know the process for checking the default system options that my SAS pgm is using...??
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jan 27, 2009 3:50 pm
Reply with quote

PROC OPTIONS;
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top