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

Why Varchar in db2 instead of COBOL Binary


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nandinihb

New User


Joined: 10 Dec 2005
Posts: 11
Location: b'lore

PostPosted: Mon Mar 27, 2006 5:00 pm
Reply with quote

hi all,
in db2 why we declare varchr(n) to cobol equivalent of
pic s9(4)comp
pic x(n)

thanks
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Mar 27, 2006 7:12 pm
Reply with quote

Hi nandinihb,

pic s9(4)comp is to be defined to capture length of the field while pic x(n) represents the value of the variable.

So when you extract data you might need to modify reference as according to variable length stored in earlier part.

Regards,
Priyesh.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top