Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
[VAX COBOL, PLI] VAX COBOL And PLI Data Type Comparisons
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
Copyright (c) Digital Equipment Corporation 1994. All rights reserved
PRODUCT:  VAX Cobol
          VAX PLI

OP/SYS:   OpenVMS VAX

SOURCE:   Digital Equipment Corporation


SUBJECT:

Below is a table comparing the COBOL and PLI data types.


DESCRIPTION:

type/(size in bytes)       COBOL data type                  PLI data type
--------------------       ---------------                  -------------
byte (1)                   n/a                              fixed binary(7)

word (2)                   pic s9(n)V9(s) comp              fixed binary(15,s)
                             [n+s <= 4]

longword (4)               pic s9(n)V9(s) comp              fixed binary(31,s)
                             [4 < n+s <= 10]

quadword (8)               pic s9(n)v9(s) comp              n/a
                             [n+s <= 18]

f float  (4)               comp-1                           float decimal(n,s)
                                                              [1 <= n <= 7]
                                                            float binary(n,s)
                                                              [1 <= n <= 24]

d float  (8)               comp-2                           float decimal(n,s)
                                                              [8 <= n <= 15]
                                                            float binary(n,s)
                                                              [25 <= n <= 53]

g float  (8)               n/a                              float decimal(n,s)
use /g_float compile                                          [8 <= n <= 15]
     qualifier                                              float binary(n,s)
                                                              [25 <= n <= 53]

h float  (16)              n/a                              float decimal(n,s)
                                                              [16 <= n <= 34]
                                                            float binary(n,s)
                                                              [54 <= n <= 113]

packed decimal             pic s9(n)v9(s) comp-3            fixed decimal(n,s)
(n+1)/2 rounded up

ascii text (1-65535)       pic x(n)                         char(n)
                             [n <= 65535]                     [n <= 65535]

ascii text (1-65535)       pic a(n)                         char(n)
                             [n <= 65535]                     [n <= 65535]

bit                        n/a                              bit(n) [aligned]
                                                              [n <= 64]

pointer  (4)               pointer                          pointer

index    (4)               usage is indexed                 n/a

right overpunch            pic s9(n)v9(s)                   pic'9(n)V9(s)T'
(n+s) <= 18

left overpunch             pic s9(n)v9(s)                   pic'T9(n)V9(s)'
(n+s) >= 18                  sign is leading

right separate             pic s9(n)v9(s)                   pic'9(n)V9(s)S'
(n+s+1) <= 18                sign trailing separate

left separate              pic s9(n)v9(s)                   pic'S9(n)V9(s)'
(n+s+1) <= 18                sign leading separate

unsigned numeric (n+s)     pic 9(n)v9(s)                    pic'9(n)V9(s)'





buy online or call 1.800.AT.COMPAQ
privacy statementusing this site means you accept its terms