View previous topic :: View next topic
|
Author |
Message |
pkmurali Warnings : 1 Active User
Joined: 15 Dec 2005 Posts: 271
|
|
|
|
Hi Everybody,
I like to use an Data type(Numeric)that accepts the variable length in COBOL like DB2 VAR CHAR.Is there any Level No for the same.Please Reply Soon. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
I like to use an Data type(Numeric)that accepts the variable length in COBOL like DB2 VAR CHAR.Is there any Level No for the same.Please Reply Soon. |
No there is not, why not to declare NUMERIC value with the maximum number of digits it may have....If you dont know that...give Maximum...
From Manuals FYI...
Regards,
Priyesh. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi PK,
You can define a DB2 varchar host variable in COBOL like this:
Code: |
05 your-data.
49 yr-data-len pic S9(4) comp.
49 yr-data-txt pic X(25). |
The len contains the length of the string in txt. You then use a refmod move to extract the string.
E.g. move yr-data-txt(1:yr-data-len) to some-where |
|
Back to top |
|
|
|