View previous topic :: View next topic |
Author |
Message |
Magesh_J Intermediate
Joined: 21 Jun 2014 Posts: 259 Topics: 54
|
Posted: Tue May 01, 2018 11:57 am Post subject: VAR Graphic to character. |
|
|
Hi,
Please advise, How do we convert to VARGRAPHIC to CHARACTER in SQL select ?
I am developing a cobol program to select records from a UDB table which has vargraphics fields.
When searched in google, ibm has provided following solution.
Code: |
CALL "IGZCD2A" USING BY REFERENCE dbcs-item alpha-item
BY CONTENT LENGTH OF dbcs-item LENGTH OF alpha-item
|
Is it possible to convert vargraphics to char in SQL itself, or we need to use above function ?
Or do we have an alternate method ?
Thanks
Magesh |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12368 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Magesh_J Intermediate
Joined: 21 Jun 2014 Posts: 259 Topics: 54
|
Posted: Tue May 01, 2018 4:27 pm Post subject: |
|
|
Hi Kolusu,
Thanks, Wrote the SQL using CHAR(Variable), worked good.
please advise, how do we convert vargraphics to character in dfsort.
Regards,
Magesh |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12368 Topics: 75 Location: San Jose
|
Posted: Thu May 03, 2018 12:59 pm Post subject: |
|
|
Magesh_J wrote: | Hi Kolusu,
Thanks, Wrote the SQL using CHAR(Variable), worked good.
please advise, how do we convert vargraphics to character in dfsort.
Regards,
Magesh |
Magesh_J,
Currently DFSORT does not have any built-in functions to convert graphical data. If your data is in plain hex, you can use TRAN function to UNHEX the data. |
|
Back to top |
|
|
Magesh_J Intermediate
Joined: 21 Jun 2014 Posts: 259 Topics: 54
|
Posted: Fri May 04, 2018 9:43 am Post subject: |
|
|
Thanks Kolusu.
Regards,
Magesh |
|
Back to top |
|
|
|
|