I need to read image sql server datatype in a cobol futjitsu program but i have no idea how to say to the program to threat this field as binary and not char (i use pic x(15000), perhaps this is the foult)
thank's for help
Antonio
I must admit I never worked with images in COBOL.
To me x(15000) should work.
But realise that this area will always be filled with trailing spaces!
If you know the exact(!) length, than
you may be able to use something like the following record definition:
assuming that:
[A] An image is never larger than approx. 195Kb. All bytes are used completely(!), up til and including the last byte.
Alphanumeric moves should not change the bit pattern.
However(!), when you move between an EBCDIC and an ASCII code based system then the move must be binary (or something similar).
Otherwise the system may attempt to translate any byte that resembles a character from the used character set.
Note!
There might be 1 or more special COBOL (vendor) extensions for exactly this kind of problem (similar like the field types defined for DB2).
In that case I hope somebody else, more knowledgeable, will reply to this post.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.