how to describe a table in spufi

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
ravi.kiran.g
Member
Posts: 1
Joined: Tue Aug 16, 2011 9:33 pm

how to describe a table in spufi

Post by ravi.kiran.g » Tue Aug 16, 2011 9:44 pm

Hi everyone,

I was actually trying to describe the mainframe table way.

describe table HESSDB2W.HLTHCRD_VLDTN_LOG

but i am getting an error

SQLCODE = -104, ERROR: ILLEGAL SYMBOL "HESSDB2W"

the syntax is right. i donno why is it giving an error.

Can anyone help..

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Aug 17, 2011 3:11 am

What happens if you remove this: "HESSDB2W."?
Have a good one

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Aug 17, 2011 3:22 am

If you would look at the manual,
it says under INVOCATION,
that the DESCRIBE statement can only be part of an imbedded program.

DESCRIBE TABLE host-variable INTO descriptor-name
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Aug 17, 2011 3:28 am

My bad - that's what happens when i reply "off the cuff". . .

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Wed Aug 17, 2011 10:25 am

DikDude,

not to worry. i often suffer from foot-and-mouth disease.

would be interesting to know which level of db2 the ts is using.
i was quoting a db2 vsn8 manual.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

santhosh kumar
Member
Posts: 17
Joined: Wed Sep 07, 2011 9:27 am
Location: india

Post by santhosh kumar » Thu Nov 10, 2011 4:42 pm

Use the below query for describe the table

SELECT DISTINCT(NAME),COLTYPE,LENGTH FROM SYSIBM.SYSCOLUMNS WHERE TBNAME='XXXXX';

Where XXXXX= Your table name..

Try with the above query..
santhosh

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others