Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Length of DB2 VARCHAR in COBOL declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
raman.k

New User


Joined: 26 Feb 2007
Posts: 24
Location: chennai

PostPosted: Wed May 02, 2007 8:06 pm    Post subject: Length of DB2 VARCHAR in COBOL declaration
Reply with quote

Hi
I want know the COBOL Db2 programme
In db2 one VARCHAR varibale is there. Now I declared the COBOL equailent. Like
EMP VARCHAR(20).
in COBOL
01 EMP.
49 Len s9(6) comp.
49 name x(20).

Why we need to use length. Can we change any other level number instead of 49.
Please tell describe me

Thanks
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed May 02, 2007 9:22 pm    Post subject: Re: Length of DB2 VARCHAR in COBOL declaration
Reply with quote

raman.k wrote:

01 EMP.
49 Len s9(6) comp.
49 name x(20).
Why we need to use length. Can we change any other level number instead of 49.
After a quick stop off at the FM, I found that it has to be 49. Why we need the length? What do you thing the definition of "variable" is?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us