Cobol Foro
Navegación en el Foro
Retroceder   Cobol Foro Entornos de desarrollo y compiladores Cobol Fujitsu COBOL PowerCOBOL (ActiveX, v4 - v11)
PowerCOBOL (ActiveX, v4 - v11) Versiones del IDE basadas en ActiveX
 
Otros temas que te pueden interesar
Tema Autor Foro Respuestas Último post
[Duda] Error al instalar Netcobol v7 en Windows 10 64 bit lumalma NetCOBOL 5 9 de diciembre de 2021 16:43

Respuesta

  #1
Antiguo 22 de abril de 2016, 11:23
Kuk
Administrador
Última Actividad 19.09.2026 20:11
Posts Posts: 2.500
Likes enviados Enviados: 1037
Likes recibidos Recibidos: 1207
Pregunta ¿Para qué es el PIC 1() BIT ?
0 Inactivo Inactivo

Amigos, pues eso, para qué es el PIC 1? Existe sin BIT y con BIT...



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
  #2
Antiguo 23 de abril de 2016, 20:28
Dasije
Forero Senior
Última Actividad 06.03.2022 17:04
Posts Posts: 173
Likes enviados Enviados: 1
Likes recibidos Recibidos: 79

En base de datos de Microsoft como Access o SQL Server, sería los valores True/False, en COBOL sería un campo numérico de un solo carácter que solo tiene dos números validos 0 y 1.

Código COBOL:
  1. 01 VERDADERO  PIC 1 BIT VALUE  B"1".
  2. 01 FALSO         PIC 1 BIT VALUE  B"0".

Saludos.



Empresa de desarrollo de aplicaciones en COBOL.

DASIJE INFORMATICA, S.L.
C/ TOMAS BRETON 20
11406 JEREZ DE LA FRONTERA
CADIZ

Teléfono : 956 11 21 11
Web: http://www.dasije.es / DASIJE INFORMATICA
E-m@il: clientes(@)dasije.es
Dasije is offline   Responder Con Cita
  #3
Antiguo 23 de abril de 2016, 22:10
Kuk
Administrador
Última Actividad 19.09.2026 20:11
Posts Posts: 2.500
Likes enviados Enviados: 1037
Likes recibidos Recibidos: 1207

Dasije, según el manual, no es sólo 0 o 1, ùede haber más longitud, es por eso que no me estoy enterando:

Cita:
Example of Insertion of a Slack Bit (1)
Below is an example of a slack bit insertion for the following record description
entry.
Código COBOL:
  1. 01 RECORD-A.
  2. 02 DATA-A1.
  3. 03 DATA-A11 PIC 1(4) BIT.
  4. 03 DATA-A12 PIC 1(3) BIT SYNC.
  5. 03 DATA-A13 PIC 1(5) BIT.
  6. 02 DATA-A2 PIC 1(4) BIT.
DATA-A12 is allocated to a one-byte boundary, so four slack bits are inserted
between DATA-A11 and DATA-A12.
A one-byte area is allocated to DATA-A12, so five slack bits are inserted between
DATA-A12 and DATA-A13.
DATA-A13 is the last internal Boolean data item subordinate to DATA-A1, so three
slack bits are inserted after DATA-A13.
The above record description entry is equivalent to the example shown below.
Código COBOL:
  1. 01 RECORD-A.
  2. 02 DATA-A1.
  3. 03 DATA-A11 PIC 1(4) BIT.
  4. 03 FILLER PIC 1(4) BIT. <-- Slack bit
  5. 03 DATA-A12 PIC 1(3) BIT.
  6. 03 FILLER PIC 1(5) BIT. <-- Slack bit
  7. 03 DATA-A13 PIC 1(5) BIT.
  8. 03 FILLER PIC 1(3) BIT. <-- Slack bit
  9. 02 DATA-A2 PIC 1(4) BIT.
Example of Insertion of a Slack Bit (2)
Below is an example of a slack bit insertion in a group item where an OCCURS clause
has been specified for the following record description entry.
Código COBOL:
  1. 01 RECORD-B.
  2. 02 DATA-B1 OCCURS 10 TIMES.
  3. 03 DATA-B11 PIC 1(5) BIT.
  4. 03 DATA-B12 PIC 1(5) BIT.
DATA-B1 is allocated to begin on a one-byte boundary where DATA-B1 is repeated.
Therefore, six slack bits are inserted after DATA-B12. The slack bits inserting method
is the same as the repetition of DATA-B1.
When an OCCURS clause has been specified in a Boolean data item containing no
SYNCHRONIZED clause, no slack bit is inserted between each table element
occurrence. For example, no slack bit is inserted between each occurrence of DATAC1 in the case shown below.
Código COBOL:
  1. 02 DATA-C1 PIC 1(3) BIT OCCURS 6.



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
Respuesta


Herramientas

Derechos de Publicación
No puedes publicar nuevos temas
No puedes publicar posts/responder
No puedes adjuntar archivos
No puedes editar tus posts

BB code is habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado

Saltar a Foro


La franja horaria es GMT +2. Ahora son las 17:01.
Powered by: vBulletin, Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.