Ver Mensaje Individual
  #5
Antiguo 3 de diciembre de 2015, 13:26
Kuk
Administrador
Última Actividad 21.09.2026 18:24
Posts Posts: 2.500
Likes enviados Enviados: 1037
Likes recibidos Recibidos: 1207

Josber, he mirado más por internet y lo que he encontrado definitivamente es lo que decía antes:

Cita:

TEXT and CHAR will convert to/from the character set they have associated with time. BLOB and BINARY simply store bytes.

BLOB is used for storing binary data while Text is used to store large string.

BLOB values are treated as binary strings (byte strings). They have no character set, and sorting and comparison are based on the numeric values of the bytes in column values.

TEXT values are treated as nonbinary strings (character strings). They have a character set, and values are sorted and compared based on the collation of the character set.

MySQL :: MySQL 5.0 Reference Manual :: 11.4.3 The BLOB and TEXT Types
Es decir, el BLOB como tal no existe en COBOL. Pero en definitiva sigue siendo texto, lo que pasa es que mientras que a los CHAR se les asigna un CHARACTER SET para mostrar el juego te caracteres correspondiente a una codificación, los BLOB y VARBINARY no tienen CHARACTER SET y se asigna byte por byte el código que tú le metas. Con lo cual, digo yo que debería funcionarte como si fuera un PIC X(?).

MySQL :: MySQL 5.0 Reference Manual :: 11.1.3 String Type Overview

Cita:
Specifying the CHARACTER SET binary attribute for a character data type causes the column to be created as the corresponding binary data type: CHAR becomes BINARY, VARCHAR becomes VARBINARY, and TEXT becomes BLOB.
La longitud del BLOB máxima es de 255 caracteres. Por ello debe ser, sea un PIC X(255), sea también puedes probar con un campo padre:

Código COBOL:
  1.  01  MI-BLOB.
  2.     49  FILLER PIC X(256).

Para VARBINARY debería ser sea:

Código COBOL:
  1.  01  MI-VARBIN.
  2.     49  MI-VARBIN-L PIC S9(4) COMP-4.
  3.     49  MI-VARBIN-D PIC X(256).

Sea lo mismo pero haciendo MI-VARBIN-D (datos) como MI-BLOB, es decir con campo padre.

A ver qué tal...



NORMAS DEL FORO - para garantizar el buen funcionamiento del Foro.
¿Te han ayudado? NO TE OLVIDES de darle a
¿Quieres dirigirte a alguien en tu post? Notifícale haciendo clic en su Nick
Kuk is offline   Responder Con Cita