View previous topic :: View next topic
|
Author |
Message |
s.saranya srinivasan
New User
Joined: 25 Sep 2015 Posts: 9 Location: india
|
|
|
|
what is the equivalent varchar representation in cobol? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What does any manual say? What do your colleagues say? |
|
Back to top |
|
|
s.saranya srinivasan
New User
Joined: 25 Sep 2015 Posts: 9 Location: india
|
|
|
|
for example
name varchar (20)
in cobol
05 name
49 txt pic x(20)
49 len pic s9(4) comp |
|
Back to top |
|
|
s.saranya srinivasan
New User
Joined: 25 Sep 2015 Posts: 9 Location: india
|
|
|
|
one more question
in comp
how they are saying 9(4) means 2 bytes??
Data name length Length in COBOL
9(01) to 9(04) 2 bytes
9(05) to 9(09) 4 bytes
S9(10) to S9(18) 8 bytes |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And don't define it as COMP, use COMP-5, for sure if you variable data may be greater than 9999 bytes, and it is good practice for the next copy/paste. |
|
Back to top |
|
|
s.saranya srinivasan
New User
Joined: 25 Sep 2015 Posts: 9 Location: india
|
|
|
|
Thanks for the reply...
the attached link was useful. |
|
Back to top |
|
|
|