VARCHAR

db2 sql interview questions

Moderator: Moderator Group

Post Reply
rajkumarprajapati
Member
Posts: 40
Joined: Tue Sep 18, 2007 1:17 pm

VARCHAR

Post by rajkumarprajapati » Fri Apr 10, 2009 10:19 am

Why VARCHAR should be declare at level no. 49?

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Apr 10, 2009 3:00 pm

May be this link can help: http://publib.boulder.ibm.com/infocente ... 006146.htm

Search for VARCHAR on right side.
Regards,
Anuj

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

Post by dbzTHEdinosauer » Fri Apr 10, 2009 3:10 pm

Why VARCHAR should be declare at level no. 49?
same reason structures start as a 01 level and
condition codes are 88

just syntax -rules of coding.

db2 expects the host elementary items defining the length and data portion of a varchar column to be coded at level 49.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

mf.vannan
Member
Posts: 2
Joined: Sun Oct 11, 2009 9:56 pm
Location: Chennai

Level 49

Post by mf.vannan » Tue Nov 16, 2010 4:45 pm

The main use of the Level 49 is to send and receive the variable length record between cobol and db2
Last edited by mf.vannan on Tue Nov 23, 2010 11:47 am, edited 1 time in total.

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

Post by dbzTHEdinosauer » Tue Nov 16, 2010 7:42 pm

mf.vannan,

if you are going to go to the trouble of using a larger font and a color
to emphasize the superior content of your post,
at least make it accurate.

First of all, the word record has nothing to do with DB2.
it is a variable length column.

to properly phrase your answer, one should say,
the Level 49 stucture contains two fields.
one to contain the data, and one to contain the length of the data.
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