Field Definitions



It is not possible to cover a comprehensive range of data item definitions across all three programming languages but the table opposite should contain the most commonly observed definitions.

Data Definition comparison, Assembler, Cobol and PLI



Assembler

 

COBOL

 

PLI

DC H'0'

 

PIC S9(4) COMP-5 VALUE 0.

 

FIXED BIN(15,0) INIT(0);

DS H

 

PIC S9(4) COMP-5.

 

FIXED BIN(15,0);

DC F'0'

 

PIC S9(8) COMP VALUE 0.

 

FIXED BIN(31,0) INII(0);

DS F

 

PIC S9(8) COMP.

 

FIXED BIN(31,0);

DC C' '

 

PIC X VALUE SPACE.

 

CHAR(1) INIT(' ');

DS C

 

PIC X.

 

CHAR(1);

DC CL10' '

 

PIC X(10) VALUE SPACES.

 

CHAR(10) INIT((10) ' ');

DS CL10

 

PIC X(10).

 

CHAR(10);

DC PL2(4)

 

PIC S9(3) COMP-3 VALUE +4.

 

FIXED DEC(3,0) INIT(4);

DS PL2

 

PIC S9(3) COMP-3.

 

FIXED DEC(3,0);



Definitions which allow data editting such as PIC ZZ9.99 (COBOL) or PIC 'ZZ9.99' (PLI) are not included here as Editing is done differently in Assembler, and is discussed later.



Copyright © Legac-e Education 2015-