Ver Mensaje Individual
  #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