CA-Datacom/DB Tables

Using the CA-Datacom/DB Tables

This section describes the CA-Datacom/DB tables referenced in this document. It shows the following information:
  • the CA-DATADICTIONARY statements and data for the tables
  • the Native Key and the Master Key for each table
  • the compound fields and repeating fields, if any
The four CA-Datacom/DB tables used in the examples are named Custimers, Employees, Invoice, and Order. They are all in one CA-Datacom/DB database named Textiles. To build the tables, follow these steps:
  1. Create the CA-DATADICTIONARY entries and catalog them to CA-Datacom/DB.
  2. Create the SAS data files.
  3. Create an access descriptor and an associated view descriptor for each table. Make sure that all SAS names in the view descriptors match the names in the SAS data files. Use the access descriptors in this appendix as a model. Select every field for the access descriptors, and create view descriptors that also select every field.
  4. Run the APPEND procedure with the data set options shown here:
    proc append data=SAS-file base=view-descriptor; 
    run;

CA-DATADICTIONARY Statements for Sample Tables

Here are the CA-DATADICTIONARY statements used to create the four sample CA-Datacom/DB tables. This is input to the DDUPDATE utility.
//SYSIN   DD *
-USR ADR-INSTALL,NEWUSER
-ADD DATABASE,TEXTILES(T001)
3000 030
-END
-ADD AREA,TEX030(T001)
1000 CONNECT,TEXTILES
3001 TEX SASBXB.Datacom.TEX030
3002       TEX030       3380   04096
-END
-ADD FILE,CUSTOMF(T001)
1000 CONNECT,TEX030
3100 DB          01024       FBLK Y
3101 CUS 001 Y Y       ADR/DB
-END
-ADD RECORD,CUSTOMERS(T001)
1000 CONNECT,CUSTOMF
3200 DB
-END
-GRP START,RECORD,CUSTOMERS(T001)
-ADD FIELD,CUSTOMER
4010 START                            START
4012 S C L N 00008 00 00001
-END
-ADD FIELD,STATEZIP
4010 CUSTOMER                         START
4012 C C L N 00007 00 00001
-END
-ADD FIELD,STATE
4010 STATEZIP                         STATEZIP
4012 S C L N 00002 00 00001
-END
-ADD FIELD,ZIPCODE
4010 STATE                            STATEZIP
4012 S N R N 00005 00 00001
-END
-ADD FIELD,COUNTRY
4010 STATE                            START
4012 S C L N 00020 00 00001
-END
-ADD FIELD,TELEPHONE
4010 COUNTRY                          START
4012 S C L N 00012 00 00001
-END
-ADD FIELD,NAME
4010 TELEPHONE                        START
4012 S C L N 00060 00 00001
-END
-ADD FIELD,CONTACT
4010 NAME                             START
4012 S C L N 00030 00 00001
-END
-ADD FIELD,STREETADDRESS
4010 CONTACT                          START
4012 S C L N 00040 00 00001
-END
-ADD FIELD,CITY
4010 STREETADDRESS                    START
4012 S C L N 00025 00 00001
-END
-ADD FIELD,FIRSTORDERDATE
4010 CITY                             START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,SIGNATURELIST
4010 FIRSTORDERDATE                   START
4012 C C L N 00044 00 00005
-END
-ADD FIELD,LIMIT
4010 SIGNATURELIST                    SIGNATURELIST
4012 S N R N 00014 02 00001
-END
-ADD FIELD,SIGNATURE
4010 LIMIT                            SIGNATURELIST
4012 S C L N 00030 00 00001
-END
-ADD FIELD,BRANCHOFFICE
4010 SIGNATURE                        START
4012 S C L N 00025 00 00010
-END
-GRP END
-ADD KEY,CUSTOMERS.CUSKEY(T001)
5000 CUSKY 001 Y Y             Y
5010 ADD CUSTOMER
5011 $FIRST
-END
-ADD ELEMENT,CUSTOMERS.CUSELM(T001)
6000 CUSEL
6010 ADD CUSTOMER
6010 ADD STATE
6010 ADD ZIPCODE
6010 ADD COUNTRY
6010 ADD TELEPHONE
6010 ADD NAME
6010 ADD CONTACT
6010 ADD STREETADDRESS
6010 ADD CITY
6010 ADD FIRSTORDERDATE
6010 ADD SIGNATURELIST
6010 ADD BRANCHOFFICE
-END
-ADD FILE,EMPLOYF(T001)
1000 CONNECT,TEX030
3100 DB          01024       FBLK Y
3101 EMP 002 Y Y       ADR/DB
-END
-ADD RECORD,EMPLOYEES(T001)
1000 CONNECT,EMPLOYF
3200 DB
-END
-GRP START,RECORD,EMPLOYEES(T001)
-ADD FIELD,EMPID
4010 START                            START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,HIREDATE
4010 EMPID                            START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,SALARY
4010 HIREDATE                         START
4012 S N R N 00007 02 00001
-END
-ADD FIELD,DEPT
4010 SALARY                           START
4012 S C L N 00006 00 00001
-END
-ADD FIELD,JOBCODE
4010 DEPT                             START
4012 S N R N 00005 00 00001
-END
-ADD FIELD,SEX
4010 JOBCODE                          START
4012 S C L N 00001 00 00001
-END
-ADD FIELD,BIRTHDATE
4010 SEX                              START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,LASTNAME
4010 BIRTHDATE                        START
4012 S C L N 00018 00 00001
-END
-ADD FIELD,FIRSTNAME
4010 LASTNAME                         START
4012 S C L N 00015 00 00001
-END
-ADD FIELD,MIDDLENAME
4010 FIRSTNAME                        START
4012 S C L N 00015 00 00001
-END
-ADD FIELD,PHONE
4010 MIDDLENAME                       START
4012 S C L N 00004 00 00001
-END
-GRP END
-ADD KEY,EMPLOYEES.EMPKEY(T001)
5000 EMPKY 002 Y Y             Y
5010 ADD EMPID
5011 $FIRST
-END
-ADD ELEMENT,EMPLOYEES.EMPELM(T001)
6000 EMPEL
6010 ADD EMPID
6010 ADD HIREDATE
6010 ADD SALARY
6010 ADD DEPT
6010 ADD JOBCODE
6010 ADD SEX
6010 ADD BIRTHDATE
6010 ADD LASTNAME
6010 ADD FIRSTNAME
6010 ADD MIDDLENAME
6010 ADD PHONE
-ADD FILE,INVOICF(T001)
1000 CONNECT,TEX030
3100 DB          01024       FBLK Y
3101 INV 003 Y Y       ADR/DB
-END
-ADD RECORD,INVOICE(T001)
1000 CONNECT,INVOICF
3200 DB
-END
-GRP START,RECORD,INVOICE(T001)
-ADD FIELD,INVOICENUM
4010 START                            START
4012 S N R N 00005 00 00001
-END
-ADD FIELD,BILLEDTO
4010 INVOICENUM                       START
4012 S C L N 00008 00 00001
-END
-ADD FIELD,AMTBILLED
4010 BILLEDTO                         START
4012 S N R N 00014 02 00001
-END
-ADD FIELD,COUNTRY
4010 AMTBILLED                        START
4012 S C L N 00020 00 00001
-END
-ADD FIELD,AMOUNTINUS
4010 COUNTRY                          START
4012 S N R N 00010 02 00001
-END
-ADD FIELD,BILLEDBY
4010 AMOUNTINUS                       START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,BILLEDON
4010 BILLEDBY                         START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,PAIDON
4010 BILLEDON                         START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,COMPUTEDEXCHANG
4010 PAIDON                           START
4012 S L R Y 00008 00 00001
-END
-GRP END
-ADD KEY,INVOICE.INVKEY(T001)
5000 INVKY 003 Y Y             Y
5010 ADD INVOICENUM
5011 $FIRST
-END
-ADD ELEMENT,INVOICE.INVELM(T001)
6000 INVEL
6010 ADD INVOICENUM
6010 ADD BILLEDTO
6010 ADD AMTBILLED
6010 ADD COUNTRY
6010 ADD AMOUNTINUS
6010 ADD BILLEDBY
6010 ADD BILLEDON
6010 ADD PAIDON
6010 ADD COMPUTEDEXCHANG
-ADD FILE,ORDERF(T001)
1000 CONNECT,TEX030
3100 DB          01024       FBLK Y
3101 ORD 004 Y Y       ADR/DB
-END
-ADD RECORD,ORDER(T001)
1000 CONNECT,ORDERF
3200 DB
-END
-GRP START,RECORD,ORDER(T001)
-ADD FIELD,ORDERNUM
4010 START                            START
4012 S N R N 00005 00 00001
-END
-ADD FIELD,STOCKNUM
4010 ORDERNUM                         START
4012 S N R N 00004 00 00001
-END
-ADD FIELD,LENGTH
4010 STOCKNUM                         START
4012 S N R N 00004 00 00001
-END
-ADD FIELD,FABRICCHARGES
4010 LENGTH                           START
4012 S N R N 00010 02 00001
-END
-ADD FIELD,SHIPTO
4010 FABRICCHARGES                    START
4012 S C L N 00008 00 00001
-END
-ADD FIELD,DATEORDERED
4010 SHIPTO                           START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,SHIPPED
4010 DATEORDERED                      START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,TAKENBY
4010 SHIPPED                          START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,PROCESSEDBY
4010 TAKENBY                          START
4012 S N R N 00006 00 00001
-END
-ADD FIELD,SPECIALINSTRUCT
4010 PROCESSEDBY                      START
4012 S C L N 00001 00 00001
-END
-GRP END
-ADD KEY,ORDER.ORDKEY(T001)
5000 ORDKY 004 Y Y             Y
5010 ADD ORDERNUM
5011 $FIRST
-END
-ADD ELEMENT,ORDER.ORDELM(T001)
6000 ORDEL
6010 ADD ORDERNUM
6010 ADD STOCKNUM
6010 ADD LENGTH
6010 ADD FABRICCHARGES
6010 ADD SHIPTO
6010 ADD DATEORDERED
6010 ADD SHIPPED
6010 ADD TAKENBY
6010 ADD PROCESSEDBY
6010 ADD SPECIALINSTRUCT
//

Customers Table

The sample CA-Datacom/DB table named Customers is in the Textiles database. The user ID is DEMO. CUSKEY is the Native Key and the Master Key. CUSKEY consists of the CUSTOMER field, which contains a unique integer number for each customer.
In the Customers table, STATEZIP is a compound field, consisting of the two simple fields STATE and ZIPCODE at level 2. SIGNATURELIST is also a compound field; it consists of the LIMIT field and the SIGNATURE field. The data values for this compound field indicate whose signature is required for specific amounts of money. This compound field is also a repeating field. The last field, BRANCHOFFICE, is a repeating field that can occur ten times. It is a simple field containing city names of branch offices for the customer.
Here are the fields in the Customers table. The data is shown in Data for Customers Table.
DATA CUSTOMER;
     INPUT @1   CUSTNUM     $8.       /* CUSTOMER NUMBER        */
           @10  STATE       $2.
           @13  ZIPCODE     5.        /* ZIPCODE IF COMPANY IS  */
                                      /* IN THE U.S., OTHERWISE */
                                      /* IT IS THE MAIL CODE    */
                                      /* APPROPRIATE FOR THE    */
                                      /* COUNTRY WHERE THE      */
                                      /* COMPANY IS LOCATED     */
           @20  COUNTRY     $20.
           @42  PHONE       $12.  /
           @1   NAME        $60.  /   /* CUSTOMER'S COMPANY NAME*/
           @1   CONTACT     $30.      /* CONTACT AT CUSTOMER'S  */
                                      /* COMPANY                */
           @31  STREET      $40.  /
           @1   CITY        $25.
           @30  FIRSTORD    YYMMDD6./ /* DATE OF FIRST ORDER    */
           @1   LIMIT1      15.2      /* SIGNATURE LIMIT #1     */
           @20  SIGNATU1    $30. /    /* SIGNATURE NAME  #1     */
           @1   LIMIT2      15.2      /* SIGNATURE LIMIT #2     */
           @20  SIGNATU2    $30. /    /* SIGNATURE NAME  #2     */
           @1   LIMIT3      15.2      /* SIGNATURE LIMIT #3     */
           @20  SIGNATU3    $30. /    /* SIGNATURE NAME  #3     */
           @1   BRANCHO1    $25.      /* BRANCH OFFICE #1       */
           @30  BRANCHO2    $25. /    /* BRANCH OFFICE #2       */
           @1   BRANCHO3    $25.      /* BRANCH OFFICE #3       */
           @30  BRANCHO4    $25.;     /* BRANCH OFFICE #4       */
     FORMAT FIRSTORD DATE7.;
Data for Customers Table
CUSTOMER    NAME                                                       COUNTRY                TELEPHON      
                                                                                                            
12345678                                                                                      919/489-5682  
14324742    SANTA CLARA VALLEY TECHNOLOGY SPECIALISTS                  USA                    408/629-0589  
14569877    PRECISION PRODUCTS                                         USA                    919/489-6792
14898029    UNIVERSITY BIOMEDICAL MATERIALS                            USA                    301/760-2541
15432147    GREAT LAKES LABORATORY EQUIPMENT MANUFACTURERS             USA                    616/582-3906
18543489    LONE STAR STATE RESEARCH SUPPLIERS                         USA                    512/478-0788
19783482    TWENTY-FIRST CENTURY MATERIALS                             USA                    703/714-2900
19876078    SAN JOAQUIN SCIENTIFIC AND INDUSTRIAL SUPPLY, INC.         USA                    209/686-3953
24589689    CENTAR ZA TECHNICKU I NAUCNU RESTAURIRANJE UMJETNINA       Yugoslavia             (012)736-202
26422096    SOCIETE DE RECHERCHES POUR DE CHIRURGIE ORTHOPEDIQUE       France                 4268-54-72
26984578    INSTITUT FUR TEXTIL-FORSCHUNGS                             Austria                43-57-04
27654351    INSTITUT DE RECHERCHE SCIENTIFIQUE MEDICALE                Belgium                02/215-37-32
28710427    ANTONIE VAN LEEUWENHOEK VERENIGING VOOR MICROBIOLOGIE      Netherlands            (021)570517
29834248    BRITISH MEDICAL RESEARCH AND SURGICAL SUPPLY               Britain                (0552)715311
31548901    NATIONAL COUNCIL FOR MATERIALS RESEARCH                    Canada                 406/422-3413
38763919    INSTITUTO DE BIOLOGIA Y MEDICINA NUCLEAR                   Argentina              244-6324
39045213    LABORATORIO DE PESQUISAS VETERNINARIAS DESIDERIO FINAMOR   Brazil                 012/302-1021
43290587    HASSEI SAIBO GAKKAI                                        Japan                  (02)933-3212
43459747    RESEARCH OUTFITTERS                                        Australia              03/734-5111
46543295    WESTERN TECHNOLOGICAL SUPPLY                               Japan                  (03)022-2332
46783280    NGEE TECHNOLOGICAL INSTITUTE                               Singapore              3762855
48345514    GULF SCIENTIFIC SUPPLIES                                   United Arab Emirates   213445

CUSTOMER    STREETAD                                    CITY                        STATE     ZIPCODE

12345678                                                                              NC           .
14324742    5089 CALERO AVENUE                          SAN JOSE                      CA       95123
14569877    198 FAYETTVILLE ROAD                        MEMPHIS                       NC       27514
14898029    1598 PICCARD DRIVE                          ROCKVILLE                     MD       20850
15432147    103 HARRIET STREET                          KALAMAZOO                     MI       49001
18543489    5609 RIO GRANDE                             AUSTIN                        TX       78701
19783482    4613 MICHAEL FARADAY DRIVE                  RESTON                        VA       22090
19876078    1095 HIGHWAY 99 SOUTH                       TULARE                        CA       93274
24589689    TAKOVSKA 4                                  BELGRADE                                   .
26422096    40 RUE PERIGNON                             LA ROCHELLE                            75014
26984578    MECHITARISTENGASSE 5                        VIENNA                                  5110
27654351    103 RUE D'EGMONT                            BRUSSELS                                5010
28710427    BIRMOERSTRAAT 34                            THE HAGUE                     HV        3607
29834248    44 PRINCESS GATE, HYDE PARK                 LONDON, SW7 1PU                            .
31548901    5063 RICHMOND MALL                          VANCOUVER, V5T 1L2            BC           .
38763919    SALGUERO 2345                               BUENOS AIRES                            1405
39045213    RUA DONA ANTONIA DE QUEIROS 381             SAO PAULO                     SP        1051
43290587    3-2-7 ETCHUJMA, KOTO-KU                     TOKYO 101                                  .
43459747    191 LOWER PLENTY ROAD                       PRAHRAN, VICTORIA                       3181
46543295    4-3-8 ETCHUJMA, KOTO-KU                     TOKYO 102                                  .
46783280    356 CLEMENTI ROAD                           SINGAPORE                               2374
48345514    POB 8032                                    RAS AL KHAIMAH                             .
 

 CUSTOMER    CONTACT                           FIRSTORD             LIMIT    SIGNATU

 12345678                                            .                 .
 14324742    A. BAUM                           05FEB65             5000.00   BOB HENSON
                                                                  25000.00   KAREN DRESSER
 14569877    CHARLES BARON                     15AUG83             5000.00   JEAN CRANDALL
                                                                 100000.00   STEVE BLUNTSEN
 14898029    S. TURNER                         12NOV76            10000.00   MASON FOXWORTH
                                                                  50000.00   DANIEL STEVENS
                                                                 100000.00   ELIZABETH PATTON
 15432147    D.W. KADARAUCH                    28APR86            10000.00   JACK TREVANE
 18543489    A. SILVERIA                       10SEP79            10000.00   NANCY WALSH
                                                                  50000.00   TED WHISTLER
                                                                 100000.00   EVAN MASSEY
 19783482    M.R. HEFFERNAN                    18JUL68             5000.00   PETER THOMAS
                                                                  10000.00   LOUIS PICKERING
 19876078    J.A. WHITTEN                      11MAY79             7500.00   EDWARD LOWE
                                                                  25000.00   E.F. JENSEN
 24589689    J.V. VUKASINOVIC                  30NOV81                 .
 26422096    Y. CHAVANON                       14JUN83             5000.00   MICHELE PICARD
                                                                  10000.00   M.L.SEIS
 26984578    GUNTER SPIELMANN                  25MAY87           100000.00   FRANZ BECH
 27654351    I. CLEMENS                        14OCT86             5000.00   C.J. HELMER
 28710427    M.C. BORGSTEEDE                   10OCT85            10000.00   J.J. JASPER
 29834248    A.D.M. BRYCESON                   29JAN86             5000.00   ELVIN POMEROY
 31548901    W.E. MACDONALD                    19MAR84             1000.00   DAPHNE MARSHALL
 38763919    JORGE RUNNAZZO                    10DEC84             2500.00   M.L. CARLOS
 39045213    ELISABETE REGIS GUILLAUMON        18AUG82             1500.00   RICK ESTABAN
 43290587    Y. FUKUDA                         08FEB74            10000.00    R.YAMOTO
 43459747    R.G. HUGHES                       28JUL72             1000.00   DENNIS RICHMOND
                                                                   5000.00   JANICE HEATH
 46543295                                      19APR84            10000.00   DAPHNE MARSHALL
 46783280    LING TAO SOON                     27SEP79                 .
 48345514    J.Q. RIFAII                       10SEP86                 .


 CUSTOMER BRANCHO1                  BRANCHO2                  BRANCHO3                 BRANCHO4

 12345678
 14324742 TORONTO                   HOUSTON                   TOKYO                    LONDON
 14569877 NEW YORK                  CHICAGO                   LOS ANGELES
 14898029 NEW YORK                  CHICAGO                   DALLAS
 15432147 CHICAGO                   COLUMBUS
 18543489 HOUSTON                   DALLAS                    EL PASO                  LUBBOCK
 19783482 WASHINGTON D.C.           NEW YORK
 19876078
 24589689
 26422096 LONDON                    NEW YORK
 26984578 LONDON                    NEW YORK                  ROME
 27654351 LONDON                    BOSTON
 28710427 LONDON
 29834248 SINGAPORE                 TORONTO                   CAIRO
 31548901 SEATTLE                   TORONTO
 38763919 MIAMI                     NEW YORK
 39045213 MIAMI                     NEW YORK
 43290587 SAN FRANCISCO
 43459747 SEATTLE
 46543295 SEATTLE                   TORONTO                   SAN FRANCISCO            DENVER
 46783280
 48345514

Employees Table

The sample CA-Datacom/DB table named Employees is in the Textiles database. The user ID is DEMO. EMPKEY is the Native Key and the Master Key. It consists of the numeric field EMPID, which contains a unique integer number for each employee.
Here are the fields in the Employee table. The data is shown in Data for Employees Table.
DATA EMPLOY;
    INPUT @1  EMPID     6.          /* EMPLOYEE ID NUMBER        */
          @10 HIREDATE  YYMMDD6.
          @20 SALARY    8.2
          @30 DEPT      $6.
          @40 JOBCODE   5.
          @47 SEX       $1.
          @50 BIRTHDAT  YYMMDD6. /
          @1  LASTNAME  $18.
          @20 FIRSTNAM  $15.
          @40 MIDDLENA  $15.
          @60 PHONE     $4. ;
    FORMAT HIREDATE DATE7.;
    FORMAT BIRTHDAT DATE7.;
Data for Employees Table
  OBS  EMPID HIREDATE   SALARY DEPT   JOBCODE SEX BIRTHDAT LASTNAME
    1 119012 01JUL68  42340.58 CSR010    602   F  05JAN46  WOLF-PROVENZA
    2 120591 05DEC80  31000.55 SHP002    602   F  12FEB46  HAMMERSTEIN
    3 123456 04APR89       .               .            .  VARGAS
    4 127845 16JAN67  75320.34 ACC024    204   M  25DEC43  MEDER
    5 129540 01AUG82  56123.34 SHP002    204   F  31JUL60  CHOULAI
    6 135673 15JUL84  46322.58 ACC013    602   F  21MAR61  HEMESLY
    7 212916 15FEB51  52345.58 CSR010    602   F  29MAY28  WACHBERGER
    8 216382 15JUN85  34004.65 SHP013    602   F  24JUL63  PURINTON
    9 234967 19DEC88  17000.00 CSR004    602   M  21DEC67  SMITH
   10 237642 01NOV76  43200.34 SHP013    602   M  13MAR54  BATTERSBY
   11 239185 07MAY81  57920.66 ACC024    602   M  28AUG59  DOS REMEDIOS
   12 254896 04APR85  35000.74 CSR011    204   M  06APR49  TAYLOR-HUNYADI
   13 321783 10SEP67  48931.58 CSR011    602   M  03JUN35  GONZALES
   14 328140 10JAN75  75000.34 ACC043   1204   F  02JUN51  MEDINA-SIDONIA
   15 346917 02MAR87  46000.33 SHP013    204   F  15MAR50  SHIEKELESLAM
   16 356134 14JUN85  62450.75 ACC013    204   F  25OCT60  DUNNETT
   17 423286 19DEC88  32870.66 ACC024    602   M  31OCT64  MIFUNE
   18 456910 14JUN78  45000.58 CSR010    602   M  24SEP53  ARDIS
   19 456921 19AUG87  33210.04 SHP002    602   M  12MAY62  KRAUSE
   20 457232 15JUL85  55000.66 ACC013    602   M  15OCT63  LOVELL
   21 459287 02NOV64  50000.00 SHP024    204   M  05JAN34  RODRIGUES
   22 677890 12DEC88  37610.00 CSR010    204   F  24APR65  NISHIMATSU-LYNCH

  OBS FIRSTNAM           MIDDLENA           PHONE

    1 G.                 ANDREA             3467
    2 S.                 RACHAEL            3287
    3 PAUL               JESUS
    4 VLADIMIR           JORAN              6231
    5 CLARA              JANE               3921
    6 STEPHANIE          J.                 6329
    7 MARIE-LOUISE       TERESA             8562
    8 PRUDENCE           VALENTINE          3852
    9 GILBERT            IRVINE             7274
   10 R.                 STEPHEN            8342
   11 LEONARD            WESLEY             4892
   12 ITO                MISHIMA            0231
   13 GUILLERMO          RICARDO            3642
   14 MARGARET           ROSE               5901
   15 SHALA              Y.                 8745
   16 CHRISTINE          MARIE              4213
   17 YUKIO              TOSHIRO            3278
   18 RICHARD            BINGHAM            4351
   19 KARL-HEINZ         G.                 7452
   20 WILLIAM            SINCLAIR           6321
   21 JUAN               M.                 5879
   22 CAROL              ANNE               6245

Invoice Table

The sample CA-Datacom/DB table named Invoice is in the Textiles database. The user ID is DEMO. INVKEY is the Native Key and the Master Key. It consists of the numeric field INVOICE, which contains a unique integer number for each invoice.
Here are the fields for the Invoice table. The data is shown in Data for Invoice Table.
DATA INVOICE;
    INPUT  @1  INVOICEN 5.          /* INVOICE NUMBER           */
           @7  BILLEDTO $8.         /* COMPANY THAT PLACED THE  */
                                    /* THE ORDER                */

           @15 AMTBILLE 15.2        /* AMOUNT OF BILL IN LOCAL  */
                                    /* CURRENCY                 */
           @30 COUNTRY  $20.
           @50 AMOUNTIN 11.2 /      /* AMOUNT OF BILL IN U.S.   */
                                    /* DOLLARS                  */

           @1  BILLEDBY 6.          /* EMPLOYEE WHO WROTE THE   */
                                    /* BILL                     */

           @10 BILLEDON YYMMDD6.    /* DATE THAT BILL WAS SENT  */

           @20 PAIDON   YYMMDD6.    /* DATE THAT BILL WAS PAID  */

           @30 COMPUTED TIME8. ;    /* TIME OF DAY THAT THE     */
                                    /* EXCHANGE RATE TO U.S.    */
                                    /* DOLLARS WAS COMPUTED     */
    FORMAT BILLEDON DATE7.;
    FORMAT PAIDON DATE7.;
Data for Invoice Table
  OBS INVOICEN BILLEDTO        AMTBILLE COUNTRY                 AMOUNTIN
    1  11270   39045213   1340738760.90 Brazil                2256870.00
    2  11271   18543489     11063836.00 USA                  11063836.00
    3  11273   19783482       252148.50 USA                    252148.50
    4  11276   14324742      1934460.00 USA                   1934460.00
    5  11278   14898029      1400825.00 USA                   1400825.00
    6  11280   39045213   1340738760.90 Brazil                2256870.00
    7  11282   19783482       252148.50 USA                    252148.50
    8  11285   38763919     34891210.20 Argentina             2256870.00
    9  11286   43459747     12679156.00 Australia            11063836.00
   10  11287   15432147       252148.50 USA                    252148.50
   11  12051   39045213   1340738760.90 Brazil                2256870.00
   12  12102   18543489     11063836.00 USA                  11063836.00
   13  12263   19783482       252148.50 USA                    252148.50
   14  12468   14898029      1400825.00 USA                   1400825.00
   15  12471   39045213   1340738760.90 Brazil                2256870.00
   16  12476   38763919     34891210.20 Argentina             2256870.00
   17  12478   15432147       252148.50 USA                    252148.50

  OBS BILLEDBY    BILLEDON     PAIDON                    COMPUTED

    1  239185     05OCT88     18OCT88     3.96460000000000000E+04
    2  457232     05OCT88     11OCT88                           .
    3  239185     06OCT88     11NOV88                           .
    4  135673     06OCT88     20OCT88                           .
    5  239185     06OCT88     19OCT88                           .
    6  423286     07OCT88     20OCT88     5.81540000000000000E+04
    7  457232     07OCT88     25OCT88                           .
    8  239185     10OCT88     30NOV88     5.51630000000000000E+04
    9  423286     10OCT88           .     3.38270000000000000E+04
   10  457232     11OCT88     04NOV88                           .
   11  457232     02NOV88           .     3.11850000000000000E+04
   12  239185     17NOV88           .                           .
   13  423286     05DEC88           .                           .
   14  135673     24DEC88     02JAN89                           .
   15  457232     27DEC88           .     5.09450000000000000E+04
   16  135673     24DEC88           .     3.95630000000000000E+04
   17  423286     24DEC88     02JAN89                           .

Order Table

The sample CA-Datacom/DB table named Order is in the Textiles database. The user ID is DEMO. ORDKEY is the Native Key and the Master Key. It consists of the numeric field ORDERNUM, which contains a unique integer number for each order.
Here are the fields for the Order table. The data is shown in Data for Order Table.
DATA ORDERS;
    INPUT @1  ORDERNUM 5.       /* ORDER NUMBER                 */
          @6  STOCKNUM 4.       /* STOCK NUMBER                 */

          @10 LENGTH   4.       /* LENGTH OF MATERIAL ORDERED   */

          @15 FABRICCH 11.2     /* FABRIC CHARGES               */

          @27 SHIPTO   $8.      /* CUSTOMER WHOM ORDER IS TO BE */
                                /* SHIPPED TO                   */

          @35 DATEORDE YYMMDD6. /* DATE OF ORDER                */
          @45 SHIPPED  YYMMDD6. /* DATE THAT ORDER WAS SHIPPED  */

          @55 TAKENBY  6.       /* EMPLOYEE WHO TOOK THE ORDER  */

          @62 PROCESSE 6.       /* EMPLOYEE WHO PROCESSED THE   */
                                /* THE ORDER                    */

          @69 SPECIALI $1. ;    /* THIS IS A FLAG THAT SIGNALS  */
                                /*THERE ARE SPECIAL INSTRUCTIONS*/
                                /* ASSOCIATED WITH THIS ORDER.  */
     FORMAT DATEORDE DATE7.;
     FORMAT SHIPPED DATE7.;
Data for Order Table
              OBS    ORDERNUM    STOCKNUM    LENGTH       FABRICCH

                1     11269        9870        690             .
                2     11270        1279       1750      2256870.00
                3     11271        8934        110     11063836.00
                4     11272        3478       1000             .
                5     11273        2567        450       252148.50
                6     11274        4789       1000             .
                7     11275        3478       1000             .
                8     11276        1279       1500      1934460.00
                9     11277        8934        100     10058033.00
               10     11278        2567       2500      1400825.00
               11     11279        9870        650             .
               12     11280        1279       1750      2256870.00
               13     11281        8934        110     11063836.00
               14     11282        2567        450       252148.50
               15     11283        9870        690             .
               16     11284        3478       1000             .
               17     11285        1279       1750      2256870.00
               18     11286        8934        110     11063836.00
               19     11287        2567        450       252148.50
               20     11288        9870        690             .
               21     11969        9870        690             .
               22     12051        1279       1750      2256870.00
               23     12102        8934        110     11063836.00
               24     12160        3478       1000             .
               25     12263        2567        450       252148.50
               26     12464        4789       1000             .
               27     12465        3478       1000             .
               28     12466        1279       1500      1934460.00
               29     12467        8934        100     10058033.00
               30     12468        2567       2500      1400825.00
               31     12470        9870        650             .
               32     12471        1279       1750      2256870.00
               33     12472        8934        110     11063836.00
               34     12473        2567        450       252148.50
               35     12474        9870        690             .
               36     12475        3478       1000             .
               37     12476        1279       1750      2256870.00
               38     12477        8934        110     11063836.00
               39     12478        2567        450       252148.50
               40     12479        9870        690             .

 

 OBS   ORDERNUM   SHIPTO     DATEORDE   SHIPPED   TAKENBY   PROCESSE   SPECIALI

   1    11269     19876078   03OCT88          .   212916          .
   2    11270     39045213   03OCT88    19OCT88   321783     237642       X
   3    11271     18543489   03OCT88    13OCT88   456910     456921
   4    11272     29834248   03OCT88          .   234967          .
   5    11273     19783482   04OCT88    14NOV88   119012     216382
   6    11274     15432147   04OCT88          .   212916          .
   7    11275     29834248   04OCT88          .   234967          .
   8    11276     14324742   04OCT88    21OCT88   321783     120591       X
   9    11277     31548901   05OCT88          .   456910          .
  10    11278     14898029   05OCT88    20OCT88   119012     456921
  11    11279     48345514   05OCT88          .   212916          .
  12    11280     39045213   06OCT88    21OCT88   321783     237642       X
  13    11281     18543489   06OCT88    27OCT88   456910     216382
  14    11282     19783482   06OCT88    26OCT88   119012     456921
  15    11283     18543489   07OCT88          .   212916          .
  16    11284     24589689   07OCT88          .   234967          .
  17    11285     38763919   07OCT88    02DEC88   321783     120591       X
  18    11286     43459747   07OCT88    03NOV88   456910     237642
  19    11287     15432147   07OCT88    07NOV88   119012     216382
  20    11288     14324742   10OCT88          .   212916          .       Y
  21    11969     19876078   25OCT88          .   212916          .
  22    12051     39045213   31OCT88          .   321783          .       X
  23    12102     18543489   15NOV88          .   456910          .
  24    12160     29834248   19NOV88          .   234967          .       Z
  25    12263     19783482   01DEC88          .   119012          .
  26    12464     15432147   23DEC88          .   212916          .
  27    12465     29834248   23DEC88          .   234967          .
  28    12466     14324742   23DEC88          .   321783          .       X
  29    12467     31548901   23DEC88          .   456910          .
  30    12468     14898029   23DEC88    03JAN89   119012     120591
  31    12470     48345514   23DEC88          .   212916          .
  32    12471     39045213   23DEC88          .   321783          .       X
  33    12472     18543489   23DEC88    03JAN89   456910     237642
  34    12473     19783482   23DEC88          .   119012          .
  35    12474     18543489   23DEC88          .   212916          .
  36    12475     24589689   23DEC88          .   234967          .
  37    12476     38763919   23DEC88    03JAN89   321783     456921       X
  38    12477     43459747   23DEC88          .   456910          .
  39    12478     15432147   23DEC88    03JAN89   119012     216382
  40    12479     14324742   23DEC88          .   212916          .