how to substring numeric field

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
kpuser1
Member
Posts: 1
Joined: Tue May 01, 2012 7:34 am

how to substring numeric field

Post by kpuser1 » Tue May 01, 2012 7:49 am

I have a field(NUMA) defined as smallint in DB2. I want to convert it to char(2) in a sql to display the value. Any suggestions?

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

Post by dbzTHEdinosauer » Tue May 01, 2012 7:54 pm

yeah, read here

fields,records, file are associated with files.
columns,rows,tables are associated with db2.

learn the difference and incorporate you knowledge in
future posts.

also, in the future, first consult the manual, and try experimenting on you own,
before posting such a question.

it is rather rude of you to expect us to read the manul for you.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

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